diff -Nru cgal-4.7/auxiliary/cgal_create_cmake_script.1 cgal-4.8/auxiliary/cgal_create_cmake_script.1 --- cgal-4.7/auxiliary/cgal_create_cmake_script.1 2015-10-17 19:00:44.000000000 +0000 +++ cgal-4.8/auxiliary/cgal_create_cmake_script.1 2016-04-04 19:00:49.000000000 +0000 @@ -1,4 +1,4 @@ -.TH CGAL_CREATE_CMAKE_SCRIPT "1" "October 2015" "CGAL 4.7" "User Commands" +.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 @@ -24,7 +24,7 @@ function is compiled and linked as a separate executable. .TP .B demo -Create a cmake script for a single application including Qt3 support. All +Create a cmake script for a single application. All .I C and .IR cpp diff -Nru cgal-4.7/CHANGES cgal-4.8/CHANGES --- cgal-4.7/CHANGES 2015-10-07 13:02:59.000000000 +0000 +++ cgal-4.8/CHANGES 2016-04-04 19:00:11.000000000 +0000 @@ -1,3 +1,192 @@ + +-------------------------------- 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 @@ -95,6 +284,8 @@ and index classes. + + * Approximation of Ridges and Umbilics on Triangulated Surface Meshes - This package now supports any model of the concept FaceGraph. diff -Nru cgal-4.7/cmake/modules/CGAL_Common.cmake cgal-4.8/cmake/modules/CGAL_Common.cmake --- cgal-4.7/cmake/modules/CGAL_Common.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_Common.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -1,12 +1,3 @@ -# 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) @@ -50,9 +41,16 @@ endif() endif() hide_variable(CMAKE_UNAME) - endif() - set(CMAKE_COLORMAKEFILE ON) + # 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") diff -Nru cgal-4.7/cmake/modules/CGALConfig_binary.cmake.in cgal-4.8/cmake/modules/CGALConfig_binary.cmake.in --- cgal-4.7/cmake/modules/CGALConfig_binary.cmake.in 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGALConfig_binary.cmake.in 2016-04-04 19:00:11.000000000 +0000 @@ -10,10 +10,11 @@ get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -# The else condition of this code is intentionally not present in -# CGALConfig_install.cmake.in 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. +# 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") @@ -29,13 +30,11 @@ 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_Qt3_LIBRARY CGAL::CGAL_Qt3 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_Qt3_LIBRARY "") set(CGAL_Qt5_LIBRARY "") endif() else() @@ -56,10 +55,16 @@ CGAL_alias_library(CGAL) CGAL_alias_library(CGAL_Core) CGAL_alias_library(CGAL_ImageIO) - CGAL_alias_library(CGAL_Qt3) 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@") @@ -87,38 +92,9 @@ 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_Qt5 "@WITH_CGAL_Qt5@" ) - -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@" ) +# If CGAL_ImageIO is built, tell if it was linked with Zlib. 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_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" ) -set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" ) -set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" ) -set(CGAL_Qt5_3RD_PARTY_LIBRARIES "@CGAL_Qt5_3RD_PARTY_LIBRARIES@" ) - set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}") set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" ) diff -Nru cgal-4.7/cmake/modules/CGALConfig_install.cmake.in cgal-4.8/cmake/modules/CGALConfig_install.cmake.in --- cgal-4.7/cmake/modules/CGALConfig_install.cmake.in 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGALConfig_install.cmake.in 2016-04-04 19:00:11.000000000 +0000 @@ -9,7 +9,6 @@ set(CGAL_CONFIG_LOADED TRUE) get_filename_component(CGAL_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -include("${CGAL_CONFIG_DIR}/CGALExports.cmake") # CGAL_DIR is the directory where this CGALConfig.cmake is installed set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") @@ -38,60 +37,9 @@ 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_Qt5 "@WITH_CGAL_Qt5@" ) - -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_Qt3_LIBRARY CGAL::CGAL_Qt3 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_Qt3_LIBRARY "") - set(CGAL_Qt5_LIBRARY "") -endif() - -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@" ) +# If CGAL_ImageIO is built, tell if it was linked with Zlib. 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_Qt5_3RD_PARTY_INCLUDE_DIRS "@CGAL_Qt5_3RD_PARTY_INCLUDE_DIRS@" ) -set(CGAL_Qt5_3RD_PARTY_DEFINITIONS "@CGAL_Qt5_3RD_PARTY_DEFINITIONS@" ) -set(CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS "@CGAL_Qt5_3RD_PARTY_LIBRARIES_DIRS@" ) -set(CGAL_Qt5_3RD_PARTY_LIBRARIES "@CGAL_Qt5_3RD_PARTY_LIBRARIES@" ) - set(CGAL_VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUILD_VERSION}") set(CGAL_USE_FILE "${CGAL_MODULES_DIR}/UseCGAL.cmake" ) @@ -121,8 +69,18 @@ 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 ) diff -Nru cgal-4.7/cmake/modules/CGALLibConfig.cmake.in cgal-4.8/cmake/modules/CGALLibConfig.cmake.in --- cgal-4.7/cmake/modules/CGALLibConfig.cmake.in 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/cmake/modules/CGALLibConfig.cmake.in 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,32 @@ +set(WITH_@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@_LIBRARY TARGET CGAL::@LIBRARY_NAME@ PROPERTY LOCATION) + else() + set(@LIBRARY_NAME@_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@_LIBRARY CGAL::@LIBRARY_NAME@) + else() + set(@LIBRARY_NAME@_LIBRARY "") + endif() +endif() + + +# 3RD_PARTY variables. +set(@LIBRARY_NAME@_3RD_PARTY_INCLUDE_DIRS "@@LIBRARY_NAME@_3RD_PARTY_INCLUDE_DIRS@") +set(@LIBRARY_NAME@_3RD_PARTY_DEFINITIONS "@@LIBRARY_NAME@_3RD_PARTY_DEFINITIONS@") +set(@LIBRARY_NAME@_3RD_PARTY_LIBRARIES_DIRS "@@LIBRARY_NAME@_3RD_PARTY_LIBRARIES_DIRS@") +set(@LIBRARY_NAME@_3RD_PARTY_LIBRARIES "@@LIBRARY_NAME@_3RD_PARTY_LIBRARIES@") diff -Nru cgal-4.7/cmake/modules/CGAL_Macros.cmake cgal-4.8/cmake/modules/CGAL_Macros.cmake --- cgal-4.7/cmake/modules/CGAL_Macros.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_Macros.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -222,7 +222,7 @@ message (STATUS "Configured ${lib} from UseLIB-file: ${usefile}") # UseLIB-file has to set ${vlib}_SETUP to TRUE - # TODO EBEB what about Qt5, Qt3, zlib? + # TODO EBEB what about Qt5, zlib? else() @@ -286,11 +286,6 @@ find_package( ZLIB QUIET ) endif() - if (${component} STREQUAL "Qt3") - find_package( OpenGL QUIET ) - find_package( Qt3-patched QUIET ) - endif() - if (${component} STREQUAL "Qt5") find_package( OpenGL QUIET ) find_package( Qt5 QUIET COMPONENTS OpenGL Svg ) @@ -337,10 +332,6 @@ find_package( ZLIB ) endif() - if (${component} STREQUAL "Qt3") - find_package( OpenGL ) - find_package( Qt3-patched ) - endif() if (${component} STREQUAL "Qt5") set(CGAL_${component}_FOUND TRUE) find_package( OpenGL ) diff -Nru cgal-4.7/cmake/modules/CGAL_SetupBoost.cmake cgal-4.8/cmake/modules/CGAL_SetupBoost.cmake --- cgal-4.7/cmake/modules/CGAL_SetupBoost.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_SetupBoost.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -1,9 +1,30 @@ 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. - find_package( Boost 1.39 REQUIRED thread system ) + 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) diff -Nru cgal-4.7/cmake/modules/CGAL_SetupDependencies.cmake cgal-4.8/cmake/modules/CGAL_SetupDependencies.cmake --- cgal-4.7/cmake/modules/CGAL_SetupDependencies.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_SetupDependencies.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -38,7 +38,7 @@ use_lib( ${vlib} ${${vlib}_USE_FILE}) endif() - # TODO EBEB what about Qt3, Qt5, zlib etc? + # TODO EBEB what about Qt5, zlib etc? set ( CGAL_USE_${vlib} TRUE ) diff -Nru cgal-4.7/cmake/modules/CGAL_SetupVLD.cmake cgal-4.8/cmake/modules/CGAL_SetupVLD.cmake --- cgal-4.7/cmake/modules/CGAL_SetupVLD.cmake 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_SetupVLD.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -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 -Nru cgal-4.7/cmake/modules/CGAL_VersionUtils.cmake cgal-4.8/cmake/modules/CGAL_VersionUtils.cmake --- cgal-4.7/cmake/modules/CGAL_VersionUtils.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/CGAL_VersionUtils.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -1,5 +1,3 @@ -set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) - if ( NOT CGAL_VERSION_UTILS_FILE_INCLUDED ) set( CGAL_VERSION_UTILS_FILE_INCLUDED 1 ) diff -Nru cgal-4.7/cmake/modules/FindCGAL.cmake cgal-4.8/cmake/modules/FindCGAL.cmake --- cgal-4.7/cmake/modules/FindCGAL.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/FindCGAL.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -14,8 +14,6 @@ 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. diff -Nru cgal-4.7/cmake/modules/FindQt3-patched.cmake cgal-4.8/cmake/modules/FindQt3-patched.cmake --- cgal-4.7/cmake/modules/FindQt3-patched.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/FindQt3-patched.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/cmake/modules/Qt3Macros-patched.cmake cgal-4.8/cmake/modules/Qt3Macros-patched.cmake --- cgal-4.7/cmake/modules/Qt3Macros-patched.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/Qt3Macros-patched.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -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 for compatibility with Qt5 and CGAL - -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 "[^<]*" _RC_FILES "${_RC_FILE_CONTENTS}") - SET(_RC_DEPENDS) - FOREACH(_RC_FILE ${_RC_FILES}) - STRING(REGEX REPLACE "^" "" _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 -Nru cgal-4.7/cmake/modules/UseCGAL.cmake cgal-4.8/cmake/modules/UseCGAL.cmake --- cgal-4.7/cmake/modules/UseCGAL.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/cmake/modules/UseCGAL.cmake 2016-04-04 19:00:11.000000000 +0000 @@ -5,8 +5,6 @@ # 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() diff -Nru cgal-4.7/CMakeLists.txt cgal-4.8/CMakeLists.txt --- cgal-4.7/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -24,7 +24,7 @@ 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 OLD) + cmake_policy(SET CMP0054 NEW) endif() @@ -125,27 +125,25 @@ 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_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}) + set(CGAL_FULL_VERSION ${CGAL_CREATED_VERSION} CACHE INTERNAL "CGAL version") #define CGAL_VERSION_NR 1030500135 @@ -288,8 +286,14 @@ 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 =- @@ -336,10 +340,11 @@ # 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.1" ) +set( CGAL_SOVERSION "11.0.2" ) message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" ) message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" ) @@ -374,7 +379,6 @@ 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:") @@ -430,7 +434,7 @@ endif() -if( "${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro ) +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" ) @@ -522,19 +526,9 @@ 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 Qt5 as lib of cgal are required +# 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) @@ -612,10 +606,6 @@ option(WITH_${lib} "Select external library ${lib}" OFF) endif() - if (WITH_${lib}) - add_config_flag( ${CGAL_EXT_LIB_${lib}_PREFIX} ) - endif() - endforeach() #-------------------------------------------------------------------------------------------------- @@ -662,45 +652,41 @@ message("== Write compiler_config.h ==") -file(GLOB all_config_tests "${CGAL_INSTALLATION_PACKAGE_DIR}/config/testfiles/*.cpp") - -list( SORT all_config_tests ) +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( 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") +file(GLOB all_config_tests "${CGAL_INSTALLATION_PACKAGE_DIR}/config/testfiles/*.cpp") +list(SORT all_config_tests) -cache_get(CONFIG_CXX_FLAGS) +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}. - if( RUNNING_CGAL_AUTO_TEST OR "${config_test_name}" MATCHES "^${config_test_name}$" OR NOT ${CONFIG_CXX_FLAGS} STREQUAL ${CMAKE_CXX_FLAGS}) + # Test's name is .cpp's base name + get_filename_component(config_test_name ${config_test_cpp} NAME_WE) - CHECK_CXX_FILE_RUNS(${config_test_cpp} ${config_test_name} ${config_test_name}) + # 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() - 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} ) - + 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_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 ) @@ -776,9 +762,6 @@ add_subdirectory(src) -hide_variable(EXECUTABLE_OUTPUT_PATH) -hide_variable(LIBRARY_OUTPUT_PATH) - # # Repeat some problems # @@ -854,8 +837,6 @@ install(DIRECTORY ${CGAL_MODULES_REL_DIR}/ DESTINATION ${CGAL_INSTALL_CMAKE_DIR} ) install(FILES ${CGAL_MODULES_REL_DIR}/UseCGAL.cmake DESTINATION ${CGAL_INSTALL_CMAKE_DIR} ) -install(EXPORT CGALExports DESTINATION ${CGAL_INSTALL_CMAKE_DIR} - NAMESPACE CGAL:: ) if ( GMP_IN_AUXILIARY ) install(DIRECTORY auxiliary/gmp/include/ DESTINATION ${CGAL_INSTALL_INC_DIR} ) @@ -952,7 +933,7 @@ set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) endif() - if(${CPACK_SYSTEM_NAME} MATCHES Windows) + if(${CPACK_SYSTEM_NAME} MATCHES "Windows") if(CMAKE_CL_64) set(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR}) else() @@ -1048,3 +1029,8 @@ 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 -Nru cgal-4.7/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp cgal-4.8/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp --- cgal-4.7/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/config/testfiles/CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/debian/changelog cgal-4.8/debian/changelog --- cgal-4.7/debian/changelog 2015-11-29 10:47:24.000000000 +0000 +++ cgal-4.8/debian/changelog 2016-04-24 15:22:18.000000000 +0000 @@ -1,3 +1,33 @@ +cgal (4.8-3) unstable; urgency=medium + + * Fix FTBFS on armel and armhf: re-add Build-Depends: libglu1-mesa-dev + on armel and armhf such that CGAL_ImageIO can still be built. + * Do not move headers from libcgal-qt5-dev to libcgal-dev if + libcgal-qt5-dev is not built (Closes: #822441). + * Remove amd64 from list of OpenGL ES architectures. + + -- Joachim Reichel Sun, 24 Apr 2016 17:21:53 +0200 + +cgal (4.8-2) unstable; urgency=medium + + * Fix FTBFS on armel and armhf caused by missing OpenGL ES support in CGAL + (and libQGLViewer). Stop building libcgal-qt5-11 and libcgal-qt5-dev on + armel and armhf. + + -- Joachim Reichel Fri, 22 Apr 2016 16:54:32 +0200 + +cgal (4.8-1) unstable; urgency=medium + + * New upstream release (Closes: #804539). + * Really apply patch for parallel builds mentioned in changelog for 4.7-1. + * Attempt to make build reproducible: Add --sort=name to tar invocations, + add Build-Depends: tar (>= 1.28) + * Add Suggests: cimg-dev for libcgal-demo. + * Fix debian/watch after move to github. + * Update Standards-Version to 3.9.8 (no changes needed). + + -- Joachim Reichel Fri, 08 Apr 2016 16:00:02 +0200 + cgal (4.7-4) unstable; urgency=medium * Fix FTBFS when built with dpkg-buildpackage -A (Closes: #806003). diff -Nru cgal-4.7/debian/control cgal-4.8/debian/control --- cgal-4.7/debian/control 2015-10-29 19:01:31.000000000 +0000 +++ cgal-4.8/debian/control 2016-04-23 09:06:28.000000000 +0000 @@ -2,11 +2,12 @@ Priority: optional Maintainer: Joachim Reichel # "ipe" is only needed because it contains goodies.lua which is needed by FindIPE.cmake -Build-Depends: debhelper (>= 9), dpkg-awk, cmake, zlib1g-dev, libboost-dev, - libboost-thread-dev, libboost-program-options-dev, libboost-system-dev, - libgmp10-dev, libmpfr-dev, libglu1-mesa-dev, qtbase5-dev, - libqt5opengl5-dev, libqt5svg5-dev, libipe-dev (>= 7), ipe -Standards-Version: 3.9.6 +Build-Depends: debhelper (>= 9), dpkg-awk, tar (>= 1.28), cmake, zlib1g-dev, + libboost-dev, libboost-thread-dev, libboost-program-options-dev, + libboost-system-dev, libgmp10-dev, libmpfr-dev, libglu1-mesa-dev, + qtbase5-dev [!armel !armhf], libqt5opengl5-dev [!armel !armhf], + libqt5svg5-dev [!armel !armhf], libipe-dev (>= 7), ipe +Standards-Version: 3.9.8 Section: libs Homepage: http://www.cgal.org/ @@ -40,6 +41,7 @@ can be found in the package libcgal-qt5-11. Package: libcgal-qt5-11 +# actually "Architecture: any [!armel !armhf]" via debhelper Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -85,6 +87,7 @@ Conflicts: libcgal-qt4-dev Replaces: libcgal-qt4-dev Section: libdevel +# actually "Architecture: any [!armel !armhf]" via debhelper Architecture: any Multi-Arch: same Depends: libcgal11v5 (= ${binary:Version}), libcgal-qt5-11 (= ${binary:Version}), @@ -109,7 +112,7 @@ qtscript5-dev, qttools5-dev, qttools5-dev-tools, libqt5opengl5-dev, libqt5svg5-dev, libqt5sql5-sqlite, libglew1.10-dev | libglew-dev, libqglviewer-dev (>= 2.6.1+dfsg1-1), libipe-dev (>= 7), libmagick++-dev, - liblapack-dev, geomview, libatlas-base-dev, gfortran + liblapack-dev, geomview, libatlas-base-dev, gfortran, cimg-dev Description: C++ library for computational geometry (demos) CGAL (Computational Geometry Algorithms Library) makes the most important of the solutions and methods developed in computational geometry available diff -Nru cgal-4.7/debian/libcgal-qt5-dev.install cgal-4.8/debian/libcgal-qt5-dev.install --- cgal-4.7/debian/libcgal-qt5-dev.install 2015-08-02 18:27:47.000000000 +0000 +++ cgal-4.8/debian/libcgal-qt5-dev.install 2016-03-05 09:22:35.000000000 +0000 @@ -1,5 +1,8 @@ -# The next entry is disabled here because it overlaps with the corresponding -# entry in libcgal-dev.install. The files are moved in debian/rules. +# The first and last entry is disabled here because it overlaps with the +# corresponding entry in libcgal-dev.install. The files are moved in +# debian/rules. +# # usr/include/CGAL/Qt usr/lib/*/libCGAL_Qt5.a usr/lib/*/libCGAL_Qt5.so +# usr/lib/*/cmake/CGAL/CGAL_Qt5* diff -Nru cgal-4.7/debian/rules cgal-4.8/debian/rules --- cgal-4.7/debian/rules 2015-11-29 10:38:01.000000000 +0000 +++ cgal-4.8/debian/rules 2016-04-24 09:03:21.000000000 +0000 @@ -15,11 +15,22 @@ export TESTS_IEEE_FPU_OPTION = -mieee -mfp-rounding-mode=d endif +COMMA = , +ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) + NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) +endif + +OPENGL_ES_ARCHITECTURES := armel armhf +ifneq (,$(findstring $(DEB_HOST_ARCH), $(OPENGL_ES_ARCHITECTURES))) + DEBHELPER_QT5 := -Nlibcgal-qt5-11 -Nlibcgal-qt5-dev + CMAKE_QT5 := -DWITH_CGAL_Qt5=OFF +endif + %: - dh $@ + dh $@ --parallel $(DEBHELPER_QT5) override_dh_auto_clean: - dh_auto_clean + dh_auto_clean --parallel $(DEBHELPER_QT5) rm -fr shared static $(MAKE) -C debian/tests clean @@ -27,17 +38,17 @@ mkdir -p static cd static && QTDIR= cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_GMPXX=ON -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ + -DWITH_GMPXX=ON -DWITH_demos=OFF -DWITH_examples=OFF \ -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=FALSE \ -DCGAL_INSTALL_LIB_DIR=lib/$(DEB_HOST_MULTIARCH) \ - -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL + -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL $(CMAKE_QT5) mkdir -p shared cd shared && QTDIR= cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_GMPXX=ON -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ + -DWITH_GMPXX=ON -DWITH_demos=OFF -DWITH_examples=OFF \ -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE \ -DCGAL_INSTALL_LIB_DIR=lib/$(DEB_HOST_MULTIARCH) \ - -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL + -DCGAL_INSTALL_CMAKE_DIR=lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL $(CMAKE_QT5) mkdir -p shared/demo/CGAL_ipelets cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ @@ -47,9 +58,9 @@ # empty override_dh_auto_build-arch: - $(MAKE) -C static - $(MAKE) -C shared - $(MAKE) -C shared/demo/CGAL_ipelets + $(MAKE) $(NJOBS) -C static + $(MAKE) $(NJOBS) -C shared + $(MAKE) $(NJOBS) -C shared/demo/CGAL_ipelets override_dh_auto_build-indep: # empty @@ -90,23 +101,31 @@ dh_install --sourcedir=debian/tmp --list-missing +ifeq (,$(findstring $(DEB_HOST_ARCH), $(OPENGL_ES_ARCHITECTURES))) mkdir -p debian/libcgal-qt5-dev/usr/include/CGAL mv debian/libcgal-dev/usr/include/CGAL/Qt debian/libcgal-qt5-dev/usr/include/CGAL + mkdir -p debian/libcgal-qt5-dev/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL + mv debian/libcgal-dev/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL/CGAL_Qt5* debian/libcgal-qt5-dev/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/CGAL +else + rm -r debian/libcgal-dev/usr/include/CGAL/Qt +endif - mkdir -p debian/libcgal-qt5-11/usr/share/doc - ln -s libcgal11v5 debian/libcgal-qt5-11/usr/share/doc/libcgal-qt5-11 mkdir -p debian/libcgal-dev/usr/share/doc ln -s libcgal11v5 debian/libcgal-dev/usr/share/doc/libcgal-dev - mkdir -p debian/libcgal-qt5-dev/usr/share/doc - ln -s libcgal11v5 debian/libcgal-qt5-dev/usr/share/doc/libcgal-qt5-dev mkdir -p debian/libcgal-ipelets/usr/share/doc ln -s libcgal11v5 debian/libcgal-ipelets/usr/share/doc/libcgal-ipelets +ifeq (,$(findstring $(DEB_HOST_ARCH), $(OPENGL_ES_ARCHITECTURES))) + mkdir -p debian/libcgal-qt5-11/usr/share/doc + ln -s libcgal11v5 debian/libcgal-qt5-11/usr/share/doc/libcgal-qt5-11 + mkdir -p debian/libcgal-qt5-dev/usr/share/doc + ln -s libcgal11v5 debian/libcgal-qt5-dev/usr/share/doc/libcgal-qt5-dev +endif override_dh_install-indep: mkdir -p debian/tmp/usr/share/doc/cgal chmod -R u=rwX,g=rX,o=rX demo examples - tar cf - demo | gzip --no-name --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz - tar cf - examples | gzip --no-name --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz + tar cf - --sort=name demo | gzip --no-name --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz + tar cf - --sort=name examples | gzip --no-name --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz dh_install --sourcedir=debian/tmp --list-missing diff -Nru cgal-4.7/debian/watch cgal-4.8/debian/watch --- cgal-4.7/debian/watch 2015-07-19 17:07:29.000000000 +0000 +++ cgal-4.8/debian/watch 2016-01-04 19:26:11.000000000 +0000 @@ -1,10 +1,12 @@ -# Note that the file URLs contain unpredictable IDs as directory. The -# uversionmagle option strips this ID. -# -# Note that only digits and "." are used to match the version number. -# Therefore we do not match beta releases. -# -version=3 -opts=uversionmangle=s/(\d+).([\d\.]+)/$2/ \ - https://gforge.inria.fr/frs/?group_id=52 \ - /frs/download.php/file/(\d+)/CGAL-([\d\.]+).tar.xz +# The links on https://github.com/CGAL/cgal/tags point to an HTML page per +# release. The "downloadurlmangle" option is used to transform these links +# into the file URL. The "filenamemangle" option is used to transform these +# links into the local filename. + +version=4 + +opts="\ + downloadurlmangle=s|/tag/(.*)%2F(.*)|/download/$1%2F$2/$2.tar.xz|, \ + filenamemangle=s|.*%2FCGAL-(.*)|cgal_$1.orig.tar.xz|" \ +https://github.com/CGAL/cgal/tags \ + /CGAL/cgal/releases/tag/releases%2FCGAL-(\d[\d.]*) debian uupdate diff -Nru cgal-4.7/demo/AABB_tree/Scene.cpp cgal-4.8/demo/AABB_tree/Scene.cpp --- cgal-4.7/demo/AABB_tree/Scene.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/AABB_tree/Scene.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -48,6 +48,7 @@ startTimer(0); ready_to_cut = false; are_buffers_initialized = false; + gl_init = false; } @@ -590,6 +591,8 @@ void Scene::draw(QGLViewer* viewer) { + if(!gl_init) + initGL(); if(!are_buffers_initialized) initialize_buffers(); QColor color; @@ -1314,7 +1317,7 @@ disconnect(m_frame, SIGNAL(modified()), this, SLOT(cutting_plane())); m_view_plane = false; } -void Scene::initGL(Viewer * /* viewer */) +void Scene::initGL() { gl = new QOpenGLFunctions_2_1(); if(!gl->initializeOpenGLFunctions()) @@ -1325,6 +1328,7 @@ gl->glGenTextures(1, &textureId); compile_shaders(); + gl_init = true; } void Scene::timerEvent(QTimerEvent *) diff -Nru cgal-4.7/demo/AABB_tree/Scene.h cgal-4.8/demo/AABB_tree/Scene.h --- cgal-4.7/demo/AABB_tree/Scene.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/AABB_tree/Scene.h 2016-04-04 19:00:11.000000000 +0000 @@ -82,7 +82,7 @@ void update_bbox(); Bbox bbox() { return m_bbox; } ManipulatedFrame* manipulatedFrame() const { return m_frame; } - void initGL(Viewer *viewer); + void initGL(); private: // member data @@ -93,6 +93,7 @@ std::list m_segments; std::vector m_cut_segments; bool ready_to_cut; + bool gl_init; // distance functions (simple 2D arrays) Color_ramp m_red_ramp; diff -Nru cgal-4.7/demo/AABB_tree/Viewer.cpp cgal-4.8/demo/AABB_tree/Viewer.cpp --- cgal-4.7/demo/AABB_tree/Viewer.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/AABB_tree/Viewer.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -31,7 +31,7 @@ { QGLViewer::initializeGL(); setBackgroundColor(::Qt::white); - m_pScene->initGL(this); + //m_pScene->initGL(this); } void Viewer::mousePressEvent(QMouseEvent* e) diff -Nru cgal-4.7/demo/Alpha_shapes_2/data/brain_1 cgal-4.8/demo/Alpha_shapes_2/data/brain_1 --- cgal-4.7/demo/Alpha_shapes_2/data/brain_1 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/brain_1 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/brain_2 cgal-4.8/demo/Alpha_shapes_2/data/brain_2 --- cgal-4.7/demo/Alpha_shapes_2/data/brain_2 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/brain_2 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/degenere.pts cgal-4.8/demo/Alpha_shapes_2/data/degenere.pts --- cgal-4.7/demo/Alpha_shapes_2/data/degenere.pts 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/degenere.pts 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -3 -331.102 357.398 -314.367 351.422 -136.266 136.266 diff -Nru cgal-4.7/demo/Alpha_shapes_2/data/dipper cgal-4.8/demo/Alpha_shapes_2/data/dipper --- cgal-4.7/demo/Alpha_shapes_2/data/dipper 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/dipper 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -7 -19 16 -43 38 -64 37 -91 40 -103 28 -122 70 -147 48 diff -Nru cgal-4.7/demo/Alpha_shapes_2/data/dixie cgal-4.8/demo/Alpha_shapes_2/data/dixie --- cgal-4.7/demo/Alpha_shapes_2/data/dixie 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/dixie 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/fin cgal-4.8/demo/Alpha_shapes_2/data/fin --- cgal-4.7/demo/Alpha_shapes_2/data/fin 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/fin 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/fout cgal-4.8/demo/Alpha_shapes_2/data/fout --- cgal-4.7/demo/Alpha_shapes_2/data/fout 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/fout 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/kleeblatt cgal-4.8/demo/Alpha_shapes_2/data/kleeblatt --- cgal-4.7/demo/Alpha_shapes_2/data/kleeblatt 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/kleeblatt 1970-01-01 00:00:00.000000000 +0000 @@ -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 Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Alpha_shapes_2/data/m30f.jpg and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Alpha_shapes_2/data/m30f.jpg differ diff -Nru cgal-4.7/demo/Alpha_shapes_2/data/noisy_circle cgal-4.8/demo/Alpha_shapes_2/data/noisy_circle --- cgal-4.7/demo/Alpha_shapes_2/data/noisy_circle 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/noisy_circle 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/torus cgal-4.8/demo/Alpha_shapes_2/data/torus --- cgal-4.7/demo/Alpha_shapes_2/data/torus 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/torus 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/usa-outline cgal-4.8/demo/Alpha_shapes_2/data/usa-outline --- cgal-4.7/demo/Alpha_shapes_2/data/usa-outline 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/usa-outline 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/Wshape cgal-4.8/demo/Alpha_shapes_2/data/Wshape --- cgal-4.7/demo/Alpha_shapes_2/data/Wshape 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/Wshape 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Alpha_shapes_2/data/Wshape2 cgal-4.8/demo/Alpha_shapes_2/data/Wshape2 --- cgal-4.7/demo/Alpha_shapes_2/data/Wshape2 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Alpha_shapes_2/data/Wshape2 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Apollonius_graph_2/data/algo.dat cgal-4.8/demo/Apollonius_graph_2/data/algo.dat --- cgal-4.7/demo/Apollonius_graph_2/data/algo.dat 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Apollonius_graph_2/data/algo.dat 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Apollonius_graph_2/data/hierarchy.dat cgal-4.8/demo/Apollonius_graph_2/data/hierarchy.dat --- cgal-4.7/demo/Apollonius_graph_2/data/hierarchy.dat 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Apollonius_graph_2/data/hierarchy.dat 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h cgal-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h --- cgal-4.7/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/ArrangementDemoWindow.h 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,8 @@ #include #include #include -#include + +extern const char * hand_xpm[]; #include diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h cgal-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h --- cgal-4.7/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.h 2016-04-04 19:00:11.000000000 +0000 @@ -346,8 +346,8 @@ // Determine the direction of cv (left-to-right or right-to-left) Comparison_result dir = comp_end_pts(cv); - for (seg_it = cv.begin_subcurves(); - seg_it != cv.end_subcurves() ; ++seg_it) + for (seg_it = cv.subcurves_begin(); + seg_it != cv.subcurves_end() ; ++seg_it) { if (dir == SMALLER) { diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h cgal-4.8/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h --- cgal-4.7/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/ArrangementPainterOstream.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,9 +12,6 @@ // This file is provided 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 #ifndef CGAL_QT_ARRANGEMENT_PAINTER_OSTREAM_H @@ -260,8 +257,8 @@ ArrangementPainterOstream& operator<<( const X_monotone_curve_2& curve ) { for (typename X_monotone_curve_2::Subcurve_const_iterator it = - curve.begin_subcurves(); - it != curve.end_subcurves(); ++it) + curve.subcurves_begin(); + it != curve.subcurves_end(); ++it) { this->painterOstream << *it; } diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/arrangement_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include "arrangement_2.h" -#include "forms.h" -#include "qt_layer.h" -#include "demo_tab.h" - -#include -#include -#include -#include -#include -#include -#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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/arrangement_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "cgal_types.h" -#include - -////////////////////////////////////////////////////////////////////////////// -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 indexes , std::list 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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/cgal_types.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/cgal_types.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/cgal_types.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/cgal_types.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_TYPES_HEADER_H -#define CGAL_TYPES_HEADER_H - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#if 0 -#include -#endif - -#include -#include // color of faces (stored in curve data) -#include - -#include -#include - -#include - -#include - - -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_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 My_polygon; - // polygon is usefull for filling faces - -#ifdef CGAL_USE_GMP - - #include - - typedef CGAL::Gmpq NT; - -#else - - #include - #include - - typedef CGAL::Quotient NT; - -#endif -// instead of -//typedef CGAL::Cartesian Kernel; -// workaround for VC++ -struct Kernel : public CGAL::Cartesian {}; - -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 Dcel : - public CGAL::Arr_dcel_base, - CGAL::Arr_halfedge_base, - Face_with_color> -{ - -public: - - /*! \struct - * An auxiliary structure for rebinding the DCEL with a new traits class. - */ - template - struct rebind - { - typedef Dcel other; - }; - - // CREATION - Dcel() {} -}; - - -// Segments: -typedef CGAL::Arr_segment_traits_2 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_dcel; -typedef CGAL::Arrangement_with_history_2 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_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_trap_point_location; -typedef CGAL::Arr_simple_point_location - Seg_simple_point_location; -typedef CGAL::Arr_walk_along_line_point_location - Seg_walk_point_location; -typedef CGAL::Arr_landmarks_point_location - Seg_lanmarks_point_location; - - - - -// Polyline - -typedef CGAL::Arr_polyline_traits_2 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_dcel; -typedef CGAL::Arrangement_with_history_2 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_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_trap_point_location; -typedef CGAL::Arr_simple_point_location - Pol_simple_point_location; -typedef CGAL::Arr_walk_along_line_point_location - Pol_walk_point_location; -typedef CGAL::Arr_landmarks_point_location - Pol_lanmarks_point_location; - - -// Conics - -#ifdef CGAL_USE_CORE - -#include - -typedef CGAL::CORE_algebraic_number_traits Nt_traits; -typedef Nt_traits::Rational Rational; -typedef Nt_traits::Algebraic Algebraic; -typedef CGAL::Cartesian Rat_kernel; -typedef CGAL::Cartesian Alg_kernel; - -// instead of -//typedef CGAL::Arr_conic_traits_2 Conic_traits; -// workaround for VC++ -struct Conic_traits: public CGAL::Arr_conic_traits_2 {}; - -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_dcel; -typedef CGAL::Arrangement_with_history_2 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 Arr_scanner; -typedef Conic_arr::Halfedge Conic_halfedge; -typedef Conic_arr::Face_iterator Conic_face_iterator; - -typedef std::list 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_trap_point_location; -typedef CGAL::Arr_simple_point_location - Conic_simple_point_location; -typedef CGAL::Arr_walk_along_line_point_location - Conic_walk_point_location; -typedef CGAL::Arr_landmarks_point_location - Conic_lanmarks_point_location; - -#endif - - - -template -class My_observer : public CGAL::Arr_observer -{ -public: - - typedef Arrangement_ Arrangement; - typedef CGAL::Arr_observer 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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt cgal-4.8/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -# 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 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 Qt5: 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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/Conic_reader.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -#ifndef CGAL_CONIC_READER_H -#define CGAL_CONIC_READER_H - -#include -#include -#include -#include -#include - -template -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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 // 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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/demo_tab.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include "demo_tab.h" - -QColor Qt_widget_base_tab::s_color_order[] = { - Qt::red, Qt::yellow, Qt::green, Qt::blue -}; diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/demo_tab.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/demo_tab.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/demo_tab.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/demo_tab.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Efi Fogel - -#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 -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "cgal_types.h" - -#include -#include -#include -#include -#include //for CGAL::Oneset_iterator -#include -#include -#include - -#include - -//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(*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 -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 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 Diagram_1; - - typedef typename Traits::Multiplicity Multiplicity; - -private: - // function object - FillFace - class FillFace - { - /*! */ - Qt_widget_demo_tab *ptr; - - public: - /*! constructor */ - FillFace(Qt_widget_demo_tab* tab) : ptr(tab){} - - /*! - */ - void - operator()(typename Qt_widget_demo_tab::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(*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(*this) << p; - - } - if (mode == MODE_POINT_LOCATION) - { - static_cast(*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(*this) << ivit->point(); - } - - static_cast(*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(*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 oi(res); - - m_traits.intersect_2_object()(c1, c2, oi); - std::pair 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(*this) << up; - } - } - - //select arrow color that differs from the color of the face it is in - setCorrectColor(relevant_face_color); - - static_cast(*this) << CGAL::LineWidth(2); - static_cast(*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(*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(*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 oi(res); - - m_traits.intersect_2_object()(c1, c2, oi); - std::pair 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(*this) << down; - } - } - - //select arrow color that differs from the color of the face it is in - setCorrectColor(relevant_face_color); - - static_cast(*this) << CGAL::LineWidth(2); - static_cast(*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(*this) << CGAL::LineWidth(m_line_width); - } - } - - if (lower_env || upper_env) - { - std::list 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(*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 - 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 - 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 - 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(*this) << CGAL::LineWidth(1); - // get the edge coordinate - int min_x = static_cast (x_min()); - int max_x = static_cast (x_max()); - int min_y = static_cast (y_min()); - int max_y = static_cast (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(*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(*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 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 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(cube_size)/2; - for (int i = my_min - cube_size; i <= my_max; i += cube_size) - { - Coord_type id = static_cast(i); - if (coord >= id - d && coord <= id + d) - { - Coord_type ans = static_cast(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(*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 (x_min()); - int xmax = static_cast (x_max()); - int ymin = static_cast (y_min()); - int ymax = static_cast (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 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 * 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)<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 * 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 * 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 * 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 * 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 * ) - { - 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 * 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 * ) - { - 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 * 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 * 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 * 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 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 Hafledge_list; - typedef Hafledge_list::iterator Hafledge_list_iterator; - typedef std::vector::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 * 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)<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 * 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 * 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 * w , Curve_2 pol ) - { - std::list obj_list; - m_traits.make_x_monotone_2_object()(pol, std::back_inserter(obj_list)); - for(std::list::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 * 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 * 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 * ) - { - 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 * 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 * 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 * 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 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 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 * 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 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 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 * 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)<setFilled(false); - w->get_painter().setPen(old_penstyle); - } - } - - /*! draw_xcurve - same as draw_curve - */ - void draw_xcurve(Qt_widget_demo_tab * 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 (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 *app_pts = new std::pair [n + 1]; - std::pair *end_pts = c.polyline_approximation (n, app_pts); - std::pair *p_curr = app_pts; - std::pair *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 * 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 (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 *app_pts = new std::pair [n + 1]; - std::pair *end_pts = c.polyline_approximation (n, app_pts); - std::pair *p_curr = app_pts; - std::pair *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 * w , Curve_2 conic ) - { - std::list obj_list; - m_traits.make_x_monotone_2_object()(conic, std::back_inserter(obj_list)); - for(std::list::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 * 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(1000 * m_p1.x() + 0.5), 1000); - y1 = Rational(static_cast(1000 * m_p1.y() + 0.5), 1000); - x = Rational(static_cast(1000 * p.x() + 0.5), 1000); - y = Rational(static_cast(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(1000 * m_p2.x() + 0.5), 1000); - Rational y2 = Rational(static_cast(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(1000 * m_p2.x() + 0.5), 1000); - Rational y2 = Rational(static_cast(1000 * m_p2.y() + 0.5), 1000); - Rational x3 = Rational(static_cast(1000 * m_p3.x() + 0.5), 1000); - Rational y3 = Rational(static_cast(1000 * m_p3.y() + 0.5), 1000); - Rational x4 = Rational(static_cast(1000 * m_p4.x() + 0.5), 1000); - Rational y4 = Rational(static_cast(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 * ) - { - return; - } - - /*! draw_last_segment - call from mouse move event - */ - void draw_last_segment( Qt_widget_demo_tab * 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 * 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 * 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 * 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 (1000 * CGAL::to_double(p1.x())+ 0.5), 1000); - Rational y1 (static_cast (1000 * CGAL::to_double(p1.y())+ 0.5), 1000); - - Rational x2 (static_cast (1000 * CGAL::to_double(p2.x())+ 0.5), 1000); - Rational y2 (static_cast (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 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 Qt_widget_segment_tab; -typedef Qt_widget_demo_tab Qt_widget_polyline_tab; -#ifdef CGAL_USE_CORE -typedef Qt_widget_demo_tab Qt_widget_conic_tab; -#endif - -#endif //DEMO_TAB_H diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/forms.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/forms.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/forms.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/forms.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -//////////////////////////////////////////////////////////////////////// - -#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(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 (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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/forms.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/forms.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/forms.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/forms.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_files.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -#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 - -/*! open a segment file and add new tab */ -void MyWindow::fileOpenSegment() -{ - Qt_widget_base_tab *w_demo_p = - static_cast (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 (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 (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 (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 (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 *w_demo_p = - static_cast *> - (myBar->currentPage()); - inputFile >> (*w_demo_p->m_curves_arr); - break; - } - case POLYLINE_TRAITS: // dosen't work !! - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (myBar->currentPage()); - inputFile >> (*w_demo_p->m_curves_arr); - break; - } - case CONIC_TRAITS: // dosen't work !! - { - /*Qt_widget_demo_tab *w_demo_p = - static_cast *> - (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 (myBar->currentPage()); - - QCursor old = w_demo->cursor(); - w_demo->setCursor(Qt::WaitCursor); - - if (w_demo->traits_type == POLYLINE_TRAITS) - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (myBar->currentPage()); - if (clear_flag) - w_demo_p->m_curves_arr->clear(); - - std::vector points; - - unsigned int num_polylines; - inputFile >> num_polylines; - std::list 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 *w_demo_p = - static_cast *> - (myBar->currentPage()); - if (clear_flag) - w_demo_p->m_curves_arr->clear(); - - int count; - inputFile >> count; - int i; - std::list 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 *w_demo_p = - static_cast *> - (myBar->currentPage()); - if (clear_flag) - w_demo_p->m_curves_arr->clear(); - typedef Conic_tab_traits::Traits Conic_traits; - Conic_reader reader; - std::list 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 (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 (myBar->currentPage()); - - switch ( w_demo_p1->traits_type ) { - case SEGMENT_TRAITS: - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (myBar->currentPage()); - outFile << (*w_demo_p->m_curves_arr); - break; - } - case POLYLINE_TRAITS: - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (myBar->currentPage()); - outFile << (*w_demo_p->m_curves_arr); - break; - } - case CONIC_TRAITS: - { - /*Qt_widget_demo_tab *w_demo_p = - static_cast *> - (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 (myBar->currentPage()); - - switch ( w_demo_p1->traits_type ) { - case SEGMENT_TRAITS: - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (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 *w_demo_p = - //static_cast *> - // (myBar->currentPage()); - //outFile << w_demo_p->m_curves_arr; - break; - } - case CONIC_TRAITS: - { - //Qt_widget_demo_tab *w_demo_p = - //static_cast *> - // (myBar->currentPage()); - //outFile << w_demo_p->m_curves_arr; - break; - } - } -#endif -} - diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_operations.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -#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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 (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 *w_demo_p = - static_cast *> - (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 *w_demo_p = - static_cast *> - (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 *w_demo_p = - static_cast *> - (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 (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 (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 (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 *widget = - new Qt_widget_demo_tab - (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 *widget = - new Qt_widget_demo_tab - (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 (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_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_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_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 (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 *widget = - new Qt_widget_demo_tab - (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 (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 (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 (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 (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 (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 (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 (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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/MyWindow_overlay.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -#include "arrangement_2.h" -#include "forms.h" -#include "qt_layer.h" -#include "demo_tab.h" -#include "overlay_functor.h" - -#include - -/*! 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 indexes; - std::list 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 (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 (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 indexes, - std::list /* 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 *w_demo_p_new = - static_cast *> - (myBar->currentPage()); - - QCursor old = w_demo_p_new->cursor(); - w_demo_p_new->setCursor(Qt::WaitCursor); - - Qt_widget_demo_tab *w_demo_p1, *w_demo_p2; - - int ind1, ind2; - - ind1 = indexes.front(); - ind2 = indexes.back(); - - w_demo_p1 = - static_cast *> - (myBar->page( ind1 )); - - w_demo_p2 = - static_cast *> - (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 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 *w_demo_p_new = - static_cast *> - (myBar->currentPage()); - - QCursor old = w_demo_p_new->cursor(); - w_demo_p_new->setCursor(Qt::WaitCursor); - - Qt_widget_demo_tab *w_demo_p1, *w_demo_p2; - - int ind1, ind2; - - ind1 = indexes.front(); - ind2 = indexes.back(); - - w_demo_p1 = - static_cast *> - (myBar->page( ind1 )); - - w_demo_p2 = - static_cast *> - (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 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 *w_demo_p_new = - static_cast *> - (myBar->currentPage()); - - QCursor old = w_demo_p_new->cursor(); - w_demo_p_new->setCursor(Qt::WaitCursor); - - Qt_widget_demo_tab *w_demo_p1, *w_demo_p2; - - int ind1, ind2; - - ind1 = indexes.front(); - ind2 = indexes.back(); - - w_demo_p1 = - static_cast *> - (myBar->page( ind1 )); - - w_demo_p2 = - static_cast *> - (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 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 (myBar->page(i)); - if (w_demo_p->index == index) - return i; - } - } - return -1; -} - - diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/overlay_functor.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp cgal-4.8/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/qt_layer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -#include "qt_layer.h" -#include "demo_tab.h" -#include - -/*! 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 (myBar->currentPage()); - - TraitsType t = w_base_p->traits_type; - - switch ( t ) { - case SEGMENT_TRAITS: - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (myBar->currentPage()); - w_demo_p->lock(); - w_demo_p->draw(); - w_demo_p->unlock(); - break; - } - case POLYLINE_TRAITS: - { - Qt_widget_demo_tab *w_demo_p = - static_cast *> - (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 *w_demo_p = - static_cast *> - (myBar->currentPage()); - w_demo_p->lock(); - w_demo_p->draw(); - w_demo_p->unlock(); -#endif - break; - } - } - - -} - diff -Nru cgal-4.7/demo/Arrangement_on_surface_2/old_demo/qt_layer.h cgal-4.8/demo/Arrangement_on_surface_2/old_demo/qt_layer.h --- cgal-4.7/demo/Arrangement_on_surface_2/old_demo/qt_layer.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/old_demo/qt_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 - -#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 -Nru cgal-4.7/demo/Arrangement_on_surface_2/Utils.h cgal-4.8/demo/Arrangement_on_surface_2/Utils.h --- cgal-4.7/demo/Arrangement_on_surface_2/Utils.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Arrangement_on_surface_2/Utils.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,9 +12,6 @@ // This file is provided 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 #ifndef CGAL_ARRANGEMENTS_DEMO_UTILS_H @@ -342,12 +339,12 @@ double operator() ( const Point_2& p, const X_monotone_curve_2& c ) const { - Seg_const_it seg_it_s = c.begin_subcurves(); + Seg_const_it seg_it_s = c.subcurves_begin(); bool first = true; FT min_dist = 0; - while (seg_it_s != c.end_subcurves()) + while (seg_it_s != c.subcurves_end()) { Segment_2 seg = *seg_it_s; FT dist = this->squared_distance( p, seg ); diff -Nru cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2.cpp cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2.cpp --- cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - - -#include - - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "boolean_operations_2.h" -#include "typedefs.h" -#include "boolean_operations_2_toolbar.h" -#include "Qt_widget_circ_polygon.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#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 -#include -//#include - -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 red_pgns_list; - myWin->red_set.polygons_with_holes(std::back_inserter(red_pgns_list)); - std::list::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 blue_pgns_list; - myWin->blue_set.polygons_with_holes(std::back_inserter(blue_pgns_list)); - std::list::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 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::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 blue_pgns_list; - int num_of_blue_pgns = blue_pgns_list.size(); - out_file << num_of_blue_pgns << std::endl; - std::list::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 -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 reader; - std::vector circ_polygons; - std::vector 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::iterator itr1 = circ_polygons.begin(); - for(itr1 = circ_polygons.begin(); - itr1 != circ_polygons.end(); - ++itr1) - { - box = box + itr1->bbox(); - } - std::vector::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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 -Nru cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2.h cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2.h --- cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -// 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 - -#include -#include - -#include "typedefs.h" - -#include -#include "Qt_widget_circ_polygon.h" -#include -#include - - -#include - -#include -#include -#include -#include -#include -#include "boolean_operations_2_toolbar.h" -#include "Qt_widget_locate_layer.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -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 - 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 -Nru cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp --- cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - -#include - -#include "boolean_operations_2_toolbar.h" -#include "boolean_operations_2.h" - -// icons -#include -#include "icons/insert_circle.xpm" -#include "icons/insert_polygon.xpm" -#include "icons/locate.xpm" - - - -#include - - -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 -Nru cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h --- cgal-4.7/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/boolean_operations_2_toolbar.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef BOOLEAN_OPERATIONS_2_TOOLBAR_H -#define BOOLEAN_OPERATIONS_2_TOOLBAR_H - -#include -#include - - - -#include -#include -//#include -#include "Qt_widget_get_circ_polygon.h" - -#include -#include - - -#include -#include -#include -#include -#include -#include -#include -#include - - - -#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 getsimplebut; - CGAL::Qt_widget_get_circle getcirclebut; - Qt_widget_locate_layer* locatebut; - -};//end class - - -#endif diff -Nru cgal-4.7/demo/Boolean_set_operations_2/CMakeLists.txt cgal-4.8/demo/Boolean_set_operations_2/CMakeLists.txt --- cgal-4.7/demo/Boolean_set_operations_2/CMakeLists.txt 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project( Boolean_operations_2 ) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Boolean_set_operations_2/data/vlsi_1.dxf cgal-4.8/demo/Boolean_set_operations_2/data/vlsi_1.dxf --- cgal-4.7/demo/Boolean_set_operations_2/data/vlsi_1.dxf 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/data/vlsi_1.dxf 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Boolean_set_operations_2/help/index.html cgal-4.8/demo/Boolean_set_operations_2/help/index.html --- cgal-4.7/demo/Boolean_set_operations_2/help/index.html 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/help/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ - - - - Boolean operations on polygons - - - -

How to use the Boolean operations on polygons Demo

-
- Main Functionality -

- Editing - -

 

-

 

-

 

-

 

- -

-  

-

-  

-

- Reset application

- 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) - -

-  

-

-  

-

- Create a new window

- 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. - -

-  

-

-  

-

- Reading input from DXF file

- 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. - -

-  

-

-  

-

- Writing input to file

- 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. - - -

-  

-

-  

-

Print -

- 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. - - -

-  

-

-  

-

- Close the current window

- 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. - -

-  

-

-  

-

- Quit the application

- 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. - - -

-  

-

-  

-

- Perform a boolean operation

- 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. - - -

-  

-

-  

-

- Set the current active polygons (red or blue)

- 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. - - -

-  

-

-  

-

- Insert circular polygon

- 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. - - -

-  

-

-  

-

- Insert circle

- 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. - - -

-  

-

-  

-

- Locate polygon

- 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. - - -

-  

-

-  

-

- Make current result blue

- Left click on the "Make Result Blue" button layer. Current result will replace - the blue polygons, and the red polygons will be deleted. - - -

-  

-

-  

-

- Make current result red

- Left click on the "Make Result Red" button layer. Current result will replace - the red polygons, and the blue polygons will be deleted. - - -

-  

-

-  

-

- Refresh

- Left click on the refresh button. All polygons will be redrawn to the widget. - - -

-  

-

-  

-

- Delete all blue polygons

- Left click on the "Delete Blue Polygons" button layer, all blue polygons will be deleted. - - -

-  

-

-  

-

- Delete all red polygons

- Left click on the "Delete Red Polygons" button layer, all red polygons will be deleted. - - - - - - - - -
-
- - -Last modified: Fri May 16 14:53:31 MEST 2003 - - - Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/comp_P.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/comp_P.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/comp_P.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/comp_P.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/comp_P.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/comp_P.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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.************", -"************--******************", -"************--******************", -"************--******************", -"************--******************", -"***********@--#*****************", -"**********------****************", -"********************************", -"********************************", -"********************************", -"********************************", -"********************************", -"********************************", -"********************************", -"********************************", -"********************************" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/comp_Q.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/comp_Q.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/comp_Q.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/comp_Q.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/comp_Q.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/comp_Q.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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;;&&&&&&&&&&&&", -"&&&&&&&&&&&&@.###+=&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&*##&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&*##;&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&**;#&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/del_P.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/del_P.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/del_P.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/del_P.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/del_P.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/del_P.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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.@oOO+ OOOOOO", -"OOOOO +OOOO +@OOOOo@.OOO+ OOOOO", -"OOOOO +OOOOO +OOOOO@@OOO+ OOOOO", -"OOOO +OOOOOOO +OOOO@@OOOO+ OOOO", -"OOOO +OOOOOOO@ +OOX@.OOOO+ OOOO", -"OOOO +OOOOOOO@@ +X.@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/del_Q.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/del_Q.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/del_Q.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/del_Q.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/del_Q.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/del_Q.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@:$&& &&&&&&&", -"&&&&&&&& ;&&&&&&&&&&&&; &&&&&&&&", -"&&&&&&&&& ;&&&&&&&&; &&&&&&&&&", -"&&&&&&&&&&& ;;;; &&&&&&&&&&&", -"&&&&&&&&&&&&&& &&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/diff_PQ.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/diff_PQ.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/diff_PQ.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/diff_PQ.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/diff_PQ.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/diff_PQ.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/diff_QP.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/diff_QP.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/diff_QP.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/diff_QP.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/diff_QP.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/diff_QP.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/insert_circle.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/insert_circle.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/insert_circle.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/insert_circle.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/insert_circle.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/insert_circle.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/insert_polygon.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/insert_polygon.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/insert_polygon.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/insert_polygon.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/insert_polygon.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/insert_polygon.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/intersection.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/intersection.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/intersection.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/intersection.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/intersection.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/intersection.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/locate.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/locate.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/locate.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/locate.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/locate.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/locate.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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**********", -"************# #************", -"*************** ***************", -"*************** ***************", -"*************** ***************", -"*************** ***************", -"*************** ***************", -"********************************", -"********************************" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/make_P.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/make_P.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/make_P.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/make_P.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/make_P.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/make_P.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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**.-----------&&&&&", -"&&&&&&-----******---------&&&&&&", -"&&&&&&--------------------&&&&&&", -"&&&&&&&------------------&&&&&&&", -"&&&&&&&&----------------&&&&&&&&", -"&&&&&&&&&--------------&&&&&&&&&", -"&&&&&&&&&&&@--------@&&&&&&&&&&&", -"&&&&&&&&&&&&&@----@&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/make_Q.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/make_Q.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/make_Q.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/make_Q.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/make_Q.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/make_Q.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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..%%%%%%%=====", -"======%%%%%%+@--- #%%%%%%%======", -"======%%%%%%%%%;--o%%%%%%%======", -"=======%%%%%%%%%o:-o%%%%%=======", -"========%%%%%%%%%*@-$%%%========", -"=========%%%%%%%%%%%%%%=========", -"===========O%%%%%%%%O===========", -"=============O%%%%O=============", -"================================", -"================================", -"================================", -"================================" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/mink_sum.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/mink_sum.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/mink_sum.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/mink_sum.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/mink_sum.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/mink_sum.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/refresh.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/refresh.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/refresh.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/refresh.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/refresh.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/refresh.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/symm_diff.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/symm_diff.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/symm_diff.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/symm_diff.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/symm_diff.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/symm_diff.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Boolean_set_operations_2/icons/union.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Boolean_set_operations_2/icons/union.bmp differ diff -Nru cgal-4.7/demo/Boolean_set_operations_2/icons/union.xpm cgal-4.8/demo/Boolean_set_operations_2/icons/union.xpm --- cgal-4.7/demo/Boolean_set_operations_2/icons/union.xpm 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/icons/union.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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@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 -Nru cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h --- cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_circle_segment_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_CIRCLE_SEGMENT_2_H -#define CGAL_QT_WIDGET_CIRCLE_SEGMENT_2_H - -#include -#include -#include -#include - -namespace CGAL -{ - template < class Kernel, bool Filter > -CGAL::Qt_widget & -operator<<(CGAL::Qt_widget & widget, - const CGAL::_Circle_segment_2 &arc) -{ - if(arc.orientation() == COLLINEAR) - { - typedef Simple_cartesian 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::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 -Nru cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h --- cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_circ_polygon.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_CIRC_POLYGON_H -#define CGAL_QT_WIDGET_CIRC_POLYGON_H - -#include -#include -#include -#include -#include -#include - -namespace CGAL -{ - template - Qt_widget& operator<<(Qt_widget& w, const General_polygon_2& pgn) - { - typedef typename General_polygon_2::Curve_const_iterator CI; - typedef Simple_cartesian DK; - typedef DK::Point_2 DPT; - typedef CGAL::Polygon_2 DPGN; - - std::list > 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 >::iterator it = pair_list.begin(); - it != pair_list.end(); - ++it) - { - DPT pt(it->first, it->second); - app_pgn.push_back(pt); - } - - w< - -#ifndef CGAL_QT_WIDGET_GET_CIRC_POLYGON_H -#define CGAL_QT_WIDGET_GET_CIRC_POLYGON_H - -#include -#include -#include -#include "Qt_widget_circle_segment_2.h" -#include "Qt_widget_X_monotone_circle_segment_2.h" -#include - -namespace CGAL -{ - template - class Qt_widget_get_circ_polygon : public Qt_widget_layer - { - protected: - typedef Arr_circle_segment_traits_2 Traits_2; - typedef General_polygon_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_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 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; isetRasterOp(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 xcurves_vec; - xcurves_vec.reserve(3); - make_x(m_old_arc, std::back_inserter(xcurves_vec)); - for(unsigned int i=0; im_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 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 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 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 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 -Nru cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp --- cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_locate_layer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 -Nru cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h --- cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_locate_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_LOCATE_LAYER_H -#define CGAL_QT_WIDGET_LOCATE_LAYER_H - -#include -#include - -#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 -Nru cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h --- cgal-4.7/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/Qt_widget_X_monotone_circle_segment_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H -#define CGAL_IO_QT_WIDGET_CIRCULAR_ARC_2_H - -#include -#include -#include -#include - -namespace CGAL { - -template < class Kernel, bool Filter > -CGAL::Qt_widget & -operator<<(CGAL::Qt_widget & widget, - const CGAL::_X_monotone_circle_segment_2 &arc) -{ - if(arc.is_linear()) - { - typedef Simple_cartesian 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::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 -Nru cgal-4.7/demo/Boolean_set_operations_2/typedefs.h cgal-4.8/demo/Boolean_set_operations_2/typedefs.h --- cgal-4.7/demo/Boolean_set_operations_2/typedefs.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/demo/Boolean_set_operations_2/typedefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#ifndef CGAL_TYPEDEFS_H -#define CGAL_TYPEDEFS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CGAL_USE_GMP - - #include - - typedef CGAL::Gmpq Base_nt; - -#else - - #include - #include - - typedef CGAL::Quotient Base_nt; - -#endif - -typedef CGAL::Lazy_exact_nt Coord_type; - -// instead of -//typedef CGAL::Cartesian Kernel; -// workaround for VC++ -struct Kernel : public CGAL::Cartesian {}; - -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 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_with_holes; -typedef CGAL::General_polygon_set_2 Polygon_set; -typedef Polygon_with_holes::Hole_const_iterator Hole_const_iterator; - - -typedef CGAL::Polygon_2 Linear_polygon_2; -typedef CGAL::Polygon_with_holes_2 Linear_polygon_with_holes_2; -#endif diff -Nru cgal-4.7/demo/CGAL_ipelets/CMakeLists.txt cgal-4.8/demo/CGAL_ipelets/CMakeLists.txt --- cgal-4.7/demo/CGAL_ipelets/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/CGAL_ipelets/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -17,8 +17,6 @@ #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 ) @@ -30,27 +28,39 @@ 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}) + 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() - 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 ( IPE_FOUND AND IPE_VERSION) if (WITH_IPE_7) add_definitions(-DCGAL_USE_IPE_7) endif() diff -Nru cgal-4.7/demo/Envelope_3/CMakeLists.txt cgal-4.8/demo/Envelope_3/CMakeLists.txt --- cgal-4.7/demo/Envelope_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +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.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane1.txt cgal-4.8/demo/Envelope_3/data/planes/plane1.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane1.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane2.txt cgal-4.8/demo/Envelope_3/data/planes/plane2.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane2.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane3.txt cgal-4.8/demo/Envelope_3/data/planes/plane3.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane3.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane3.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane4.txt cgal-4.8/demo/Envelope_3/data/planes/plane4.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane4.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane4.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -2 -0.0 0.0 -1.0 0.0 -1.0 0.0 -1.0 0.0 - diff -Nru cgal-4.7/demo/Envelope_3/data/planes/plane5.txt cgal-4.8/demo/Envelope_3/data/planes/plane5.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane5.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane5.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane6.txt cgal-4.8/demo/Envelope_3/data/planes/plane6.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane6.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane6.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane7.txt cgal-4.8/demo/Envelope_3/data/planes/plane7.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane7.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane7.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/planes/plane8.txt cgal-4.8/demo/Envelope_3/data/planes/plane8.txt --- cgal-4.7/demo/Envelope_3/data/planes/plane8.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/planes/plane8.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/spheres/sphere1.txt cgal-4.8/demo/Envelope_3/data/spheres/sphere1.txt --- cgal-4.7/demo/Envelope_3/data/spheres/sphere1.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/spheres/sphere1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/spheres/sphere2.txt cgal-4.8/demo/Envelope_3/data/spheres/sphere2.txt --- cgal-4.7/demo/Envelope_3/data/spheres/sphere2.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/spheres/sphere2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -2 -0 0 0 9 -4 0 1 9 diff -Nru cgal-4.7/demo/Envelope_3/data/spheres/sphere3.txt cgal-4.8/demo/Envelope_3/data/spheres/sphere3.txt --- cgal-4.7/demo/Envelope_3/data/spheres/sphere3.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/spheres/sphere3.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle1.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle1.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle1.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle2.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle2.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle2.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle2.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle3.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle3.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle3.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle3.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle4.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle4.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle4.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle4.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle5.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle5.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle5.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle5.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/data/triangles/triangle6.txt cgal-4.8/demo/Envelope_3/data/triangles/triangle6.txt --- cgal-4.7/demo/Envelope_3/data/triangles/triangle6.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/data/triangles/triangle6.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/envelope_3.cpp cgal-4.8/demo/Envelope_3/envelope_3.cpp --- cgal-4.7/demo/Envelope_3/envelope_3.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/envelope_3.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 <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 -Nru cgal-4.7/demo/Envelope_3/envelope_3.h cgal-4.8/demo/Envelope_3/envelope_3.h --- cgal-4.7/demo/Envelope_3/envelope_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/envelope_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef ENVELOPE_3_H -#define ENVELOPE_3_H - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 - 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 surfaces; - unsigned int num_of_surfaces = 0; - in_file >> num_of_surfaces; - CGAL::Random rand; - for (unsigned int i=0 ; ipoint().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 -Nru cgal-4.7/demo/Envelope_3/help/index.html cgal-4.8/demo/Envelope_3/help/index.html --- cgal-4.7/demo/Envelope_3/help/index.html 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/help/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - 3D envelopes of surfaces - - - -

How to use the 3D envelopes Demo

-
- Main Functionality -
-

 

-

 

-

 

-

 

- -

-  

-

-  

-

- Reset application

- 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) - -

-  

-

-  

-

- Create a new window

- 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. - -

-  

-

-  

-

- Reading input from triangles file

- 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. - -

-  

-

-  

-

- Reading input from spheres file

- 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. - -

-  

-

-  

-

- Reading input from planes file

- 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. - -

-  

-

-  

-

Print -

- 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. - - -

-  

-

-  

-

- Close the current window

- 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. - -

-  

-

-  

-

- Quit the application

- 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. -
-
- - Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Envelope_3/icons/edges.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Envelope_3/icons/edges.bmp differ diff -Nru cgal-4.7/demo/Envelope_3/icons/edges.xpm cgal-4.8/demo/Envelope_3/icons/edges.xpm --- cgal-4.7/demo/Envelope_3/icons/edges.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/icons/edges.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 */ -" ", -" ", -" ", -" . ", -" .. ", -" ... ", -" .... ", -" .. .. ", -" .. .. ", -" .. ............... ", -" .. .............. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .. .. ", -" .. .... ", -" .. ... ", -" .. .. ", -" .. .. ", -" .. .. ", -" .. .. ", -" ........................ ", -" ......................... ", -" ", -" ", -" ", -" " -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Envelope_3/icons/faces.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Envelope_3/icons/faces.bmp differ diff -Nru cgal-4.7/demo/Envelope_3/icons/faces.xpm cgal-4.8/demo/Envelope_3/icons/faces.xpm --- cgal-4.7/demo/Envelope_3/icons/faces.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/icons/faces.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Envelope_3/icons/vertices.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Envelope_3/icons/vertices.bmp differ diff -Nru cgal-4.7/demo/Envelope_3/icons/vertices.xpm cgal-4.8/demo/Envelope_3/icons/vertices.xpm --- cgal-4.7/demo/Envelope_3/icons/vertices.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/icons/vertices.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Envelope_3/typedefs.h cgal-4.8/demo/Envelope_3/typedefs.h --- cgal-4.7/demo/Envelope_3/typedefs.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Envelope_3/typedefs.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Efi Fogel - -#ifndef CGAL_TYPEDEFS_H -#define CGAL_TYPEDEFS_H - -#include -#include -#include -#include -#include -#ifdef CGAL_USE_CORE -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef CGAL_USE_GMP - #include - typedef CGAL::Gmpq Base_nt; -#else - #include - #include - typedef CGAL::Quotient Base_nt; -#endif - -typedef CGAL::Lazy_exact_nt Coord_type; -// instead of -//typedef CGAL::Cartesian Kernel; -// workaround for VC++ -struct Kernel : public CGAL::Cartesian {}; - -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 Base_traits; -typedef Base_traits::Surface_3 Base_triangle_3; -typedef CGAL::Env_surface_data_traits_3 - 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 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 Rat_kernel; -typedef Rat_kernel::Point_3 Rat_point_3; -typedef CGAL::Cartesian Alg_kernel; -typedef Alg_kernel::Point_2 Sphere_point_2; - -// instead of -//typedef CGAL::Arr_conic_traits_2 -// Conic_traits_2; -// workaround for VC++ -struct Conic_traits_2 : public CGAL::Arr_conic_traits_2 {} ; - -typedef CGAL::Env_sphere_traits_3 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 - 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 - 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 Base_plane_traits_3; -typedef Base_plane_traits_3::Surface_3 Base_plane_3; -typedef CGAL::Env_surface_data_traits_3 - 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 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_kernel; -typedef Double_kernel::Point_2 Double_point_2; -typedef CGAL::Polygon_2 Polygon_2; - -template -class Faces_visitor : - public CGAL::Arr_overlay_traits_2 -{ -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 -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 -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 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 -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 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 - 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 -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 pgns; - construct_polygon(w, f->outer_ccb(), std::back_inserter(pgns), is_unb, - false); - - std::list::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 -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(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 -Nru cgal-4.7/demo/Kinetic_data_structures/CMakeLists.txt cgal-4.8/demo/Kinetic_data_structures/CMakeLists.txt --- cgal-4.7/demo/Kinetic_data_structures/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project( Kinetic_data_structures_demo ) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/after002 cgal-4.8/demo/Kinetic_data_structures/data/after002 --- cgal-4.7/demo/Kinetic_data_structures/data/after002 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/after002 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/after010 cgal-4.8/demo/Kinetic_data_structures/data/after010 --- cgal-4.7/demo/Kinetic_data_structures/data/after010 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/after010 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/after088 cgal-4.8/demo/Kinetic_data_structures/data/after088 --- cgal-4.7/demo/Kinetic_data_structures/data/after088 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/after088 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/after103 cgal-4.8/demo/Kinetic_data_structures/data/after103 --- cgal-4.7/demo/Kinetic_data_structures/data/after103 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/after103 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/after106 cgal-4.8/demo/Kinetic_data_structures/data/after106 --- cgal-4.7/demo/Kinetic_data_structures/data/after106 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/after106 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before002 cgal-4.8/demo/Kinetic_data_structures/data/before002 --- cgal-4.7/demo/Kinetic_data_structures/data/before002 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before002 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before010 cgal-4.8/demo/Kinetic_data_structures/data/before010 --- cgal-4.7/demo/Kinetic_data_structures/data/before010 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before010 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before088 cgal-4.8/demo/Kinetic_data_structures/data/before088 --- cgal-4.7/demo/Kinetic_data_structures/data/before088 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before088 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before103 cgal-4.8/demo/Kinetic_data_structures/data/before103 --- cgal-4.7/demo/Kinetic_data_structures/data/before103 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before103 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before106 cgal-4.8/demo/Kinetic_data_structures/data/before106 --- cgal-4.7/demo/Kinetic_data_structures/data/before106 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before106 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/data/before107 cgal-4.8/demo/Kinetic_data_structures/data/before107 --- cgal-4.7/demo/Kinetic_data_structures/data/before107 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/data/before107 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/control_coin.h cgal-4.8/demo/Kinetic_data_structures/include/control_coin.h --- cgal-4.7/demo/Kinetic_data_structures/include/control_coin.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/control_coin.h 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -#define CGAL_USE_COIN diff -Nru cgal-4.7/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h cgal-4.8/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h --- cgal-4.7/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/Qt_Delaunay_stable_subset_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -#ifndef QT_KINETIC_DELAUNAY_SS_2_H -#define QT_KINETIC_DELAUNAY_SS_2_H - -#include -//#include -#include -#include -#include - -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 Qt_Delaunay_stable_subset_2: public Ref_counted > -{ - typedef Qt_Delaunay_stable_subset_2 This; - typedef Qt_Delaunay_stable_subset_2 Qt_del; - typedef internal::Triangulation_data_structure_helper_2 TDS_helper; -public: - //typedef Kinetic_Delaunay Kinetic_Delaunay; - //typedef CGAL::Ref_counted_handle 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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_examiner_viewer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_INTERNAL_COIN_SIMULATOR_GUI_H -#define CGAL_KINETIC_IO_INTERNAL_COIN_SIMULATOR_GUI_H - -#include - -//#ifdef HAVE_INVENTOR_QT_SOQT_H -//#include -#include -#include -//#include -//#else -//#ifdef HAVE_COIN2_INVENTOR_QT_SOQT_H -//#include -//#include -//#include -//#endif -//#endif - -#include -#include -//#include -#include - -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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_handle.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_handle.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_handle.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_handle.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_COIN_POINTER_H -#define CGAL_KINETIC_IO_COIN_POINTER_H -#include -#include -#include - -//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 SoQt_handle: public boost::intrusive_ptr -{ -private: - typedef boost::intrusive_ptr P; -public: - //! Pointer constructor - SoQt_handle(T* t): P(t){} - //! default constructor - SoQt_handle(): P(){} -}; - -} //namespace CGAL -#endif diff -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_moving_points_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_QT_MOVING_POINT_TABLE_3_H -#define CGAL_KINETIC_QT_MOVING_POINT_TABLE_3_H -#include -#include -#include -#include "SoQt_handle.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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 SoQt_moving_points_3: public Ref_counted< SoQt_moving_points_3 > -{ -protected: - typedef SoQt_moving_points_3 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(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(data); - const SoEvent *event= eventCB->getEvent(); - CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId())); - const SoKeyboardEvent *kbe= reinterpret_cast(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 coords_; - SoQt_handle spheres_; - SoQt_handle points_; - SoQt_handle style_; - SoQt_handle labels_; - CGAL::Sign direction_of_time_; - SoOneShotSensor* soss_; - typename SimTraits::Kinetic_kernel::Reverse_time rt_; -}; - -template -void SoQt_moving_points_3::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(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(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 -void SoQt_moving_points_3::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(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 c= new SoCoordinate3; - c->point.setNum(num); - SoQt_handle 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 ps= new SoPointSet; - ps->numPoints.setValue(num); - points_->setPart("shape", ps.get()); - - SoQt_handle 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 smat= new SoMaterial; - smat->diffuseColor.setValue(.8, 0,0); - for (int i=0; i< num; ++i) { - SoQt_handle kit = new SoShapeKit; - spheres_->addChild(kit.get()); - SoQt_handle s= new SoSphere; - s->radius.setValue(radius_); - kit->setPart("shape", s.get()); - SoQt_handle tr= new SoTransform; - kit->setPart("localTransform", tr.get()); - kit->setPart("material", smat.get()); - } - } - - if (draw_labels_ != 0) { - SoQt_handle 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 k = new SoShapeKit; - labels_->addChild(k.get()); - SoQt_handle s= new SoText2; - std::string name = kit->string(); - s->string.setValue(name.c_str()); - k->setPart("shape", s.get()); - SoQt_handle tr= new SoTransform; - k->setPart("localTransform", tr.get()); - k->setPart("material", mat.get()); - } - root()->addChild(labels_.get()); - } -} - - -template -void SoQt_moving_points_3::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 -void SoQt_moving_points_3::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 -void SoQt_moving_points_3:: 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(c); - SoSphere *s= SO_GET_PART(kit, "shape", SoSphere); - s->radius.setValue(radius_); - } - } -} - - -template -void SoQt_moving_points_3::set_point_size(double ps) -{ - point_size_=ps; - style_->pointSize.setValue(ps); -} - - -template -void SoQt_moving_points_3::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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_moving_weighted_points_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_QT_MOVING_WEIGHTED_POINT_TABLE_3_H -#define CGAL_KINETIC_QT_MOVING_WEIGHTED_POINT_TABLE_3_H -#include -#include -#include -#include "SoQt_handle.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include - -#include -#include -#include -#include -#include - -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 SoQt_moving_weighted_points_3: public Ref_counted< SoQt_moving_weighted_points_3 > -{ -protected: - typedef SoQt_moving_weighted_points_3 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(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(data); - const SoEvent *event= eventCB->getEvent(); - CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId())); - const SoKeyboardEvent *kbe= reinterpret_cast(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 coords_; - SoQt_handle spheres_; - SoQt_handle points_; - SoQt_handle style_; - SoQt_handle labels_; - CGAL::Sign direction_of_time_; - SoOneShotSensor* soss_; - typename Traits::Kinetic_kernel::Reverse_time rt_; -}; - -template -void SoQt_moving_weighted_points_3::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(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(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 -void SoQt_moving_weighted_points_3::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(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 c= new SoCoordinate3; - c->point.setNum(num); - SoQt_handle 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 ps= new SoPointSet; - ps->numPoints.setValue(num); - points_->setPart("shape", ps.get()); - - SoQt_handle 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 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 kit = new SoShapeKit; - spheres_->addChild(kit.get()); - SoQt_handle s= new SoSphere; - s->radius.setValue(.01); - kit->setPart("shape", s.get()); - SoQt_handle tr= new SoTransform; - kit->setPart("localTransform", tr.get()); - kit->setPart("material", smat.get()); - } - } - - if (draw_labels_ != 0) { - SoQt_handle 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 k = new SoShapeKit; - labels_->addChild(k.get()); - SoQt_handle s= new SoText2; - std::string name = kit->string(); - s->string.setValue(name.c_str()); - k->setPart("shape", s.get()); - SoQt_handle tr= new SoTransform; - k->setPart("localTransform", tr.get()); - k->setPart("material", mat.get()); - } - root()->addChild(labels_.get()); - } -} - - -template -void SoQt_moving_weighted_points_3::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 -void SoQt_moving_weighted_points_3::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 -void SoQt_moving_weighted_points_3::set_point_size(double ps) -{ - point_size_=ps; - style_->pointSize.setValue(ps); -} - - -template -void SoQt_moving_weighted_points_3::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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_triangulation_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_COIN_KINETIC_TRIANGULATION_3_H -#define CGAL_COIN_KINETIC_TRIANGULATION_3_H - -#include - -// Inventor parts -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "SoQt_handle.h" - -#include -#include - -namespace CGAL { namespace Kinetic { - -//! A class to display a 3D triangulation. -/*! - -*/ -template -class SoQt_triangulation_3: public Ref_counted > -{ -protected: - - typedef SoQt_triangulation_3 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 parent_; - CGAL::SoQt_handle facets_kit_; - CGAL::SoQt_handle facets_; - CGAL::SoQt_handle edges_kit_; - CGAL::SoQt_handle edges_; - CGAL::SoQt_handle 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(data); - const SoEvent *event= eventCB->getEvent(); - CGAL_assertion(event->isOfType(SoKeyboardEvent::getClassTypeId())); - const SoKeyboardEvent *kbe= reinterpret_cast(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 -void SoQt_triangulation_3::set_scene_graph_parent(SoSeparator* sep) -{ - parent_=sep; - - CGAL::SoQt_handle 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 ap= new SoAppearanceKit; - { - CGAL::SoQt_handle 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 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 ap= new SoAppearanceKit; - { - CGAL::SoQt_handle 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 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 -void SoQt_triangulation_3::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 -Nru cgal-4.7/demo/Kinetic_data_structures/include/SoQt_widget_3.h cgal-4.8/demo/Kinetic_data_structures/include/SoQt_widget_3.h --- cgal-4.7/demo/Kinetic_data_structures/include/SoQt_widget_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/include/SoQt_widget_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_QT_SIMULATOR_3_H_ -#define CGAL_KINETIC_IO_QT_SIMULATOR_3_H_ -#include -#include "SoQt_handle.h" -#include -#include "SoQt_examiner_viewer.h" -#include -#include -#include -#include -#include - -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 SoQt_widget_3: - public Ref_counted > -{ -protected: - typedef SoQt_widget_3 This; - typedef Gui_base Graphical_base; - typedef typename Simulator_t::Time Time; - typedef typename internal::Qt_core_listener 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; - void set_root(SoSeparator* p) { - parent_=SoQt_handle(p); - } - SoQt_handle 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; - //friend class Multi_listener; - - 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; - void set_root(SoSeparator* p) { - parent_=SoQt_handle(p); - } - SoQt_handle parent_; - }; -public: - - typedef Multi_listener_base Listener; - friend class Multi_listener_base ; -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 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 -Nru cgal-4.7/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp cgal-4.8/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp --- cgal-4.7/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS -#include -#endif - -template -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, - CGAL::Kinetic::Delaunay_triangulation_face_base_2 > TDS; - typedef CGAL::Delaunay_triangulation_2 Del; - typedef CGAL::Kinetic::Delaunay_triangulation_recent_edges_visitor_2 Visitor; - typedef CGAL::Kinetic::Delaunay_triangulation_2 KDel; - typedef CGAL::Kinetic::Qt_widget_2 Qt_gui; - typedef CGAL::Kinetic::Qt_moving_points_2 Qt_mps; - typedef CGAL::Kinetic::Qt_triangulation_2 Qt_triangulation; - typedef CGAL::Kinetic::Enclosing_box_2 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 pts; - - for (int i=0; i< n; ++i) { - std::vector 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(&n), "Number of points to use.") - ("random-seed,s", boost::program_options::value(&seed), "The value to use for the random seed.") - ("degree,d", boost::program_options::value(&d), "The degree of the motions to use.") - ("file,f", boost::program_options::value(&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(argc, argv, n,d,seed, file); - } else { - //return run(argc, argv, n,d,seed, file); - } -} diff -Nru cgal-4.7/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp cgal-4.8/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp --- cgal-4.7/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/KDS_Delaunay_triangulation_stable_subset_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "Qt_Delaunay_stable_subset_2.h" -#include -#include -#include -#include - -#include -#include -#include -#include -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS -#include -#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(&n), "Number of points to use.") - ("degree,d", boost::program_options::value(&d), "The degree of the motions to use.") - ("file,f", boost::program_options::value(&file), "Read points from a file.") - ("threshold,t", boost::program_options::value(&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, - CGAL::Kinetic::Delaunay_triangulation_face_base_2 > TDS; - typedef CGAL::Delaunay_triangulation_2 Del; - typedef CGAL::Kinetic::Enclosing_box_2 EB; - typedef CGAL::Kinetic::Delaunay_triangulation_recent_edges_visitor_2 Visitor; - typedef CGAL::Kinetic::Delaunay_triangulation_2 KDel; - typedef CGAL::Kinetic::Qt_widget_2 Qt_gui; - typedef CGAL::Kinetic::Qt_moving_points_2 Qt_mps; - typedef CGAL::Kinetic::Qt_Delaunay_stable_subset_2 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 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 -Nru cgal-4.7/demo/Kinetic_data_structures/KDS_generate_data.cpp cgal-4.8/demo/Kinetic_data_structures/KDS_generate_data.cpp --- cgal-4.7/demo/Kinetic_data_structures/KDS_generate_data.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/KDS_generate_data.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#include - -#include -#include -#include -#if CGAL_USE_BOOST_PROGRAM_OPTIONS -#include -#endif - - -template -void generate(int n, int d, int num_coords) -{ - CGAL::Random rand; - for (int i=0; i< n; ++i) { - std::vector > 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 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(&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(&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(n,d,num_coords); - } - else { - generate(n,d,num_coords); - } - - return EXIT_SUCCESS; -} diff -Nru cgal-4.7/demo/Kinetic_data_structures/KDS_gui_2.cpp cgal-4.8/demo/Kinetic_data_structures/KDS_gui_2.cpp --- cgal-4.7/demo/Kinetic_data_structures/KDS_gui_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Kinetic_data_structures/KDS_gui_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#include -#include - -#include -#include - -#include - -/*! - \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 Gui; - typedef CGAL::Kinetic::Qt_moving_points_2 Qt_moving_points; - typedef CGAL::Kinetic::Insert_event Insert_event; - typedef Traits::Kinetic_kernel::Point_2 Moving_point; - typedef CGAL::Kinetic::Enclosing_box_2 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 -Nru cgal-4.7/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp cgal-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp --- cgal-4.7/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -124,11 +124,14 @@ 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())); @@ -138,6 +141,7 @@ 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]); diff -Nru cgal-4.7/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp cgal-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp --- cgal-4.7/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/Linear_cell_complex_3_subdivision.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,7 @@ * @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) + Smooth_old_vertex (LCC & alcc, LCC::size_type /* TODO amark*/):mlcc (alcc) { } @@ -128,8 +128,8 @@ if (m.number_of_darts () == 0) return; - unsigned int mark = m.get_new_mark (); - unsigned int treated = m.get_new_mark (); + 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. diff -Nru cgal-4.7/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp cgal-4.8/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp --- cgal-4.7/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/Linear_cell_complex_pqq_subdivision.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,7 @@ * @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) + Smooth_edge_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o) { } @@ -99,7 +99,7 @@ } private: LCC & mlcc; - unsigned int old; + LCC::size_type old; }; // Smooth an old vertex depending on the vertices of its incident facet and edge. @@ -111,7 +111,7 @@ * @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) + Smooth_vertex_pqq (LCC & alcc, LCC::size_type o):mlcc (alcc), old(o) { } @@ -214,7 +214,7 @@ } private: LCC & mlcc; - unsigned int old; + LCC::size_type old; }; @@ -225,8 +225,8 @@ if (m.number_of_darts () == 0) return; - unsigned int old = m.get_new_mark (); - unsigned int treated = m.get_new_mark (); + 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. diff -Nru cgal-4.7/demo/Linear_cell_complex/MainWindow.cpp cgal-4.8/demo/Linear_cell_complex/MainWindow.cpp --- cgal-4.7/demo/Linear_cell_complex/MainWindow.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/MainWindow.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -42,7 +42,6 @@ dialogsierpinskitriangle(this) { setupUi (this); - scene.lcc = new LCC; volumeListDock = new QDockWidget(QString(tr("Volume List")),this); @@ -74,7 +73,6 @@ QObject::connect(&dialogmesh, SIGNAL(accepted()), this, SLOT(onCreateMeshOk())); - this->viewer->setScene(&scene); connect_actions (); @@ -164,7 +162,7 @@ { QApplication::setOverrideCursor( Qt::WaitCursor ); - int mark = scene.lcc->get_new_mark (); + LCC::size_type mark = scene.lcc->get_new_mark (); scene.lcc->negate_mark (mark); std::vector cells; @@ -487,7 +485,7 @@ Dart_handle MainWindow::make_iso_cuboid(const Point_3 basepoint, LCC::FT lg) { - return scene.lcc->make_hexahedron(basepoint, + 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() @@ -502,6 +500,9 @@ (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 () @@ -724,7 +725,7 @@ // We remove the infinite volume and all its adjacent volumes. { std::stack toremove; - int mark_toremove=scene.lcc->get_new_mark(); + LCC::size_type mark_toremove=scene.lcc->get_new_mark(); toremove.push(ddh); CGAL::mark_cell(*scene.lcc, ddh, mark_toremove); for (LCC::Dart_of_cell_range<3>::iterator @@ -829,7 +830,7 @@ void MainWindow::on_actionSew3_same_facets_triggered() { - int mymark = scene.lcc->get_new_mark(); + LCC::size_type mymark = scene.lcc->get_new_mark(); mark_all_filled_and_visible_volumes(mymark); QApplication::setOverrideCursor (Qt::WaitCursor); @@ -990,8 +991,8 @@ scene.lcc->set_update_attributes(false); std::vector edges; - int treated = scene.lcc->get_new_mark(); - int treated2 = scene.lcc->get_new_mark(); + 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 ) @@ -1149,7 +1150,7 @@ itend(lcc.darts_of_orbit<1>(d1).end()); it!=itend; ++it) { vh = cdt.insert(lcc.point(it)); - vh->info()=it; + vh->info().dh=it; if( first==NULL ) { first=vh; @@ -1169,22 +1170,48 @@ 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().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 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_external) + 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_external = true; + 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))) @@ -1194,6 +1221,7 @@ } } } + for( CDT::Finite_edges_iterator eit = cdt.finite_edges_begin(), eitend = cdt.finite_edges_end(); eit != eitend; ++eit) { @@ -1228,12 +1256,31 @@ 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)); - - Dart_handle ndart= - CGAL::insert_cell_1_in_cell_2(lcc,va->info(),vb->info()); - va->info()=lcc.beta<2>(ndart); + 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; @@ -1485,7 +1532,7 @@ } } -void MainWindow::mark_all_filled_and_visible_volumes(int amark) +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(), @@ -1504,7 +1551,7 @@ std::vector::type> tofill; - int mark_volume = scene.lcc->get_new_mark(); + LCC::size_type mark_volume = scene.lcc->get_new_mark(); bool already_tofill; for (LCC::Attribute_range<3>::type::iterator @@ -1559,7 +1606,7 @@ std::vector::type> tohide; - int mark_volume = scene.lcc->get_new_mark(); + LCC::size_type mark_volume = scene.lcc->get_new_mark(); bool already_tohide; for (LCC::Attribute_range<3>::type::iterator @@ -1679,9 +1726,9 @@ std::vector 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(); + 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::iterator itvol=mengerVolumes.begin(); itvol!=mengerVolumes.end(); ++itvol) @@ -1994,7 +2041,7 @@ void MainWindow::process_full_slice(Dart_handle init, std::vector& faces, - int markVols) + LCC::size_type markVols) { Dart_handle d[12]; d[0]=scene.lcc->beta(init,1,2); @@ -2025,7 +2072,7 @@ void MainWindow::process_inter_slice(Dart_handle init, std::vector& faces, - int markVols) + LCC::size_type markVols) { Dart_handle d[24]; d[0]=init; @@ -2085,8 +2132,8 @@ // 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(); + LCC::size_type markVols = (scene.lcc)->get_new_mark(); + LCC::size_type markVertices = (scene.lcc)->get_new_mark(); std::vector faces; std::vector edges; @@ -2322,8 +2369,8 @@ std::vector edges; nbfacesinit = sierpinskiCarpetSurfaces.size(); - int markEdges = (scene.lcc)->get_new_mark(); - int markFaces = (scene.lcc)->get_new_mark(); + LCC::size_type markEdges = (scene.lcc)->get_new_mark(); + LCC::size_type markFaces = (scene.lcc)->get_new_mark(); for(std::vector::iterator itfaces=sierpinskiCarpetSurfaces.begin(); itfaces!=sierpinskiCarpetSurfaces.end(); ++itfaces) @@ -2446,7 +2493,7 @@ if (updateAttributesMethodTraversal)*/ { - int markVertices = (scene.lcc)->get_new_mark(); + LCC::size_type markVertices = (scene.lcc)->get_new_mark(); for(std::size_t i = 0; i < nbfacesinit; i++) { @@ -2546,7 +2593,7 @@ void MainWindow::sierpinski_carpet_compute_geometry() { - int markVertices = (scene.lcc)->get_new_mark(); + LCC::size_type markVertices = (scene.lcc)->get_new_mark(); for(std::size_t i = 0; i < nbfacesinit; i++) { @@ -2860,8 +2907,8 @@ // 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(); + LCC::size_type markSurfaces = (scene.lcc)->get_new_mark(); + LCC::size_type markVertices = (scene.lcc)->get_new_mark(); std::vector edges; std::vector vertices; @@ -3060,8 +3107,8 @@ std::vector edges; nbfacesinit = sierpinskiTriangleSurfaces.size(); - int markEdges = (scene.lcc)->get_new_mark(); - int markFaces = (scene.lcc)->get_new_mark(); + LCC::size_type markEdges = (scene.lcc)->get_new_mark(); + LCC::size_type markFaces = (scene.lcc)->get_new_mark(); for(std::vector::iterator itfaces=sierpinskiTriangleSurfaces.begin(); itfaces!=sierpinskiTriangleSurfaces.end(); ++itfaces) @@ -3247,8 +3294,8 @@ // 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(); + LCC::size_type markSurfaces = (scene.lcc)->get_new_mark(); + LCC::size_type markVertices = (scene.lcc)->get_new_mark(); std::vector edges; std::vector vertices; diff -Nru cgal-4.7/demo/Linear_cell_complex/MainWindow.h cgal-4.8/demo/Linear_cell_complex/MainWindow.h --- cgal-4.7/demo/Linear_cell_complex/MainWindow.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/MainWindow.h 2016-04-04 19:00:11.000000000 +0000 @@ -196,7 +196,7 @@ 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); + void mark_all_filled_and_visible_volumes(LCC::size_type amark); Dart_handle make_iso_cuboid(const Point_3 basepoint, LCC::FT lg); @@ -218,10 +218,10 @@ void split_vol_in_twentyseven(Dart_handle dh); void process_full_slice(Dart_handle init, std::vector& faces, - int markVols); + LCC::size_type markVols); void process_inter_slice(Dart_handle init, std::vector& faces, - int markVols); + LCC::size_type markVols); void sierpinski_carpet_copy_attributes_and_embed_vertex(Dart_handle dh, LCC::Point& p); diff -Nru cgal-4.7/demo/Linear_cell_complex/typedefs.h cgal-4.8/demo/Linear_cell_complex/typedefs.h --- cgal-4.7/demo/Linear_cell_complex/typedefs.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/typedefs.h 2016-04-04 19:00:11.000000000 +0000 @@ -175,14 +175,21 @@ typedef CGAL::Timer Timer; -typedef CGAL::Triangulation_2_filtered_projection_traits_3 P_traits; -typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; +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 P_traits; +typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + typedef CGAL::Triangulation_face_base_with_info_2 Fb1; typedef CGAL::Constrained_triangulation_face_base_2 Fb; diff -Nru cgal-4.7/demo/Linear_cell_complex/Viewer.cpp cgal-4.8/demo/Linear_cell_complex/Viewer.cpp --- cgal-4.7/demo/Linear_cell_complex/Viewer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/Viewer.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -31,12 +31,7 @@ : QGLViewer(CGAL::Qt::createOpenGLContext(),parent), wireframe(false), flatShading(true), edges(true), vertices(true), m_previous_scene_empty(true), are_buffers_initialized(false) - { - QGLFormat newFormat = this->format(); - newFormat.setSampleBuffers(true); - newFormat.setSamples(16); - this->setFormat(newFormat); } Viewer::~Viewer() @@ -296,207 +291,229 @@ are_buffers_initialized = true; } -void Viewer::compute_faces(Dart_handle dh) +void Viewer::compute_face(Dart_handle dh, LCC::size_type markface) { LCC &lcc = *scene->lcc; - for(LCC::One_dart_per_incident_cell_range<2,3>::iterator - dartIter=lcc.one_dart_per_incident_cell<2,3>(dh).begin(); - dartIter.cont(); ++dartIter) - { - 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; - } - //compute flat normals - LCC::Vector normal = CGAL::compute_normal_of_cell_2(lcc,dartIter); - normal = normal/(CGAL::sqrt(normal*normal)); - - if (lcc.beta<1,1,1>(dartIter)!=dartIter) - { - 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>(dartIter).begin(), - he_circ_end = lcc.darts_of_orbit<1>(dartIter).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() = he_circ; - if(previous!=NULL && previous != vh) - { cdt.insert_constraint(previous, vh); } - previous = vh; - } + CGAL::mark_cell(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, 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 = false; - } - //check if the facet is external or internal - std::queue face_queue; - face_queue.push(cdt.infinite_vertex()->face()); - while(! face_queue.empty() ) + // 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 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) { - CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); - if(!fh->info().is_external) + fh->info().is_process = true; + for(int i = 0; i <3; ++i) { - 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)); + } + else if (face_internal==NULL) { - if(!cdt.is_constrained(std::make_pair(fh, i))) - { - face_queue.push(fh->neighbor(i)); - } + face_internal = fh->neighbor(i); } } } + } + + if ( face_internal!=NULL ) + face_queue.push(face_internal); - //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) + while(! face_queue.empty() ) + { + CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); + if(!fh->info().is_process) { - if(!ffit->info().is_external) + fh->info().is_process = true; + fh->info().is_external = false; + for(int i = 0; i <3; ++i) { - smooth_normals.push_back(normal.x()); - smooth_normals.push_back(normal.y()); - smooth_normals.push_back(normal.z()); - - smooth_normals.push_back(normal.x()); - smooth_normals.push_back(normal.y()); - smooth_normals.push_back(normal.z()); - - smooth_normals.push_back(normal.x()); - smooth_normals.push_back(normal.y()); - smooth_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()); - - flat_normals.push_back(normal.x()); - flat_normals.push_back(normal.y()); - flat_normals.push_back(normal.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); + if(!cdt.is_constrained(std::make_pair(fh, i))) + { + face_queue.push(fh->neighbor(i)); + } } } } - else + + //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) { - 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>(dartIter).begin(); - orbitIter.cont(); ++orbitIter) + if(!ffit->info().is_external) { - //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()); + 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_edges(Dart_handle dh) +void Viewer::compute_edge(Dart_handle dh, LCC::size_type markedge) { LCC &lcc = *scene->lcc; - for(LCC::One_dart_per_incident_cell_range<1,3>::iterator - dartIter=lcc.one_dart_per_incident_cell<1,3>(dh).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); - 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()); - } + + CGAL::mark_cell(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_vertices(Dart_handle dh, bool empty) +void Viewer::compute_vertex(Dart_handle dh, LCC::size_type markvertex, bool& empty) { LCC &lcc = *scene->lcc; - for(LCC::One_dart_per_incident_cell_range<0,3>::iterator - dartIter=lcc.one_dart_per_incident_cell<0,3>(dh).begin(); - dartIter.cont(); ++dartIter) - { - const LCC::Point& p = lcc.point(dartIter); - 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(); + CGAL::mark_cell(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() @@ -517,18 +534,29 @@ 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() ) { - if (it->info().is_filled()) - compute_faces(lcc.dart_of_attribute<3>(it)); + 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); - compute_edges(lcc.dart_of_attribute<3>(it)); - compute_vertices(lcc.dart_of_attribute<3>(it), empty); - empty = false; + if ( !lcc.is_marked(dartIter, markedge) ) + compute_edge(dartIter, markedge); + + if ( !lcc.is_marked(dartIter, markvertex) ) + compute_vertex(dartIter, markvertex, empty); + } } } @@ -537,6 +565,18 @@ 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) @@ -566,7 +606,8 @@ 0.0f, 1.0f ); - QVector4D position( 10.0f, 10.0f, 10.0f, 0.0f ); + + QVector4D position((bb.xmax()-bb.xmin())/2, (bb.ymax()-bb.ymin())/2,bb.zmax(), 0.0 ); GLfloat shininess = 1.0f; rendering_program.bind(); @@ -615,62 +656,64 @@ void Viewer::draw() { - glEnable(GL_DEPTH_TEST); - if(!are_buffers_initialized) - initialize_buffers(); - - QColor color; - if ( !wireframe ) + if(scene) { - if(flatShading) + 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(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(pos_facets.size()/3)); + rendering_program.release(); + vao[1].release(); + } + } + if(edges) { - vao[0].bind(); + vao[2].bind(); attrib_buffers(this); - rendering_program.bind(); - glDrawArrays(GL_TRIANGLES, 0, static_cast(pos_facets.size()/3)); - rendering_program.release(); - vao[0].release(); + 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(pos_lines.size()/3)); + rendering_program_p_l.release(); + vao[2].release(); } - else + if(vertices) { - vao[1].bind(); + ::glPointSize(7.f); + vao[3].bind(); attrib_buffers(this); - rendering_program.bind(); - glDrawArrays(GL_TRIANGLES, 0, static_cast(pos_facets.size()/3)); - rendering_program.release(); - vao[1].release(); + color.setRgbF(.2f,.2f,.6f); + rendering_program_p_l.bind(); + rendering_program_p_l.setAttributeValue(colorLocation,color); + glDrawArrays(GL_POINTS, 0, static_cast(pos_points.size()/3)); + rendering_program_p_l.release(); + vao[3].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(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(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); @@ -692,25 +735,12 @@ ::glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE); - 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_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(); + ::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(); } @@ -730,24 +760,6 @@ 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_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); - } updateGL(); } else if ((e->key()==Qt::Key_E) && (modifiers==Qt::NoButton)) diff -Nru cgal-4.7/demo/Linear_cell_complex/Viewer.h cgal-4.8/demo/Linear_cell_complex/Viewer.h --- cgal-4.7/demo/Linear_cell_complex/Viewer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Linear_cell_complex/Viewer.h 2016-04-04 19:00:11.000000000 +0000 @@ -65,9 +65,9 @@ void compile_shaders(); void compute_elements(); - void compute_faces(Dart_handle dh); - void compute_edges(Dart_handle dh); - void compute_vertices(Dart_handle dh, bool empty); + 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; diff -Nru cgal-4.7/demo/Mesh_2/CMakeLists.txt cgal-4.8/demo/Mesh_2/CMakeLists.txt --- cgal-4.7/demo/Mesh_2/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -7,8 +7,6 @@ if(POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif() - -add_subdirectory(Qt3) find_package(CGAL COMPONENTS Core ) include( ${CGAL_USE_FILE} ) diff -Nru cgal-4.7/demo/Mesh_2/Qt3/CMakeLists.txt cgal-4.8/demo/Mesh_2/Qt3/CMakeLists.txt --- cgal-4.7/demo/Mesh_2/Qt3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +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.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Mesh_2/Qt3/contraints.xpm cgal-4.8/demo/Mesh_2/Qt3/contraints.xpm --- cgal-4.7/demo/Mesh_2/Qt3/contraints.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/contraints.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* XPM */ -const char * contraints_xpm[] = { -"32 32 2 1", -" c None", -". c #FF0000", -" ", -" ", -" ", -" ............. ", -" .. .. ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . . ", -" . ... . ", -" . ... .... . ", -" . . . . . ", -" . . . . . ", -" . . . . . ", -" . . . . . ", -" .. . . . . ", -" .. . . . . ", -" . .. .. . ", -" . ..... .. ... ", -" . .... . ", -" . . ", -" . . ", -" . . ", -" . . ", -" ..... . ", -" ........ .. ", -" .... ", -" ", -" ", -" "}; diff -Nru cgal-4.7/demo/Mesh_2/Qt3/Debug_layer.h cgal-4.8/demo/Mesh_2/Qt3/Debug_layer.h --- cgal-4.7/demo/Mesh_2/Qt3/Debug_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Debug_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -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 -Nru cgal-4.7/demo/Mesh_2/Qt3/icons.cpp cgal-4.8/demo/Mesh_2/Qt3/icons.cpp --- cgal-4.7/demo/Mesh_2/Qt3/icons.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/icons.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include -#include -#include -#include "contraints.xpm" -#include "marked.xpm" -#include "seeds.xpm" -#include -#include - diff -Nru cgal-4.7/demo/Mesh_2/Qt3/icons.h cgal-4.8/demo/Mesh_2/Qt3/icons.h --- cgal-4.7/demo/Mesh_2/Qt3/icons.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/icons.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Mesh_2/Qt3/marked.xpm cgal-4.8/demo/Mesh_2/Qt3/marked.xpm --- cgal-4.7/demo/Mesh_2/Qt3/marked.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/marked.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* XPM */ -const char * marked_xpm[] = { -"32 32 4 1", -" c None", -". c #000080", -"+ c #0CFF00", -"@ c #FFFFFF", -" ", -" ", -" ", -" ............. ", -" ..++++++++++... ", -" .+.++++++++.@.+. ", -" .++.+++++++.+.++. ", -" .+++.+++++.++.+++. ", -" .+++.++++.+++.++++. ", -" .+++++.++.++++.+++++. ", -" .++++++..++++.++++... ", -" .+++++++...+++.++..@.. ", -" .+++++....@......++.+. ", -" .++++.+.@.@@@@.++++.+. ", -" .+++..++.@@.@@@.+++.++. ", -" .++.++++.@@.@@@.+++.+++. ", -" ...+++++.@@@.@@.++.++++. ", -" ..++++++.@@@@@.@.++.++++. ", -" ...+++++.@@@@@.@.+.+++++. ", -" .++......@@@@@@..+.+++++. ", -" .+++++++.....@@.......... ", -" .+++++..+.+++.....++++. ", -" .++++.++++.++++++.+++. ", -" .+++.++++++.+++++.++. ", -" .+..++++++++.+++.++. ", -" ..+++++++++++.++.++. ", -" .....+++++++++.+.+. ", -" ........++... ", -" .... ", -" ", -" ", -" "}; diff -Nru cgal-4.7/demo/Mesh_2/Qt3/mesh_2_demo.cpp cgal-4.8/demo/Mesh_2/Qt3/mesh_2_demo.cpp --- cgal-4.7/demo/Mesh_2/Qt3/mesh_2_demo.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/mesh_2_demo.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#define CGAL_MESH_2_USE_TIMERS -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#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 -#include "Qt_widget_styled_layer.h" - -#ifdef CGAL_MESH_2_DEBUG_DRAW -#include "Debug_layer.h" -#endif - -#include "Qt_widget_style_editor.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef TESTING -# include - typedef CGAL::Simple_cartesian Kernel; -#else // !TESTING -# include - typedef CGAL::Simple_cartesian K1; - typedef CGAL::Filtered_kernel Kernel; -#endif // #ifdef TESTING - -struct K : public Kernel {}; -typedef K::FT FT; - -typedef CGAL::Triangulation_vertex_base_2 Vb; -typedef CGAL::Delaunay_mesh_face_base_2 Fb; -typedef CGAL::Triangulation_data_structure_2 Tds; -typedef CGAL::Constrained_Delaunay_triangulation_2 Tr; -typedef CGAL::Delaunay_mesh_local_size_criteria_2 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 CGALPolygon; - -typedef CGAL::Delaunay_mesher_2 Mesher; -typedef Tr::Vertex Vertex; -typedef Tr::Edge Edge; - -template -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> p1 >> p2; - t.insert_constraint(p1, p2); - } -} - -template -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() <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 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 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(widget->x_real(e->x())); - FT y=static_cast(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 - 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 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(&cdt, - CGAL::BLUE,1, - this, - "Show triangulation edges"); - show_in_domain = - new Show_in_domain_faces(&cdt, CGAL::GREEN, - this, "Show in_domain faces"); - - show_constraints = - new CGAL::Qt_layer_show_triangulation_constraints - (&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(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(&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, - 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(); - widget->attach(get_point); - get_point->deactivate(); - - get_polygon = new CGAL::Qt_widget_get_polygon(); - widget->attach(get_polygon); - get_polygon->deactivate(); - - get_seed = new CGAL::Qt_widget_get_point(); - 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 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 bad_faces; - - for(std::vector::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(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 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> num_lines; - std::vector 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* get_point; - CGAL::Qt_widget_get_point* get_seed; - CGAL::Qt_widget_get_polygon* get_polygon; - Follow_mouse* follow_mouse; - - typedef CGAL::Show_points - Show_points_from_triangulation; - - typedef CGAL::Show_points - Show_seeds; - - typedef CGAL::Show_segments - 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* show_bad_faces; - CGAL::Qt_layer_show_triangulation* show_triangulation; - CGAL::Qt_layer_show_triangulation_constraints* show_constraints; - CGAL::Qt_layer_show_circles* show_circles; - CGAL::Qt_widget_show_mouse_coordinates* show_coordinates; - Show_in_domain_faces* show_in_domain; - - bool nb_of_clusters_has_to_be_updated; - QLabel *nb_of_clusters; - Show_clusters* 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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_circles.h cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_circles.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_circles.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_circles.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include - - -namespace CGAL { - -// T::Geom_traits has to be a CGAL kernel! -template -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(widget->x_real(e->x())), - y=static_cast(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(widget->x_real(e->x())), - y=static_cast(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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_triangulation_constraints.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_layer_show_triangulation.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -namespace CGAL { - -template -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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp --- cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_styled_layer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#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(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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_styled_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#include -#include - -namespace CGAL { - -class Qt_widget_style : public QObject { - Q_OBJECT - - typedef QMap 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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor-aux.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include - -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(s)); - } - - virtual ~Point_style_selector() {}; - - PointStyle value() const - { - return PointStyle(currentItem()); - } -}; - -#endif // CGAL_QT_WIDGET_STYLE_EDITOR_AUX_H diff -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp --- cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include "Qt_widget_style_editor.h" -#include "Qt_widget_style_editor-aux.h" - -#include -#include -#include -#include -#include -#include -#include - -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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor.h cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor.h --- cgal-4.7/demo/Mesh_2/Qt3/Qt_widget_style_editor.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Qt_widget_style_editor.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#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 mapper; -}; // end of class Qt_widget_style_editor - -} // end namespace CGAL - -#endif // QT_WIDGET_STYLE_EDITOR_H diff -Nru cgal-4.7/demo/Mesh_2/Qt3/seeds.xpm cgal-4.8/demo/Mesh_2/Qt3/seeds.xpm --- cgal-4.7/demo/Mesh_2/Qt3/seeds.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/seeds.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* XPM */ -const char * seeds_xpm[] = { -"32 32 4 1", -" c None", -". c #FF0000", -"+ c #00FF00", -"@ c #000000", -" ..++++++++++++++", -" ..+++++++++++++++", -" ..++++++++++++++++", -" ..++++++++++++++++++", -" ..+++++++++++++++++++", -" ..++++++++++++++++++++", -" ..++++++++++++@++++++++", -" @ ..++++++++++++@+++++++++", -" ..++++++++++++@@++++++++++", -" ..@@++++++++++@@+++++++++++", -" ..+++@+++++++++@++++++++++++", -" ..+++++@@+++++@@+++++++++++++", -" ..++++++++@@+++@@++++++++++++++", -"..++++++++++@@+@@+++++++++++++++", -".++++++++++++@@@++++++++++++++++", -"+++++++++++++@@@++++++++++++++++", -"++++++++++++@@+@@+++++++++++++++", -"+++++++++++@@+++@@@+++++++++++++", -"++++++++++@@++++++@@++++++++++++", -"+++++++++@@++++++++@@+++++++++++", -"++++++++@@++++++++++@@++++++++++", -"+++++++@@++++++++++++@@+++++++++", -"++++++@@++++++++++++++@@++++++++", -"..+++++++++++++++++++++@@+++++++", -" .....++++++++++++++++++++++++++", -" ....+++++++++++++++++++++++", -" ....++++++++++++++++++++", -" ...+++++++++++++++++", -" ....+++++++++++++", -" ....++++++++++", -" ....+++++++", -" ....+++"}; diff -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_clusters.h cgal-4.8/demo/Mesh_2/Qt3/Show_clusters.h --- cgal-4.7/demo/Mesh_2/Qt3/Show_clusters.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_clusters.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -#include - -#include - -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 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 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 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 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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_points.cpp cgal-4.8/demo/Mesh_2/Qt3/Show_points.cpp --- cgal-4.7/demo/Mesh_2/Qt3/Show_points.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_points.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#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(pointstyle)); } - -} // namespace CGAL - -// moc_source_file: Show_points.h -#include "Show_points.moc" - diff -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_points.h cgal-4.8/demo/Mesh_2/Qt3/Show_points.h --- cgal-4.7/demo/Mesh_2/Qt3/Show_points.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_points.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include - -#include "Qt_widget_styled_layer.h" -#include - -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 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(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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_segments_base.cpp cgal-4.8/demo/Mesh_2/Qt3/Show_segments_base.cpp --- cgal-4.7/demo/Mesh_2/Qt3/Show_segments_base.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_segments_base.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_segments_base.h cgal-4.8/demo/Mesh_2/Qt3/Show_segments_base.h --- cgal-4.7/demo/Mesh_2/Qt3/Show_segments_base.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_segments_base.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Mesh_2/Qt3/Show_segments.h cgal-4.8/demo/Mesh_2/Qt3/Show_segments.h --- cgal-4.7/demo/Mesh_2/Qt3/Show_segments.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/Qt3/Show_segments.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 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 -Nru cgal-4.7/demo/Mesh_2/README.txt cgal-4.8/demo/Mesh_2/README.txt --- cgal-4.7/demo/Mesh_2/README.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_2/README.txt 2016-04-04 19:00:11.000000000 +0000 @@ -1,5 +1,5 @@ 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 Qt5 demos has a 2D meshing feature that +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 -Nru cgal-4.7/demo/Mesh_3/C3t3_type.h cgal-4.8/demo/Mesh_3/C3t3_type.h --- cgal-4.7/demo/Mesh_3/C3t3_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/C3t3_type.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,6 +1,10 @@ #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 + #include "Polyhedron_type.h" #include "Image_type.h" #include "implicit_functions/Implicit_function_interface.h" diff -Nru cgal-4.7/demo/Mesh_3/CMakeLists.txt cgal-4.8/demo/Mesh_3/CMakeLists.txt --- cgal-4.7/demo/Mesh_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -174,21 +174,21 @@ 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) + 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 )#Scene_polyhedron_item.moc) + 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 )#Scene_polygon_soup.moc) + 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) @@ -196,7 +196,7 @@ 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}) qt5_use_modules(${SCENE_C3T3_ITEM_LIB} Xml Script OpenGL Svg) @@ -205,7 +205,7 @@ 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)#Scene_implicit_function_item.moc) + 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) @@ -217,7 +217,7 @@ 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}) diff -Nru cgal-4.7/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h cgal-4.8/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h --- cgal-4.7/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/include/CGAL_demo/Scene_draw_interface.h 2016-04-04 19:00:11.000000000 +0000 @@ -6,7 +6,6 @@ class Scene_draw_interface { public: virtual ~Scene_draw_interface(){} - virtual void initializeGL() = 0; virtual void draw(Viewer*) = 0; virtual void drawWithNames(Viewer*) = 0; }; diff -Nru cgal-4.7/demo/Mesh_3/include/CGAL_demo/Scene.h cgal-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h --- cgal-4.7/demo/Mesh_3/include/CGAL_demo/Scene.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/include/CGAL_demo/Scene.h 2016-04-04 19:00:11.000000000 +0000 @@ -55,8 +55,6 @@ int selectionAindex() const; int selectionBindex() const; - // initializeGL() is called by Viewer::initializeGL() - void initializeGL(); // draw() is called by Viewer::draw() void draw(Viewer *viewer); void drawWithNames(Viewer *viewer); diff -Nru cgal-4.7/demo/Mesh_3/MainWindow.cpp cgal-4.8/demo/Mesh_3/MainWindow.cpp --- cgal-4.7/demo/Mesh_3/MainWindow.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/MainWindow.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -341,7 +341,8 @@ Q_FOREACH(Io_plugin_interface* plugin, io_plugins) { - if(plugin->canLoad()) { + if(plugin->canLoad()) { + viewer->makeCurrent(); item = plugin->load(fileinfo); if(item) break; // go out of the loop } diff -Nru cgal-4.7/demo/Mesh_3/Mesh_3_plugin.cpp cgal-4.8/demo/Mesh_3/Mesh_3_plugin.cpp --- cgal-4.7/demo/Mesh_3/Mesh_3_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Mesh_3_plugin.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -25,11 +25,12 @@ #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 "Polyhedron_type.h" + #include #include #include diff -Nru cgal-4.7/demo/Mesh_3/Mesh_function.h cgal-4.8/demo/Mesh_3/Mesh_function.h --- cgal-4.7/demo/Mesh_3/Mesh_function.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Mesh_function.h 2016-04-04 19:00:11.000000000 +0000 @@ -25,7 +25,7 @@ #ifndef CGAL_DEMO_MESH_3_MESH_FUNCTION_H #define CGAL_DEMO_MESH_3_MESH_FUNCTION_H -//#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1 +#define CGAL_MESH_3_MESHER_STATUS_ACTIVATED 1 #include @@ -55,23 +55,6 @@ }; -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 @@ -200,23 +183,26 @@ // Build mesher and launch refinement process mesher_ = new Mesher(c3t3_, *domain_, criteria); - mesher_->refine_mesh(); - /*mesher_->initialize(); - + #ifdef CGAL_MESH_3_PROFILING - WallClockTimer t; + 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.elapsed() << " seconds." << std::endl; + 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(); } diff -Nru cgal-4.7/demo/Mesh_3/Scene_c3t3_item.cpp cgal-4.8/demo/Mesh_3/Scene_c3t3_item.cpp --- cgal-4.7/demo/Mesh_3/Scene_c3t3_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Scene_c3t3_item.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -72,7 +72,7 @@ //Fragment source code const char fragment_source[] = { - "#version 330 \n" + "#version 120 \n" "varying highp vec4 fP; \n" "varying highp vec3 fN; \n" "varying vec4 color; \n" @@ -170,6 +170,7 @@ { std::cerr<<"adding fragment shader FAILED"<(v_grid.size()*sizeof(float))); - poly_vertexLocation[1] = rendering_program.attributeLocation("vertex"); - rendering_program.enableAttributeArray(poly_vertexLocation[1]); - rendering_program.setAttributeBuffer(poly_vertexLocation[1],GL_FLOAT,0,3); + 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(); @@ -659,9 +660,7 @@ vao[1].bind(); attrib_buffers(viewer); rendering_program_grid.bind(); - QColor color; - color.setRgbF(this->color().redF(), this->color().greenF(), this->color().blueF()); - rendering_program_grid.setUniformValue(colorLocation[1], color); + rendering_program_grid.setUniformValue(colorLocation[1], QColor(Qt::black)); viewer->glDrawArrays(GL_LINES, 0, static_cast(v_grid.size()/3)); rendering_program_grid.release(); vao[1].release(); diff -Nru cgal-4.7/demo/Mesh_3/Scene_polyhedron_item.cpp cgal-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp --- cgal-4.7/demo/Mesh_3/Scene_polyhedron_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Scene_polyhedron_item.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -3,6 +3,7 @@ #include "Scene_polyhedron_item.h" #include "Polyhedron_type.h" #include +#include #include #include @@ -128,6 +129,7 @@ { std::cerr<<"adding fragment shader FAILED"<makeCurrent(); if(!are_buffers_initialized) initialize_buffers(); QColor color; diff -Nru cgal-4.7/demo/Mesh_3/src/CGAL_demo/Scene.cpp cgal-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp --- cgal-4.7/demo/Mesh_3/src/CGAL_demo/Scene.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/src/CGAL_demo/Scene.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -108,9 +108,6 @@ return -1; } -void Scene::initializeGL() -{ -} void Scene::draw(Viewer* viewer) diff -Nru cgal-4.7/demo/Mesh_3/src/CGAL_demo/Viewer.cpp cgal-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp --- cgal-4.7/demo/Mesh_3/src/CGAL_demo/Viewer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/src/CGAL_demo/Viewer.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -45,7 +45,6 @@ void Viewer::initializeGL() { QGLViewer::initializeGL(); - scene->initializeGL(); initializeOpenGLFunctions(); setBackgroundColor(::Qt::white); } diff -Nru cgal-4.7/demo/Mesh_3/StdAfx.h cgal-4.8/demo/Mesh_3/StdAfx.h --- cgal-4.7/demo/Mesh_3/StdAfx.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/StdAfx.h 2016-04-04 19:00:11.000000000 +0000 @@ -79,7 +79,6 @@ //#include //#include //#include -#include #include #include #include diff -Nru cgal-4.7/demo/Mesh_3/Volume_plane.h cgal-4.8/demo/Mesh_3/Volume_plane.h --- cgal-4.7/demo/Mesh_3/Volume_plane.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Volume_plane.h 2016-04-04 19:00:11.000000000 +0000 @@ -13,13 +13,12 @@ #include #include #include +#include #if !defined(NDEBUG) inline void printGlError(unsigned int line) { - GLenum error = glGetError(); - if(error != GL_NO_ERROR) - std::cerr << gluErrorString(error) << "@" << line << std::endl; + CGAL::Qt::opengl_check_errors(line); } #else inline @@ -205,38 +204,38 @@ template const char* Volume_plane::vertexShader_source = - "#version 330 \n" - "in vec4 vertex; \n" - "in float color; \n" + "#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" - "out vec4 fullColor; \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 const char* Volume_plane::fragmentShader_source = - "#version 330\n" - "in vec4 fullColor; \n" + "#version 120\n" + "varying highp vec4 fullColor; \n" "void main() { gl_FragColor = fullColor; } \n"; template const char* Volume_plane::vertexShader_bordures_source = - "#version 330 \n" - "in vec4 vertex; \n" - "uniform vec4 color; \n" + "#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" - "out vec4 fullColor; \n" + "varying highp vec4 fullColor; \n" "void main() \n" "{ gl_Position = mvp_matrix * f_matrix * vertex; \n" " fullColor = color; } \n"; template const char* Volume_plane::fragmentShader_bordures_source = - "#version 330\n" - "in vec4 fullColor; \n" + "#version 120\n" + "varying highp vec4 fullColor; \n" "void main() { gl_FragColor = fullColor; } \n"; @@ -342,7 +341,6 @@ template void Volume_plane::init() { - initShaders(); // for each vertex diff -Nru cgal-4.7/demo/Mesh_3/Volume_plane_intersection.cpp cgal-4.8/demo/Mesh_3/Volume_plane_intersection.cpp --- cgal-4.7/demo/Mesh_3/Volume_plane_intersection.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Volume_plane_intersection.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -82,7 +82,7 @@ vao[0].bind(); buffers[0].bind(); - buffers[0].allocate(a_vertex.data(), a_vertex.size()*sizeof(float)); + buffers[0].allocate(a_vertex.data(), static_cast(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); @@ -91,7 +91,7 @@ vao[1].bind(); buffers[1].bind(); - buffers[1].allocate(b_vertex.data(), b_vertex.size()*sizeof(float)); + buffers[1].allocate(b_vertex.data(), static_cast(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); @@ -100,7 +100,7 @@ vao[2].bind(); buffers[2].bind(); - buffers[2].allocate(c_vertex.data(), c_vertex.size()*sizeof(float)); + buffers[2].allocate(c_vertex.data(), static_cast(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); @@ -129,7 +129,7 @@ rendering_program.release(); } -void Volume_plane_intersection::draw(Viewer* viewer) const { +void Volume_plane_intersection::draw(Viewer *viewer) const { viewer->glLineWidth(4.0f); attrib_buffers(viewer); if(b && c) { diff -Nru cgal-4.7/demo/Mesh_3/Volume_planes_plugin.cpp cgal-4.8/demo/Mesh_3/Volume_planes_plugin.cpp --- cgal-4.7/demo/Mesh_3/Volume_planes_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Volume_planes_plugin.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,14 @@ + +#ifdef _MSC_VER +# pragma warning(disable:4244) // conversion with loss of data +#endif + +#include #include "config.h" +#include "Volume_plane.h" #include -#include "Volume_plane.h" #include "Volume_plane_thread.h" #include "Volume_plane_intersection.h" diff -Nru cgal-4.7/demo/Mesh_3/Volume_plane_thread.h cgal-4.8/demo/Mesh_3/Volume_plane_thread.h --- cgal-4.7/demo/Mesh_3/Volume_plane_thread.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Mesh_3/Volume_plane_thread.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ #ifndef CGAL_VOLUME_PLANE_THREAD_H #define CGAL_VOLUME_PLANE_THREAD_H -#include #include "Volume_plane.h" +#include #include "Scene_segmented_image_item.h" diff -Nru cgal-4.7/demo/Nef_2/cgal_types.h cgal-4.8/demo/Nef_2/cgal_types.h --- cgal-4.7/demo/Nef_2/cgal_types.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/cgal_types.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include - - - -//Cartesian types -typedef CGAL::Cartesian Rp; -typedef CGAL::Partition_traits_2 - 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 RP_double; -typedef CGAL::Partition_traits_2 - 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 - Extended_kernel; -typedef CGAL::Nef_polyhedron_2 - Nef_polyhedron; -typedef Nef_polyhedron::Point Point_2; -typedef Nef_polyhedron::Line Line; diff -Nru cgal-4.7/demo/Nef_2/CMakeLists.txt cgal-4.8/demo/Nef_2/CMakeLists.txt --- cgal-4.7/demo/Nef_2/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project( Nef_2 ) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Nef_2/filtered_homogeneous_data/complex.nef cgal-4.8/demo/Nef_2/filtered_homogeneous_data/complex.nef --- cgal-4.7/demo/Nef_2/filtered_homogeneous_data/complex.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/filtered_homogeneous_data/complex.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,422 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/filtered_homogeneous_data/symmdif.nef cgal-4.8/demo/Nef_2/filtered_homogeneous_data/symmdif.nef --- cgal-4.7/demo/Nef_2/filtered_homogeneous_data/symmdif.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/filtered_homogeneous_data/symmdif.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/help/index.html cgal-4.8/demo/Nef_2/help/index.html --- cgal-4.7/demo/Nef_2/help/index.html 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/help/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,392 +0,0 @@ - - - - Nef_2 - - - -

How to use Nef_2 Demo

-
- Main Functionality -
- Nef_2 visualisation using lists -
- - Building and erasing nefs -
- - Constructive Operations -
- - Persistance - - -

 

-

 

-

 

-

 

- -

-  

-

-  

-

- Reset application

- 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) - -

-  

-

-  

-

- Create a new window

- 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) - -

-  

-

-  

-

- Print

- 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. - - -

-  

-

-  

-

- Close the current window -

- 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. - -

-  

-

-  

-

- Quit the application

- 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. - -

-  

-

-  

-

- Select Nef for visualisation -

- 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. - -

-  

-

-  

-

- Toggle ON/OFF nef visualisation -

- 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. - - -

-  

-

-  

-

- Create a Nef polyhedron consisting of - one point -

- 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. - -

-  

-

-  

-

- Create a Nef polyhedron consisting of - a halfplane

- 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. - - - -

-  

-

-  

-

- Create a Nef polyhedron from a simple - polygon -

- 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. - - -

-  

-

-  

-

- Erase an existing Nef polyhedron -

- 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. - -

-  

-

-  

-

- Intersection -

- 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. - - -

-  

-

-  

-

- Union -

- 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. - - -

-  

-

-  

-

- Difference -

- 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. - -

-  

-

-  

-

- Symmetric Difference -

- 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. - - -

-  

-

-  

-

- Complement -

- 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. - - -

-  

-

-  

-

- Interior -

- 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. - - - -

-  

-

-  

-

- Closure -

- 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. - - -

-  

-

-  

-

- Boundary -

- 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. - - -

-  

-

-  

-

- Regularization -

- 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. - - - -

-  

-

-  

-

- Save the current Nef polyhedron -

- 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.
- The Nef polyhedron saved does not contain - the visible area. - - -

-  

-

-  

-

- Load an existing Nef polyhedron -

- 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.
- The Nef polyhedron saved does not contain - the visible area. - -

-  

-

-  

-

- Load an existing simple polygon and - construct the Nef polyhedron from this polygon -

- 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.
- The CGAL polygon saved does not contain - the visible area. -

 

-

 

- - -
-
- - -Last modified: Tue Jun 3 10:59:20 MEST 2003 - - - diff -Nru cgal-4.7/demo/Nef_2/homogeneous_data/box_and_line.nef cgal-4.8/demo/Nef_2/homogeneous_data/box_and_line.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/box_and_line.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/box_and_line.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/cake.nef cgal-4.8/demo/Nef_2/homogeneous_data/cake.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/cake.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/cake.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/dangling.nef cgal-4.8/demo/Nef_2/homogeneous_data/dangling.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/dangling.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/dangling.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/disk.nef cgal-4.8/demo/Nef_2/homogeneous_data/disk.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/disk.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/disk.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/line_cross.nef cgal-4.8/demo/Nef_2/homogeneous_data/line_cross.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/line_cross.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/line_cross.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/mpii.nef cgal-4.8/demo/Nef_2/homogeneous_data/mpii.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/mpii.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/mpii.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,202 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/star.nef cgal-4.8/demo/Nef_2/homogeneous_data/star.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/star.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/star.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,160 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/symmdiff.nef cgal-4.8/demo/Nef_2/homogeneous_data/symmdiff.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/symmdiff.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/symmdiff.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/homogeneous_data/triangle.nef cgal-4.8/demo/Nef_2/homogeneous_data/triangle.nef --- cgal-4.7/demo/Nef_2/homogeneous_data/triangle.nef 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/homogeneous_data/triangle.nef 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -Nef_polyhedron_2 -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 -Nru cgal-4.7/demo/Nef_2/nef_2.cpp cgal-4.8/demo/Nef_2/nef_2.cpp --- cgal-4.7/demo/Nef_2/nef_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/nef_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#if !defined CGAL_USE_GMP -#include -int main() -{ - std::cout << "Sorry, this demo needs GMP..."; - std::cout << std::endl; - return 0; -} -#else - -#include -#include -#include -#include - -#include "cgal_types.h" -#include "nef_2.h" -#include -#include -#include -#include -#include "Qt_widget_toolbar.h" -#include "nef_2_layers.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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_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_visible); - nef_layer2 = new Qt_layer_nef_gray(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 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 wsxq = double_to_quotient(p.x()); - CGAL::Quotient wsyq = double_to_quotient(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 l_of_p; - while(it != poly.vertices_end()){ - //double xp = (*it).x(); - //double yp = (*it).y(); - //CGAL::Quotient wsxq = double_to_quotient(xp); - //CGAL::Quotient wsyq = double_to_quotient(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 wsxq = double_to_quotient(line.point(0).x()); - CGAL::Quotient wsyq = double_to_quotient(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(line.point(1).x()); - wsyq = double_to_quotient(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::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::iterator it = nef_2_list.begin(); - for(int i=0; icurrentItem() == 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::iterator it = nef_2_list.begin(); - for(int i=0; icurrentItem() == 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::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_layer1; - Qt_layer_nef_gray *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 -Nru cgal-4.7/demo/Nef_2/nef_2.h cgal-4.8/demo/Nef_2/nef_2.h --- cgal-4.7/demo/Nef_2/nef_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/nef_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -template -CGAL::Quotient -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 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 -Nru cgal-4.7/demo/Nef_2/nef_2_layers.h cgal-4.8/demo/Nef_2/nef_2_layers.h --- cgal-4.7/demo/Nef_2/nef_2_layers.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/nef_2_layers.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -template -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 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 -Nru cgal-4.7/demo/Nef_2/Qt_widget_toolbar.cpp cgal-4.8/demo/Nef_2/Qt_widget_toolbar.cpp --- cgal-4.7/demo/Nef_2/Qt_widget_toolbar.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/Qt_widget_toolbar.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#if defined CGAL_USE_GMP - -#include -#include "Qt_widget_toolbar.h" - -// icons -#include -#include -#include -#include - -#include - -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; iinsert(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 -Nru cgal-4.7/demo/Nef_2/Qt_widget_toolbar.h cgal-4.8/demo/Nef_2/Qt_widget_toolbar.h --- cgal-4.7/demo/Nef_2/Qt_widget_toolbar.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/Qt_widget_toolbar.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include - -#include -#include -#include -#include -#include - - -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 input_point; - CGAL::Qt_widget_get_line input_line; - CGAL::Qt_widget_get_simple_polygon - input_polygon; -};//end class - -#endif Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/basic2.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/basic2.pcx differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/basic.gif and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/basic.gif differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/basic.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/basic.pcx differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/boundary.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/boundary.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/boundary.xpm cgal-4.8/demo/Nef_2/xpms/boundary.xpm --- cgal-4.7/demo/Nef_2/xpms/boundary.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/boundary.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* XPM */ -static const char *boundary[] = { -/* 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#################################" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END ٴٴ \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/closure.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/closure.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/closure.xpm cgal-4.8/demo/Nef_2/xpms/closure.xpm --- cgal-4.7/demo/Nef_2/xpms/closure.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/closure.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* XPM */ -static const char *closure[] = { -/* 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#################################" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END ٴٴ \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/complement.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/complement.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/complement.xpm cgal-4.8/demo/Nef_2/xpms/complement.xpm --- cgal-4.7/demo/Nef_2/xpms/complement.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/complement.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* XPM */ -static const char *complement[] = { -/* 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#################################" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END Y444444444444444444444444444444444YY4444444444444444444444444444444@YYFWWWWWWWWWWWWWWWWWWWWWW@@YYFWW@@YYFWFFFFFFFFFFFFFFFFFFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFFFFFFFFFFFFFFFFFFW@@YYFWW@@YYFWWWWWWWWWWWWWWWWWWWWWWW@@YYF@@YYFFFFFFFFFFFFFFFFFFFFFFF@@YY@@YY@@YY@@YY@@YY@@YYfffffffffffffffffffffffffffffff@Yfffffffffffffffffffffffffffffffff \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/diff.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/diff.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/diff.xpm cgal-4.8/demo/Nef_2/xpms/diff.xpm --- cgal-4.7/demo/Nef_2/xpms/diff.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/diff.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -/* XPM */ -static const char *diff[] = { -/* 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" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END ޹޹𓓓''''''''''''bb'W1 1WWW'WWbbWW'WW'WW'W'W'W'W'W'W'W'W'W'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'Wb'W'1b'W''b W'''' bWb1WWWWWWWWWWWWWWWWW𫫫 \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/exor.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/exor.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/exor.xpm cgal-4.8/demo/Nef_2/xpms/exor.xpm --- cgal-4.7/demo/Nef_2/xpms/exor.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/exor.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -/* XPM */ -static const char *exor[] = { -/* 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" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END ޹޹𓓓''''''''''''bb'W1 1WWW'WWbbWW'WW'WW'W'W'W'W'W'W'W'W'W'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'Wb'W'1b'W''b W'''' bWb1WWWWWWWWWWWWWWWWW𫫫 \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/interior.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/interior.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/interior.xpm cgal-4.8/demo/Nef_2/xpms/interior.xpm --- cgal-4.7/demo/Nef_2/xpms/interior.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/interior.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* XPM */ -static const char *interior[] = { -/* 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#################################" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END Y444444444444444444444444444444444YY4444444444444444444444444444444@YYFWWWWWWWWWWWWWWWWWWWWWW@@YYFWW@@YYFWFFFFFFFFFFFFFFFFFFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFW@@YYFWFFFFFFFFFFFFFFFFFFFW@@YYFWW@@YYFWWWWWWWWWWWWWWWWWWWWWWW@@YYF@@YYFFFFFFFFFFFFFFFFFFFFFFF@@YY@@YY@@YY@@YY@@YY@@YYfffffffffffffffffffffffffffffff@Yfffffffffffffffffffffffffffffffff \ No newline at end of file Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/intersection.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/intersection.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/intersection.xpm cgal-4.8/demo/Nef_2/xpms/intersection.xpm --- cgal-4.7/demo/Nef_2/xpms/intersection.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/intersection.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Nef_2/xpms/nef.xpm cgal-4.8/demo/Nef_2/xpms/nef.xpm --- cgal-4.7/demo/Nef_2/xpms/nef.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/nef.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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#################################" -}; Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/newclosed.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/newclosed.pcx differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/newopen.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/newopen.pcx differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/newpoly.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/newpoly.pcx differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Nef_2/xpms/union.pcx and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Nef_2/xpms/union.pcx differ diff -Nru cgal-4.7/demo/Nef_2/xpms/union.xpm cgal-4.8/demo/Nef_2/xpms/union.xpm --- cgal-4.7/demo/Nef_2/xpms/union.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_2/xpms/union.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -1,56 +0,0 @@ -/* XPM */ -static const char *union[] = { -/* 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" -}; -SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 34 NAXIS2 = 34 HISTORY Written by XV 3.10a END ޹޹𓓓''''''''''''bb'W1 1WWW'WWbbWW'WW'WW'W'W'W'W'W'W'W'W'W'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'W'ޫW'Wb'W'1b'W''b W'''' bWb1WWWWWWWWWWWWWWWWW𫫫 \ No newline at end of file diff -Nru cgal-4.7/demo/Nef_3/CMakeLists.txt cgal-4.8/demo/Nef_3/CMakeLists.txt --- cgal-4.7/demo/Nef_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project (Nef_3_Demo) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Nef_3/cube.off cgal-4.8/demo/Nef_3/cube.off --- cgal-4.7/demo/Nef_3/cube.off 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/cube.off 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h cgal-4.8/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h --- cgal-4.7/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/include/CGAL/Nef_3/demo_stack.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include - -#ifdef CGAL_NEF3_OLD_VISUALIZATION - -#else -#include -#include -#endif - -#include -#include -#include -#include -#include -#include - -using std::cout; -using std::cerr; -using std::endl; -using std::strcmp; -using std::exit; - -namespace CGAL { - -template -class demo_stack { - - typedef typename Kernel::RT NT; - typedef CGAL::Polyhedron_3 Polyhedron; - typedef CGAL::Nef_polyhedron_3 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 [] [ ...]\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 duplicates -th element (top = 1st element).\n" - " swap swaps top two elements on stack.\n" - " swapn swaps -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 creates a halfspace bounded by the plane ax+by+cz+d=0.\n" - " loadnef3 loads nef3 file and pushes it on stack.\n" - " loadoff loads file in OFF format and pushes it on stack.\n" - " saveoff 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 translate top with homogeneous vector (x,y,z,w).\n" - " scale scale top with rational scale factor (s/w).\n" - " rotx rotate (approx) degrees around x-axis.\n" - " roty rotate (approx) degrees around y-axis.\n" - " rotz rotate (approx) 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* w = - new CGAL::Qt_widget_Nef_3(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 -Nru cgal-4.7/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h cgal-4.8/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h --- cgal-4.7/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/include/CGAL/Nef_3/visual_hull_creator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,295 +0,0 @@ -#ifndef CGAL_NEF_VISUAL_HULL_CREATOR_H -#define CGAL_NEF_VISUAL_HULL_CREATOR_H - -#include -#include -#include -#include -#include -#include - -namespace CGAL { - -template -class visual_hull_creator : public CGAL::Modifier_base { - - typedef SNC_ SNC_structure; - typedef typename SNC_structure::Kernel Kernel; - typedef CGAL::Polyhedron_3 Polyhedron; - typedef CGAL::SNC_decorator 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 > 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 - 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 > 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 >::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 - void add_outer_cycle_to_camera(Forward_iterator begin, Forward_iterator end) { - - SNC_constructor C(*sncp); - std::list 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 - void create_outer_cycles_opposites(Forward_iterator begin, Forward_iterator end) { - - SNC_constructor C(*sncp); - std::list spoints; - - cut = find_cutoff_plane(); - std::list 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::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 - void add_inner_cycle_to_camera(Forward_iterator begin, Forward_iterator end) { - - SNC_constructor C(*sncp); - std::list 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 - void create_inner_cycles_opposites(Forward_iterator begin, Forward_iterator end) { - - SNC_constructor C(*sncp); - std::list spoints; - - std::list 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::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 -Nru cgal-4.7/demo/Nef_3/mpi.vsh cgal-4.8/demo/Nef_3/mpi.vsh --- cgal-4.7/demo/Nef_3/mpi.vsh 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/mpi.vsh 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Nef_3/nef_3_extended.cpp cgal-4.8/demo/Nef_3/nef_3_extended.cpp --- cgal-4.7/demo/Nef_3/nef_3_extended.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/nef_3_extended.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifdef CGAL_USE_LEDA - #include - typedef leda_integer NT; -#else - #include - typedef CGAL::Gmpz NT; -#endif - -#include -typedef CGAL::Extended_homogeneous Kernel; - -#include - -int main( int argc, char* argv[]) { - - CGAL::demo_stack 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 -Nru cgal-4.7/demo/Nef_3/nef_3_filtered.cpp cgal-4.8/demo/Nef_3/nef_3_filtered.cpp --- cgal-4.7/demo/Nef_3/nef_3_filtered.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/nef_3_filtered.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; - -int main( int argc, char* argv[]) { - - CGAL::demo_stack 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 -Nru cgal-4.7/demo/Nef_3/nef_3_homogeneous.cpp cgal-4.8/demo/Nef_3/nef_3_homogeneous.cpp --- cgal-4.7/demo/Nef_3/nef_3_homogeneous.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/nef_3_homogeneous.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifdef CGAL_USE_LEDA - #include - typedef leda_integer NT; -#else - #include - typedef CGAL::Gmpz NT; -#endif - -#include - -typedef CGAL::Homogeneous Kernel; - -#include - -int main( int argc, char* argv[]) { - - CGAL::demo_stack 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 -Nru cgal-4.7/demo/Nef_3/README cgal-4.8/demo/Nef_3/README --- cgal-4.7/demo/Nef_3/README 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/README 1970-01-01 00:00:00.000000000 +0000 @@ -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): - --------------------------------------- - \\ minimum and maximum coordinates of - \\ some box enclosing the 3D object. - int \\ number of cameras. - * \\ position and photo of cameras - - camera - ------ - \\ position of camera. - int \\ number of facet cycles of photo shape - * \\ cycle data of facet cycles - - facet cycle (first one is outer cycle, others bound holes) - ----------- - int \\ number of points in the cycle. - \\ 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 -Nru cgal-4.7/demo/Nef_3/visual_hull.cpp cgal-4.8/demo/Nef_3/visual_hull.cpp --- cgal-4.7/demo/Nef_3/visual_hull.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/visual_hull.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#ifdef CGAL_VSH_FILTERED - #include - #include - #include -#else - #ifdef CGAL_USE_LEDA - #include - #else - #include - #endif - #include - #include - #include - #include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#ifdef CGAL_VSH_FILTERED - typedef CGAL::Simple_cartesian EKernel; - typedef CGAL::Lazy_kernel Kernel; -#else - #ifdef CGAL_USE_LEDA - typedef leda_integer NT; - #else - typedef CGAL::Gmpz NT; - #endif - typedef CGAL::Quotient CNT; - typedef CGAL::Cartesian CKernel; - typedef CGAL::Homogeneous 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 Nef_polyhedron; -typedef CGAL::Nef_nary_intersection_3 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 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> npolygons; - - std::list > polygon_list; - for(int poly=0; poly> npoints; - - std::list input_points; - for(int pnt=0; pnt >::iterator li; - for(li=polygon_list.begin(); li!=polygon_list.end(); ++li) { - std::list::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* w = - new CGAL::Qt_widget_Nef_3(result); - a.setMainWidget(w); - w->show(); - a.exec(); -} diff -Nru cgal-4.7/demo/Nef_3/visualization_SM.cin cgal-4.8/demo/Nef_3/visualization_SM.cin --- cgal-4.7/demo/Nef_3/visualization_SM.cin 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/visualization_SM.cin 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Nef_3/visualization_SM.cpp cgal-4.8/demo/Nef_3/visualization_SM.cpp --- cgal-4.7/demo/Nef_3/visualization_SM.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/visualization_SM.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include - -typedef CGAL::Homogeneous Kernel; -typedef CGAL::Nef_polyhedron_3 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* w = - new CGAL::Qt_widget_Nef_S2(S); - a.setMainWidget(w); - w->show(); - return a.exec(); -} diff -Nru cgal-4.7/demo/Nef_3/visualization_SNC.cin cgal-4.8/demo/Nef_3/visualization_SNC.cin --- cgal-4.7/demo/Nef_3/visualization_SNC.cin 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/visualization_SNC.cin 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Nef_3/visualization_SNC.cpp cgal-4.8/demo/Nef_3/visualization_SNC.cpp --- cgal-4.7/demo/Nef_3/visualization_SNC.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_3/visualization_SNC.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include - -typedef CGAL::Homogeneous Kernel; -typedef CGAL::Nef_polyhedron_3 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* w = - new CGAL::Qt_widget_Nef_3(N); - a.setMainWidget(w); - w->show(); - return a.exec(); -} diff -Nru cgal-4.7/demo/Nef_S2/CMakeLists.txt cgal-4.8/demo/Nef_S2/CMakeLists.txt --- cgal-4.7/demo/Nef_S2/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_S2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project( Nef_S2 ) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h cgal-4.8/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h --- cgal-4.7/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_S2/include/CGAL/Nef_S2/create_random_Nef_S2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef NEF_POLYHEDRON_S2_CREATE_RANDOM_H -#define NEF_POLYHEDRON_S2_CREATE_RANDOM_H - -#include -#include -#include - -namespace CGAL { - -template -void -create_random_Nef_S2(Nef_polyhedron_S2& P, int n=5, int seed=0) { - - typedef Nef_polyhedron_S2 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 Creator; - typedef CGAL::Random_points_in_cube_3 Point_source; - - if(seed == 0) - std::srand(time(0)); - else - std::srand(seed); - - std::list 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 -Nru cgal-4.7/demo/Nef_S2/nef_S2.cpp cgal-4.8/demo/Nef_S2/nef_S2.cpp --- cgal-4.7/demo/Nef_S2/nef_S2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Nef_S2/nef_S2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include -#include -#include -#include -#include -#include - -typedef CGAL::Exact_integer RT; -typedef CGAL::Homogeneous Kernel; -typedef CGAL::Nef_polyhedron_S2 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* w = - new CGAL::Qt_widget_Nef_S2(S); - a.setMainWidget(w); - w->show(); - return a.exec(); -} diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt cgal-4.8/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/blob00.xy cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/blob00.xy --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/blob00.xy 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/blob00.xy 2016-04-04 19:00:12.000000000 +0000 @@ -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 Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/maple_leaf_embroidery.bmp and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/maple_leaf_embroidery.bmp differ diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/round_rect00.xy 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/skyline_noisy00.xy 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/data/stair-noise00.xy 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/dialog_options.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/dialog_options.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/dialog_options.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/dialog_options.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/glviewer.cpp cgal-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.cpp --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/glviewer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,170 @@ +// Qt +#include + +// 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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/glviewer.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/glviewer.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/glviewer.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,111 @@ +#ifndef GLWIDGET_H +#define GLWIDGET_H + +// Qt +#include +#include + +// 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 Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/fileNew.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileNew.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/fileOpen.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileOpen.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/fileSave.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/fileSave.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/fit-page-32.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/fit-page-32.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/inputPoint.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/inputPoint.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/snapshot.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/snapshot.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/triangulation.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/triangulation.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/until.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/until.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/vertex.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/vertex.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Optimal_transportation_reconstruction_2/icons/Voronoi_diagram_2.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Optimal_transportation_reconstruction_2/icons/Voronoi_diagram_2.png differ diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/options.ui cgal-4.8/demo/Optimal_transportation_reconstruction_2/options.ui --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/options.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/options.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,236 @@ + + + Dialog_options + + + + 0 + 0 + 354 + 415 + + + + + 0 + 0 + + + + Options + + + + + 20 + 20 + 311 + 385 + + + + + + + Use Flip + + + + + + + + + Multiple Choice, with number of samples: + + + + + + + 100 + + + 100 + + + + + + + + + + + Verbose + + + + + + + 2 + + + + + + + + + + + Init with % + + + + + + + 100 + + + 100 + + + + + + + + + + + Relocation + + + + + + + + + + + + + + Relevance + + + + + + + 3 + + + 100.000000000000000 + + + 0.050000000000000 + + + 100.000000000000000 + + + + + + + + + + + Line thickness + + + + + + + + + + + + + + Point size + + + + + + + + + + + + + + Vertex size + + + + + + + + + + + + + 252 + 0 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + buttonBox + accepted() + Dialog_options + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + Dialog_options + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp cgal-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_demo.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,12 @@ +#include +#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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/Otr2_kerneled.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,153 @@ +#ifndef CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_ +#define CGAL_OPTIMAL_TRANSPORTATION_RECONSTRUCTION_KERNEL_2_H_ + +#include +#include + +#include +#include + +#include +#include // std::pair +#include + +//Qt +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_2 Point; +typedef K::FT FT; + +typedef std::pair PointMassPair; +typedef std::vector PointMassList; +typedef PointMassList::const_iterator InputIterator; + +typedef CGAL::value_type_traits::type MassPoint; + +typedef CGAL::First_of_pair_property_map Point_property_map; +typedef CGAL::Second_of_pair_property_map Mass_property_map; + +typedef CGAL::Optimal_transportation_reconstruction_2 Otr_2; + +class Optimal_transportation_reconstruction_kerneled_2: + public Otr_2 { + +public: + + template + 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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc cgal-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.qrc 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,14 @@ + + + icons/Voronoi_diagram_2.png + icons/fileNew.png + icons/fileOpen.png + icons/fileSave.png + icons/fit-page-32.png + icons/inputPoint.png + icons/snapshot.png + icons/triangulation.png + icons/until.png + icons/vertex.png + + diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/pwsrec.ui cgal-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.ui --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/pwsrec.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/pwsrec.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,612 @@ + + + Pierre Alliez + MainWindow + + + + 0 + 0 + 680 + 680 + + + + CGAL 2D Optimal Transportation Curve Reconstruction + + + + + + + QLayout::SetDefaultConstraint + + + + + Qt::StrongFocus + + + + + + + + + + + + + + + 0 + 0 + 680 + 21 + + + + + &File + + + + + + + + + Data + + + + Predefined + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Algorithms + + + + + + + + + + + + + + + + + + View + + + + + + + + + + + + + + + + + + + + + + + + + + toolBar + + + + + + TopToolBarArea + + + false + + + + + + + + + + + + Quit + + + Ctrl+Q + + + + + true + + + false + + + + :/icons/inputPoint.png:/icons/inputPoint.png + + + Insert mode + + + Insert Point + + + Insert Point + + + + + + :/icons/fileNew.png:/icons/fileNew.png + + + Clear + + + Clear + + + Space + + + + + + :/icons/fileOpen.png:/icons/fileOpen.png + + + Load point set... + + + Load point set + + + Ctrl+O + + + + + + :/icons/fileSave.png:/icons/fileSave.png + + + Save point set... + + + Save point set + + + Ctrl+S + + + + + Circle... + + + + + Half circle... + + + + + Box... + + + B + + + + + Line... + + + + + Re-init + + + I + + + + + Run 1 step + + + R + + + + + true + + + false + + + Foot points + + + View foot points + + + F + + + + + true + + + true + + + Points + + + View points + + + P + + + + + true + + + false + + + Triangulation + + + View edges of the triangulation + + + T + + + + + + :/icons/fit-page-32.png:/icons/fit-page-32.png + + + Recenter + + + + + true + + + true + + + Vertices + + + V + + + + + Two boxes... + + + + + Stair... + + + + + Skyline... + + + + + true + + + false + + + Edge priority + + + Z + + + + + Run 10 steps + + + 1 + + + + + Run 100 steps + + + 2 + + + + + Run 1,000 steps + + + 3 + + + + + Add outliers... + + + + + + :/icons/snapshot.png:/icons/snapshot.png + + + Snapshot + + + Ctrl+C + + + + + Increasingly sharp angles... + + + + + Box with boundaries... + + + + + Box with missing corners... + + + + + Star... + + + + + Spiral... + + + + + true + + + false + + + Edge cost + + + C + + + + + Run until... + + + U + + + + + Parallel lines... + + + + + Noise... + + + N + + + + + Relocate all vertices + + + L + + + + + true + + + Relocation + + + Shift+L + + + + + true + + + false + + + Ghost edges + + + G + + + + + Invert mass + + + Shift+I + + + + + true + + + true + + + Relevance + + + Shift+R + + + + + true + + + Tolerance + + + Shift+T + + + + + Clamp mass + + + + + true + + + Bins + + + Shift+B + + + + + Subdivide + + + + + Widely variable sampling + + + + + Decimate... + + + + + One point out of n + + + + + true + + + Multiple Choice + + + M + + + + + Options... + + + O + + + + + Output to console + + + + + + GlViewer + QWidget +
glviewer.h
+ 1 +
+
+ + + + +
diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/random.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/random.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/random.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/random.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +Vector random_vec(const double scale) +{ + double dx = random_double(-scale, scale); + double dy = random_double(-scale, scale); + return Vector(dx, dy); +} + +#endif diff -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/render.cpp cgal-4.8/demo/Optimal_transportation_reconstruction_2/render.cpp --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/render.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/render.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,892 @@ +#include + +// Qt +#include + +// local +#include "Otr2_kerneled.h" +#include + +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::max)(); + FT max_value = -(std::numeric_limits::max)(); + std::vector values; + std::vector 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::max)(); + FT max_value = -(std::numeric_limits::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::max)(); + FT max_value = -(std::numeric_limits::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(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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/scene.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/scene.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/scene.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/scene.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,908 @@ +#ifndef SCENE_H_ +#define SCENE_H_ + +// STL +#include + +//Qt +#include +#include + +// local +#include +#include "Otr2_kerneled.h" +#include + + +#ifdef CGAL_USE_CIMG +#define cimg_display 0 // To avoid X11 or Windows-GDI dependency +#include +#endif +#include "random.h" +#include // std::pair +#include +#include +#include + +class Scene { + +public: + typedef std::pair PointMassPair; + + typedef std::vector PointMassList; + typedef PointMassList::const_iterator InputIterator; + + typedef CGAL::value_type_traits::type MassPoint; + + typedef CGAL::First_of_pair_property_map Point_property_map; + typedef CGAL::Second_of_pair_property_map Mass_property_map; + + typedef CGAL::Optimal_transportation_reconstruction_2 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 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 new_samples; + std::vector::const_iterator it = m_samples.begin(); + std::vector::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 final_samples; + std::vector::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(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::iterator it; + for (it = m_samples.begin(); it != m_samples.end(); it++) { + Sample_& sample = *it; + Point& point = sample.point(); + point = point + random_vec(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::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::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 image(qPrintable(fileName)); + std::cerr << "done" << std::endl; + + std::cerr << "computing grayscale..."; + cimg_library::CImg 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 image(qPrintable(fileName)); + std::cerr << "done" << std::endl; + + std::cerr << "computing gradient..."; + cimg_library::CImgList grad = image.get_gradient(); + cimg_library::CImg 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 isolated_points; + std::vector edges; + + m_pwsrec->list_output(std::back_inserter(isolated_points), std::back_inserter(edges)); + + int vertex_count = 0; + for (std::vector::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::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::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 selected; + + std::vector::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::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 points; + std::vector isolated_vertices; + std::vector > 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::iterator pit; + for (pit = points.begin(); pit != points.end(); pit++) + std::cout << *pit << std::endl; + + // isolated vertices + std::vector::iterator vit; + for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++) + std::cout << "1 " << *vit << std::endl; + + // edges + std::vector >::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::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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/window.cpp cgal-4.8/demo/Optimal_transportation_reconstruction_2/window.cpp --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/window.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/window.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,642 @@ +// STL +#include + +// Qt +#include +#include +#include +#include +#include +#include + +// 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(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 -Nru cgal-4.7/demo/Optimal_transportation_reconstruction_2/window.h cgal-4.8/demo/Optimal_transportation_reconstruction_2/window.h --- cgal-4.7/demo/Optimal_transportation_reconstruction_2/window.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Optimal_transportation_reconstruction_2/window.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,119 @@ +#ifndef WINDOW_ +#define WINDOW_ + +// SLT +#include + +// Qt +#include +#include + +// 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 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 -Nru cgal-4.7/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h cgal-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h --- cgal-4.7/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_2_triangulation_2/include/CGAL/Qt/PeriodicTriangulationGraphicsItem.h 2016-04-04 19:00:11.000000000 +0000 @@ -154,9 +154,10 @@ visible_edges(true), visible_vertices(true), type(NONE) { - setVerticesPen(QPen(::Qt::red, 1.)); + 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(); } diff -Nru cgal-4.7/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp cgal-4.8/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp --- cgal-4.7/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_2_triangulation_2/Periodic_2_Delaunay_triangulation_2.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -126,7 +126,6 @@ // and the input they generate is passed to the triangulation with // the signal/slot mechanism pt_pi = new CGAL::Qt::TriangulationPointInputAndConflictZone(&scene, &triang, this ); - QObject::connect(pt_pi, SIGNAL(generate(CGAL::Object)), this, SLOT(processInput(CGAL::Object))); @@ -146,6 +145,7 @@ this, SIGNAL(changed())); pt_cc = new CGAL::Qt::TriangulationCircumcircle(&scene, &triang, this); + pt_cc ->setPen(QPen(::Qt::black, .01)); QObject::connect(pt_cc, SIGNAL(modelChanged()), this, SIGNAL(changed())); diff -Nru cgal-4.7/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h cgal-4.8/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h --- cgal-4.7/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_2_triangulation_2/TriangulationConflictZone.h 2016-04-04 19:00:11.000000000 +0000 @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -81,9 +82,10 @@ ++it){ if(! m_tr->is_infinite(*it)){ QGraphicsPolygonItem *item = new QGraphicsPolygonItem(m_convert(m_tr->triangle(*it))); - QColor color(::Qt::blue); + QColor color = ::Qt::blue; color.setAlpha(150); - item->setBrush(color); + item->setBrush(QBrush(color)); + item->setPen(QPen(::Qt::black, .01)); m_scene->addItem(item); qfaces.push_back(item); } diff -Nru cgal-4.7/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h cgal-4.8/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h --- cgal-4.7/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_2_triangulation_2/TriangulationPointInputAndConflictZone.h 2016-04-04 19:00:11.000000000 +0000 @@ -5,6 +5,7 @@ #include #include #include +#include #include #include @@ -71,9 +72,10 @@ it != faces.end(); ++it) { QGraphicsPolygonItem *item = new QGraphicsPolygonItem(convert(dt->triangle(*it))); - QColor color(::Qt::blue); + QColor color = ::Qt::blue; color.setAlpha(150); - item->setBrush(color); + item->setBrush(QBrush(color)); + item->setPen(QPen(::Qt::black, .01)); scene_->addItem(item); qfaces.push_back(item); } diff -Nru cgal-4.7/demo/Periodic_3_triangulation_3/Scene.cpp cgal-4.8/demo/Periodic_3_triangulation_3/Scene.cpp --- cgal-4.7/demo/Periodic_3_triangulation_3/Scene.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_3_triangulation_3/Scene.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,3 +1,33 @@ +//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" @@ -774,12 +804,14 @@ // 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(); @@ -1388,7 +1420,7 @@ Point cp = Point(c.x(),c.y(),c.z()); // project facet center double px,py,pz; - gluProject(cp.x(),cp.y(),cp.z(), + project(cp.x(),cp.y(),cp.z(), modelMatrix, projMatrix, viewport, &px,&py,&pz); cf.push_back(Projected_triangle(pz,Triangle(p,q,r))); @@ -1499,7 +1531,7 @@ Point cp = Point(c.x(),c.y(),c.z()); // project facet center double px,py,pz; - gluProject(cp.x(),cp.y(),cp.z(), + project(cp.x(),cp.y(),cp.z(), modelMatrix, projMatrix, viewport, &px,&py,&pz); bfm.push_back(Projected_triangle(pz,Triangle(p,q,r))); @@ -2182,3 +2214,54 @@ } + +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 -Nru cgal-4.7/demo/Periodic_3_triangulation_3/Scene.h cgal-4.8/demo/Periodic_3_triangulation_3/Scene.h --- cgal-4.7/demo/Periodic_3_triangulation_3/Scene.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Periodic_3_triangulation_3/Scene.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,10 +31,11 @@ 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(); @@ -220,7 +221,11 @@ 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, diff -Nru cgal-4.7/demo/Polyhedron/C3t3_type.h cgal-4.8/demo/Polyhedron/C3t3_type.h --- cgal-4.7/demo/Polyhedron/C3t3_type.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/C3t3_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#include "Polyhedron_type.h" +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES +#include "Image_type.h" +#include +#include +#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 +#include + +#include +#include +#include +#include + +#include + +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS +template +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 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 + +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES +typedef CGAL::Labeled_image_mesh_domain_3 Image_domain1; +typedef CGAL::Polyhedron_demo_labeled_mesh_domain_3 Image_domain; +typedef CGAL::Mesh_domain_with_polyline_features_3 Image_mesh_domain; +#endif +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS +typedef Wrapper Function_wrapper; +typedef CGAL::Labeled_mesh_domain_3 Function_domain; +typedef CGAL::Polyhedron_demo_labeled_mesh_domain_3 Function_mesh_domain; +#endif + +// Triangulation +#ifdef CGAL_CONCURRENT_MESH_3 + typedef CGAL::Mesh_triangulation_3::Kernel, + CGAL::Parallel_tag>::type Tr; +#else + typedef CGAL::Mesh_triangulation_3::type Tr; +#endif +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + +typedef Tr::Geom_traits Geom_traits; + +// 3D complex + +#endif // CGAL_DEMO_MESH_3_C3T3_TYPE_H diff -Nru cgal-4.7/demo/Polyhedron/Camera_positions_list.cpp cgal-4.8/demo/Polyhedron/Camera_positions_list.cpp --- cgal-4.7/demo/Polyhedron/Camera_positions_list.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Camera_positions_list.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -#include "Camera_positions_list.h" - -#include "ui_Camera_positions_list.h" -#include -#include -#include -#include -#include - -#include "Viewer_interface.h" - -#include - -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)); - } - } -} - diff -Nru cgal-4.7/demo/Polyhedron/Camera_positions_list.h cgal-4.8/demo/Polyhedron/Camera_positions_list.h --- cgal-4.7/demo/Polyhedron/Camera_positions_list.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Camera_positions_list.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -#ifndef CAMERA_POSITIONS_LIST_H -#define CAMERA_POSITIONS_LIST_H - -#include -#include - -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 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 activatedRow(QModelIndex index); - -protected: - void addItem(QString, QString); - -private: - Viewer_interface* m_viewer; - int counter; - QListView* m_listView; - QStandardItemModel* m_model; -}; - -#endif diff -Nru cgal-4.7/demo/Polyhedron/Camera_positions_list.ui cgal-4.8/demo/Polyhedron/Camera_positions_list.ui --- cgal-4.7/demo/Polyhedron/Camera_positions_list.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Camera_positions_list.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ - - - Camera_positions_list - - - - 0 - 0 - 400 - 300 - - - - Camera positions - - - - - - - - - &Open list - - - Ctrl+O - - - - - - - &Save list - - - Ctrl+S - - - - - - - ... - - - - :/cgal/icons/plus:/cgal/icons/plus - - - - - - - ... - - - - :/cgal/icons/minus:/cgal/icons/minus - - - - - - - &Clear - - - - - - - &Up - - - Ctrl+U - - - - - - - &Down - - - Ctrl+D - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/CGAL_demo/Scene_interface.h cgal-4.8/demo/Polyhedron/CGAL_demo/Scene_interface.h --- cgal-4.7/demo/Polyhedron/CGAL_demo/Scene_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/CGAL_demo/Scene_interface.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -#ifndef SCENE_INTERFACE_H -#define SCENE_INTERFACE_H - -#include -#include -#include -#include -#include - -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 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 -Nru cgal-4.7/demo/Polyhedron/CGAL_demo/Viewer_interface.h cgal-4.8/demo/Polyhedron/CGAL_demo/Viewer_interface.h --- cgal-4.7/demo/Polyhedron/CGAL_demo/Viewer_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/CGAL_demo/Viewer_interface.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -#ifndef VIEWER_INTERFACE_H -#define VIEWER_INTERFACE_H - -#include -#include -#include -#include -#include -// 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, public QOpenGLFunctions_2_1 { - - Q_OBJECT - -public: - Viewer_interface(QWidget* parent) : QGLViewer(CGAL::Qt::createOpenGLContext(), 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; - typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); - typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); - typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint target, GLuint attachment, GLuint textarget, GLuint texture, GLint level); - PFNGLDRAWARRAYSINSTANCEDARBPROC glDrawArraysInstanced; - PFNGLVERTEXATTRIBDIVISORARBPROC glVertexAttribDivisor; - PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2D; - bool extension_is_found; - GLfloat pickMatrix_[16]; - -Q_SIGNALS: - void selected(int); - void requestContextMenu(QPoint global_pos); - void selectedPoint(double, double, double); - void selectionRay(double, double, double, double, double, double); - -public Q_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 -Nru cgal-4.7/demo/Polyhedron/CMakeLists.txt cgal-4.8/demo/Polyhedron/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -17,14 +17,23 @@ 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) - +#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 ) @@ -34,16 +43,13 @@ "Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF) # Find Qt5 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(CGAL COMPONENTS Qt5) +find_package(CGAL COMPONENTS Qt5 ImageIO) include( ${CGAL_USE_FILE} ) -find_package(Qt5 QUIET COMPONENTS OpenGL Script Svg Xml ScriptTools) + +find_package(Qt5 + QUIET + COMPONENTS OpenGL Script Svg Xml + OPTIONAL_COMPONENTS ScriptTools) # Find OpenGL find_package(OpenGL) @@ -52,12 +58,12 @@ if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) - include_directories( ${QT_INCLUDE_DIR}/QtScriptTools ) + add_definitions(-DSCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE) find_package(QGLViewer ) endif(Qt5_FOUND) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) if (EIGEN3_FOUND) include( ${EIGEN3_USE_FILE} ) endif(EIGEN3_FOUND) @@ -77,34 +83,50 @@ 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( 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( remeshingUI_FILES Remeshing_dialog.ui) - qt5_wrap_ui( Mean_curvature_flow_skeleton_pluginUI_FILES Mean_curvature_flow_skeleton_plugin.ui) - qt5_wrap_ui( meshingUI_FILES Meshing_dialog.ui ) - qt5_wrap_ui( cameraUI_FILES Camera_positions_list.ui ) qt5_wrap_ui( PreferencesUI_FILES Preferences.ui ) - qt5_wrap_ui( point_inside_polyhedronUI_FILES Point_inside_polyhedron_widget.ui) - qt5_wrap_ui( point_set_selectionUI_FILES Point_set_selection_widget.ui) - qt5_wrap_ui( polyhedron_slicerUI_FILES Polyhedron_slicer_widget.ui) - qt5_wrap_ui( segmentationUI_FILES Mesh_segmentation_widget.ui) - qt5_wrap_ui( hole_fillingUI_FILES Hole_filling_widget.ui) - qt5_wrap_ui( fairingUI_FILES Fairing_widget.ui) - qt5_wrap_ui( selectionUI_FILES Selection_widget.ui) - qt5_wrap_ui( funcUI_FILES Function_dialog.ui ) - qt5_wrap_ui( shortestPathUI_FILES Shortest_path_widget.ui ) - - qt5_generate_moc( "MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp" ) + 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( 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" ) qt5_generate_moc( "Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp" ) @@ -118,137 +140,174 @@ add_library(gl_splat SHARED GlSplat/GlSplat.cpp GlSplat/Shader.cpp ${gl_splat_rc}) qt5_use_modules(gl_splat OpenGL Gui Xml) - target_link_libraries(gl_splat ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${GLEW_LIBRARIES}) - qt5_generate_moc( "CGAL_demo/Viewer_interface.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_interface_moc.cpp" ) + 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 ") + 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 ") + 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 ") + endif() # AUXILIARY LIBRARIES - # put plugins (which are shared libraries) at the same location as + # 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_moc.cpp + Viewer.cpp Viewer_interface_moc.cpp - Scene_item.cpp #Scene_item.moc + 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} - ${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} ) 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) - target_link_libraries(point_dialog ${QT_LIBRARIES}) 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 ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES}) + target_link_libraries(${item_name} demo_framework ${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) + 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 Scene_combinatorial_map_item.cpp)# Scene_combinatorial_map_item.moc) + 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)# Scene_polylines_item.moc) + add_item(scene_polylines_item Scene_polylines_item.cpp) - add_item(scene_polyhedron_item_decorator Scene_polyhedron_item_decorator.cpp )#Scene_polyhedron_item_decorator.moc) + 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)# Scene_polyhedron_item_k_ring_selection.moc) + 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)# Scene_polyhedron_selection_item.moc) + 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 Scene_polyhedron_shortest_path_item.cpp) + 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 ) - add_item(scene_textured_polyhedron_item Scene_textured_polyhedron_item.cpp texture.cpp)# Scene_textured_polyhedron_item.moc) + 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 )#Scene_implicit_function_item.moc) + 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)# Scene_polygon_soup_item.moc) + 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)# Scene_nef_polyhedron_item.moc + 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)# Scene_points_with_normal_item.moc) - target_link_libraries( scene_points_with_normal_item gl_splat ${GLEW_LIBRARIES} ) - target_link_libraries( demo_framework gl_splat ${GLEW_LIBRARIES} ) + 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 ) + 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 - File_loader_dialog_moc.cpp - ${FileLoaderDialogUI_files} ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} ) - add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 ) - qt5_use_modules(Polyhedron_3 Gui OpenGL Xml Widgets Script Svg ) - 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) - + 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 ) - # Link with Qt libraries if( POLYHEDRON_QTSCRIPT_DEBUGGER ) - add_definitions( -DQT_SCRIPTTOOLS_LIB ) - target_link_libraries( Polyhedron_3 QtScriptTools ) + 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 ${QT_LIBRARIES} ) target_link_libraries( Polyhedron_3 demo_framework ) - target_link_libraries( Polyhedron_3 point_dialog ) - target_link_libraries( Polyhedron_3 gl_splat ${GLEW_LIBRARIES}) # Link with CGAL target_link_libraries( Polyhedron_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) @@ -263,236 +322,13 @@ ########### # 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 ) - 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 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) + 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() - 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) - - qt5_wrap_ui( advancing_frontUI_FILES Polyhedron_demo_advancing_front_plugin.ui) - polyhedron_demo_plugin(advancing_front_plugin Polyhedron_demo_advancing_front_plugin ${advancing_frontUI_FILES}) - target_link_libraries(advancing_front_plugin scene_polygon_soup_item scene_points_with_normal_item) - - if(EIGEN3_FOUND) - qt5_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 ) - - qt5_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) - - qt5_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) - - qt5_wrap_ui( vcm_normal_estimationUI_FILES Polyhedron_demo_vcm_normal_estimation_plugin.ui) - polyhedron_demo_plugin(vcm_normal_estimation_plugin Polyhedron_demo_vcm_normal_estimation_plugin ${vcm_normal_estimationUI_FILES}) - target_link_libraries(vcm_normal_estimation_plugin scene_points_with_normal_item) - - qt5_wrap_ui( features_detection_pluginUI_FILES Polyhedron_demo_features_detection_plugin.ui) - polyhedron_demo_plugin(features_detection_plugin Polyhedron_demo_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 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 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. 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.") - message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection 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 scene_polyhedron_selection_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(mean_curvature_flow_skeleton_plugin Polyhedron_demo_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) - - 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" ) - qt5_wrap_ui( editionUI_FILES Deform_mesh.ui ) - #qt5_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) - - qt5_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) - - qt5_wrap_ui( ps_outliers_removal_UI_FILES Polyhedron_demo_point_set_outliers_removal_plugin.ui) - - polyhedron_demo_plugin(point_set_selection_plugin Polyhedron_demo_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 Polyhedron_demo_point_set_shape_detection_plugin.ui) - polyhedron_demo_plugin(point_set_shape_detection_plugin Polyhedron_demo_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) - - qt5_wrap_ui(point_set_wlopFILES Polyhedron_demo_point_set_wlop_plugin.ui) - polyhedron_demo_plugin(point_set_wlop_plugin Polyhedron_demo_point_set_wlop_plugin ${point_set_wlopFILES}) - target_link_libraries(point_set_wlop_plugin scene_points_with_normal_item) - - qt5_wrap_ui(point_set_bilateral_smoothingUI_FILES Polyhedron_demo_point_set_bilateral_smoothing_plugin.ui) - polyhedron_demo_plugin(point_set_bilateral_smoothing_plugin Polyhedron_demo_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(point_set_upsamplingUI_FILES Polyhedron_demo_point_set_upsampling_plugin.ui) - polyhedron_demo_plugin(point_set_upsampling_plugin Polyhedron_demo_point_set_upsampling_plugin ${point_set_upsamplingUI_FILES}) - target_link_libraries(point_set_upsampling_plugin scene_points_with_normal_item) - - qt5_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) - - if(EIGEN3_FOUND AND ${EIGEN3_VERSION} VERSION_GREATER "3.1.90") - polyhedron_demo_plugin(hole_filling_plugin Polyhedron_demo_hole_filling_plugin ${hole_fillingUI_FILES}) - target_link_libraries(hole_filling_plugin scene_polyhedron_item scene_polylines_item) - - polyhedron_demo_plugin(hole_filling_polyline_plugin Polyhedron_demo_hole_filling_polyline_plugin) - target_link_libraries(hole_filling_polyline_plugin scene_polyhedron_item scene_polylines_item) - - polyhedron_demo_plugin(fairing_plugin Polyhedron_demo_fairing_plugin ${fairingUI_FILES}) - target_link_libraries(fairing_plugin scene_polyhedron_selection_item) - 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(selection_plugin Polyhedron_demo_selection_plugin ${selectionUI_FILES}) - target_link_libraries(selection_plugin scene_polyhedron_selection_item scene_points_with_normal_item scene_polylines_item) - - polyhedron_demo_plugin(shortest_path_plugin Polyhedron_demo_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) # # Exporting # @@ -518,6 +354,7 @@ 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) diff -Nru cgal-4.7/demo/Polyhedron/concurrent_mesher_config.cfg cgal-4.8/demo/Polyhedron/concurrent_mesher_config.cfg --- cgal-4.7/demo/Polyhedron/concurrent_mesher_config.cfg 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/concurrent_mesher_config.cfg 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,27 @@ +#========================================== +#======== Worksharing strategy =========== +#========================================== + +locking_grid_num_cells_per_axis = 50 +first_grid_lock_radius = 0 + + +#========================================== +#============= Brute-force ================ +#========================================== + +#locking_grid_num_cells_per_axis = 30 +#first_grid_lock_radius = 2 + + +#========================================== +#=============== Other ==================== +#========================================== + +refinement_grainsize = 10 # for parallel_for techniques +refinement_batch_size = 10000 # for parallel_for technique +work_stats_grid_num_cells_per_axis = 5 # for "task" technique +num_work_items_per_batch = 50 # for "task" technique +min_num_vertices_of_coarse_mesh = 100 +num_vertices_of_coarse_mesh_per_core = 3.5 +num_pseudo_infinite_vertices_per_core = 5.0 \ No newline at end of file diff -Nru cgal-4.7/demo/Polyhedron/create_sphere.h cgal-4.8/demo/Polyhedron/create_sphere.h --- cgal-4.7/demo/Polyhedron/create_sphere.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/create_sphere.h 2016-04-04 19:00:12.000000000 +0000 @@ -6,14 +6,15 @@ #include template -void create_flat_sphere(double R, +void create_flat_sphere(FLOAT R, std::vector& positions_spheres, - std::vector& normals_spheres) + std::vector& normals_spheres, + int prec = 36) { //The more small they are, the more precise the Sphere will be. - // Must be a multiple of 360 and 180. - const int rings=18; - const int sectors=38; + // Must be divisors of 180 and 360. + const int rings=prec/2; + const int sectors=prec; const float to_rad = static_cast(CGAL_PI / 180.0); float T, P; @@ -181,15 +182,16 @@ } template -void create_flat_and_wire_sphere(double R, +void create_flat_and_wire_sphere(FLOAT R, std::vector& positions_spheres, std::vector& normals_spheres, - std::vector& positions_wire_spheres) + std::vector& positions_wire_spheres, + int prec = 36) { - //The more small they are, the more precise the Sphere will be. - // Must be a multiple of 360 and 180. - const int rings=18; - const int sectors=38; + //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(CGAL_PI / 180.0); create_flat_sphere(R, positions_spheres, normals_spheres); diff -Nru cgal-4.7/demo/Polyhedron/Deform_mesh.ui cgal-4.8/demo/Polyhedron/Deform_mesh.ui --- cgal-4.7/demo/Polyhedron/Deform_mesh.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Deform_mesh.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,353 +0,0 @@ - - - DeformMesh - - - - 0 - 0 - 357 - 491 - - - - Surface Mesh Deformation - - - - - - - Selection - - - - - - - - - - - - Brush Size ROI: - - - - - - - Control Vertices Brush Size: - - - - - - - - - - - - - - - - - - - - - - - - - Set All Vertices as ROI - - - - - - - Clear ROI - - - - - - - - - - - - Use Shift + Left Click to paint ROI vertices - - - ROI - - - true - - - - - - - Use Shift + Left Click to paint control vertices - - - Control vertices - - - - - - - - - - - - - Insertion - - - true - - - - - - - Removal - - - - - - - - - - - - - - - - - - - - - - - Isolated Component Size: - - - - - - - 999999999 - - - 8 - - - - - - - Get Minimum - - - - - - - - - Select Isolated Components Below Threshold - - - - - - - - - - - - Group of Control Vertices Navigation - - - - - - - - - 0 - 0 - - - - << - - - - - - - >> - - - - - - - - - - - Create new - - - - - - - Delete - - - - - - - - - Activate Pivoting - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Update Original Positions - - - - - - - - - Qt::Horizontal - - - - - - - - - Show ROI - - - true - - - - - - - Show As Sphere - - - false - - - - - - - - - - - Save ROI / Control Vertices - - - - - - - Load ROI / Control Vertices - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Apply and Close - - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Fairing_widget.ui cgal-4.8/demo/Polyhedron/Fairing_widget.ui --- cgal-4.7/demo/Polyhedron/Fairing_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Fairing_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ - - - Fairing - - - - 0 - 0 - 296 - 248 - - - - Fairing - - - - - - - Fairing - - - - - - - - Weight Type: - - - - - - - 0 - - - - Cotangent Weight - - - - - Uniform Weight - - - - - - - - - - - - Continuity: - - - - - - - 0 - - - 2 - - - 1 - - - - - - - - - Fair a region defined by a selection of vertices - - - - - - - - - - Refining - - - - - - - - Density Control Factor: - - - - - - - 96.989999999999995 - - - 0.200000000000000 - - - 2.410000000000000 - - - - - - - - - Refine a region defined by a selection of faces - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/FileLoaderDialog.ui cgal-4.8/demo/Polyhedron/FileLoaderDialog.ui --- cgal-4.7/demo/Polyhedron/FileLoaderDialog.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/FileLoaderDialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -17,7 +17,7 @@ - Select a loader + Select a Loader Qt::LeftToRight diff -Nru cgal-4.7/demo/Polyhedron/Function_dialog.ui cgal-4.8/demo/Polyhedron/Function_dialog.ui --- cgal-4.7/demo/Polyhedron/Function_dialog.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Function_dialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ - - - FunctionDialog - - - - 0 - 0 - 399 - 149 - - - - - 0 - 0 - - - - Load Function - - - - - 40 - 100 - 341 - 32 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 20 - 40 - 261 - 26 - - - - - - - 20 - 20 - 251 - 16 - - - - Please choose the function to load: - - - - - - - buttonBox - accepted() - FunctionDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - FunctionDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake cgal-4.8/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake --- cgal-4.7/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/cmake/FindGLEW.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ -# Copyright (c) 2009 Boudewijn Rempt -# -# 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 -Nru cgal-4.7/demo/Polyhedron/GlSplat/CMakeLists.txt cgal-4.8/demo/Polyhedron/GlSplat/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/GlSplat/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -10,12 +10,11 @@ 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}) +include_directories( ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR}) set(srcs Shader.cpp GlSplat.cpp) @@ -23,7 +22,7 @@ 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}) +target_link_libraries(GlSplat ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ) find_package(QGLViewer) if(QGLVIEWER_FOUND) @@ -33,3 +32,4 @@ else() message("QGLViewer not found, demo won't be built") endif() +include( polyhedron_demo_macros ) diff -Nru cgal-4.7/demo/Polyhedron/GlSplat/GlSplat.cpp cgal-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp --- cgal-4.7/demo/Polyhedron/GlSplat/GlSplat.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/GlSplat.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -57,7 +57,7 @@ std::cerr << "failed to load shader file " << filename.toLatin1().data() << "\n"; return res; } - else qDebug("Succesfully loaded shader func '%s' in file '%s'",qPrintable(func),qPrintable(filename)); + else qDebug("Successfully loaded shader func '%s' in file '%s'",qPrintable(func),qPrintable(filename)); QTextStream stream(&f); res = stream.readAll(); f.close(); @@ -110,8 +110,6 @@ mIsSupported = true; if(qglw) qglw->makeCurrent(); - - //glewInit(); const char* rs = (const char*)glGetString(GL_RENDERER); QString rendererString(""); if(rs) @@ -119,15 +117,13 @@ 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 ()) @@ -136,20 +132,11 @@ 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; @@ -160,7 +147,6 @@ mShaderSrcs[3] = loadSource("AttributeFP","Raycasting.glsl"); mShaderSrcs[4] = ""; mShaderSrcs[5] = loadSource("Finalization","Finalization.glsl"); - mCurrentPass = 2; mBindedPass = -1; mIsInitialized = true; @@ -523,7 +509,7 @@ mParams.radiusScale = v; } -void SplatRenderer::setViewer(Viewer_interface *v) +void SplatRenderer::setViewer(CGAL::Three::Viewer_interface *v) { viewer = v; for(int i=0; i<3; i++) diff -Nru cgal-4.7/demo/Polyhedron/GlSplat/GlSplat.h cgal-4.8/demo/Polyhedron/GlSplat/GlSplat.h --- cgal-4.7/demo/Polyhedron/GlSplat/GlSplat.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/GlSplat.h 2016-04-04 19:00:12.000000000 +0000 @@ -140,10 +140,15 @@ */ void setRadiusScale(float v); - void setViewer(Viewer_interface *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 : - Viewer_interface *viewer; + CGAL::Three::Viewer_interface *viewer; }; diff -Nru cgal-4.7/demo/Polyhedron/GlSplat/Shader.cpp cgal-4.8/demo/Polyhedron/GlSplat/Shader.cpp --- cgal-4.7/demo/Polyhedron/GlSplat/Shader.cpp 2015-10-07 13:02:59.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/Shader.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -133,7 +133,7 @@ } } -void Shader::setViewer(Viewer_interface *v) +void Shader::setViewer(CGAL::Three::Viewer_interface *v) { viewer = v; } diff -Nru cgal-4.7/demo/Polyhedron/GlSplat/Shader.h cgal-4.8/demo/Polyhedron/GlSplat/Shader.h --- cgal-4.7/demo/Polyhedron/GlSplat/Shader.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/GlSplat/Shader.h 2016-04-04 19:00:12.000000000 +0000 @@ -19,7 +19,7 @@ #include #include #include -#include "Viewer_interface.h" +#include namespace GlSplat { @@ -49,7 +49,7 @@ ~Shader() { } - void setViewer(Viewer_interface *); + void setViewer(CGAL::Three::Viewer_interface *); /** add a \#define */ void define(const char* name, const char* value); @@ -124,7 +124,7 @@ inline void setUniform(const char* name, float a, float b, float c, float d) { viewer->glUniform4f(viewer->glGetUniformLocation(mProgramID, name), a, b, c, d); } - Viewer_interface *viewer; + CGAL::Three::Viewer_interface *viewer; protected: bool mIsValid; diff -Nru cgal-4.7/demo/Polyhedron/Hole_filling_widget.ui cgal-4.8/demo/Polyhedron/Hole_filling_widget.ui --- cgal-4.7/demo/Polyhedron/Hole_filling_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Hole_filling_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,314 +0,0 @@ - - - HoleFilling - - - true - - - - 0 - 0 - 815 - 973 - - - - Hole Filling - - - - true - - - - - - - - Action: - - - - - - - 2 - - - - Triangulate - - - - - Triangulate + Refine - - - - - Triangulate + Refine + Fair - - - - - - - - - - Hole Filling Parameters - - - - - - Use 3D Delaunay Triangulation Search Space - - - true - - - - - - - Skip Hole Fillings Making the Surface Self Intersecting - - - - - - - - - Small Hole #Vertices Threshold - - - - - - - 0 - - - 999999999.000000000000000 - - - 1.000000000000000 - - - 10.000000000000000 - - - - - - - - - - - - Refinement Parameters - - - - - - - - Density Factor - - - - - - - 96.989999999999995 - - - 0.200000000000000 - - - 1.410000000000000 - - - - - - - - - - - - Fairing Parameters - - - - - - - - Continuity - - - - - - - 0 - - - 2 - - - 1 - - - - - - - - - - - Weight Type - - - - - - - 1 - - - - Uniform Weight - - - - - Cotangent Weight - - - - - - - - - - - - - Hole Display and Selection - - - - - - true - - - - 75 - true - - - - Detect and Display Holes - - - - - - - - - Select All Holes - - - - - - - Select Small Holes - - - - - - - Deselect All Holes - - - - - - - - - Note: Use CTRL+Left mouse click to manually select/deselect a hole - - - - - - - - - - Actions - - - - - - - - true - - - Fill Selected Holes - - - - - - - Create Polyline Items for Selected Holes - - - - - - - - - - - - - - Reject - - - - - - - Accept - - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Image_type_fwd.h cgal-4.8/demo/Polyhedron/Image_type_fwd.h --- cgal-4.7/demo/Polyhedron/Image_type_fwd.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Image_type_fwd.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef IMAGE_TYPE_FWD_H +#define IMAGE_TYPE_FWD_H + +namespace CGAL { + class Image_3; +} + +#endif // IMAGE_TYPE_FWD_H diff -Nru cgal-4.7/demo/Polyhedron/Image_type.h cgal-4.8/demo/Polyhedron/Image_type.h --- cgal-4.7/demo/Polyhedron/Image_type.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Image_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,8 @@ +#ifndef IMAGE_TYPE_H +#define IMAGE_TYPE_H + +#include + +typedef CGAL::Image_3 Image; + +#endif // IMAGE_TYPE_H diff -Nru cgal-4.7/demo/Polyhedron/implicit_functions/Implicit_function_interface.h cgal-4.8/demo/Polyhedron/implicit_functions/Implicit_function_interface.h --- cgal-4.7/demo/Polyhedron/implicit_functions/Implicit_function_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/implicit_functions/Implicit_function_interface.h 2016-04-04 19:00:12.000000000 +0000 @@ -27,12 +27,12 @@ #include #include -#include +#include class Implicit_function_interface { public: - typedef Scene_interface::Bbox Bbox; + typedef CGAL::Three::Scene_interface::Bbox Bbox; virtual ~Implicit_function_interface() {} diff -Nru cgal-4.7/demo/Polyhedron/include/CGAL/gl_render.h cgal-4.8/demo/Polyhedron/include/CGAL/gl_render.h --- cgal-4.7/demo/Polyhedron/include/CGAL/gl_render.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/include/CGAL/gl_render.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,98 +0,0 @@ -#ifndef _GL_RENDER_ -#define _GL_RENDER_ - -#include -#include - - - -inline void CGALglcolor(QColor c, int dv = 0) -{ - if ( 0 != dv ) - { - c = c.darker(dv); -#undef darker - } - ::glColor4d(c.red()/255.0, c.green()/255.0, c.blue()/255.0, c.alpha()/255.0); -} - -template -void gl_render_facets(Polyhedron& polyhedron, const std::vector& colors) -{ - typedef typename Polyhedron::Traits Kernel; - typedef typename Kernel::Point_3 Point; - typedef typename Kernel::Vector_3 Vector; - 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 = CGAL::Polygon_mesh_processing::compute_face_normal(f, polyhedron); - ::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 = CGAL::Polygon_mesh_processing::compute_vertex_normal(he->vertex(), polyhedron); - ::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 -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 -Nru cgal-4.7/demo/Polyhedron/include/CGAL/statistics_helpers.h cgal-4.8/demo/Polyhedron/include/CGAL/statistics_helpers.h --- cgal-4.7/demo/Polyhedron/include/CGAL/statistics_helpers.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/include/CGAL/statistics_helpers.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,141 @@ +#ifndef POLYHEDRON_DEMO_STATISTICS_HELPERS_H +#define POLYHEDRON_DEMO_STATISTICS_HELPERS_H + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +template +void angles(Polyhedron* poly, double& mini, double& maxi, double& ave) +{ + using namespace boost::accumulators; + typedef typename boost::graph_traits::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::type + vpmap = get(CGAL::vertex_point, *poly); + BOOST_FOREACH(halfedge_descriptor h, halfedges(*poly)) + { + if (face(h, *poly) == boost::graph_traits::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 +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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + + accumulator_set< double, + features< tag::min, tag::max, tag::mean , tag::median> > acc; + + typename boost::property_map::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 +unsigned int nb_degenerate_faces(Polyhedron* poly, VPmap vpmap) +{ + typedef typename boost::graph_traits::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 +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 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 -Nru cgal-4.7/demo/Polyhedron/include/CGAL/Triangulation_file_input.h cgal-4.8/demo/Polyhedron/include/CGAL/Triangulation_file_input.h --- cgal-4.7/demo/Polyhedron/include/CGAL/Triangulation_file_input.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/include/CGAL/Triangulation_file_input.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +// + +#ifndef CGAL_TRIANGULATION_FILE_INPUT_3_H +#define CGAL_TRIANGULATION_FILE_INPUT_3_H + +#include + +namespace CGAL { + +template +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 -Nru cgal-4.7/demo/Polyhedron/include/Point_set_3.h cgal-4.8/demo/Polyhedron/include/Point_set_3.h --- cgal-4.7/demo/Polyhedron/include/Point_set_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/include/Point_set_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -7,17 +7,10 @@ #include #include #include - #include - #include -#include - -//#ifdef CGAL_GLEW_ENABLED -//#else +#include # include -//#endif - /// The Point_set_3 class is array of points + normals of type /// Point_with_normal_3 (in fact @@ -29,18 +22,22 @@ /// /// 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 Point_set_3 : public std::deque > +class Point_set_3 : public std::vector > { // Private types private: // Base class - typedef std::deque > Base; + typedef std::vector > Base; // Public types public: @@ -67,10 +64,6 @@ // Its superclass: typedef typename UI_point::Point_with_normal Point_with_normal; ///< Position + normal - // Iterator over Point_3 points - typedef typename std::deque::iterator Point_iterator; - typedef typename std::deque::const_iterator Point_const_iterator; - // Data members private: @@ -83,22 +76,41 @@ 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 + 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_points = 0; + m_nb_selected = 0; m_bounding_box_is_valid = false; m_radii_are_uptodate = false; } - // Default copy constructor and operator =() are fine. + // 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 @@ -107,53 +119,75 @@ 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::distance (it, end())); + } + + // Test if point is selected + bool is_selected(const_iterator it) const + { + return static_cast(std::distance (it, end())) <= m_nb_selected; + } + /// Gets the number of selected points. - std::size_t nb_selected_points() const { return m_nb_selected_points; } + std::size_t nb_selected_points() const + { + return m_nb_selected; + } /// Mark a point as selected/not selected. - void select(UI_point* point, bool is_selected = true) + void select(iterator it, bool selected = true) { - if (point->is_selected() != is_selected) - { - point->select(is_selected); - m_nb_selected_points += (is_selected ? 1 : -1); - } + 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; + } } - /// 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) + void select_all() { - 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)); + m_nb_selected = size (); } + void unselect_all() + { + m_nb_selected = 0; + } + // Invert selection void invert_selection() { - for (iterator it = begin(); it != end(); ++ it) - it->select(!(it->is_selected ())); + iterator sel = end() - 1; + iterator unsel = begin(); + + iterator first = first_selected(); - m_nb_selected_points = size() - m_nb_selected_points; + 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(std::remove_if(begin(), end(), std::mem_fun_ref(&UI_point::is_selected)), - end()); + 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_points = 0; + m_nb_selected = 0; invalidate_bounds(); } @@ -214,99 +248,9 @@ 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; } @@ -327,7 +271,7 @@ xmax = ymax = zmax = -1e38; Vector v = CGAL::NULL_VECTOR; FT norm = 0; - for (Point_const_iterator it = begin(); it != end(); it++) + for (const_iterator it = begin(); it != end(); it++) { const Point& p = *it; @@ -365,7 +309,7 @@ // 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++) + 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); diff -Nru cgal-4.7/demo/Polyhedron/include/UI_point_3.h cgal-4.8/demo/Polyhedron/include/UI_point_3.h --- cgal-4.7/demo/Polyhedron/include/UI_point_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/include/UI_point_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -10,12 +10,11 @@ #include -/// The UI_point_3 class represents a 3D point in Surface_reconstruction_points_3 demo. +/// The UI_point_3 class represents a 3D point in Poisson_surface_reconstruction_3 demo. /// It contains: /// - a position, /// - a normal, /// - a radius, -/// - a selection flag. /// /// @heading Parameters: /// @param Gt Geometric traits class. @@ -52,35 +51,30 @@ 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 UI_point_3(const CGAL::Point_with_normal_3& pwn) : Base(pwn) { - m_is_selected = false; m_radius = FT(0); } @@ -88,31 +82,24 @@ UI_point_3(const UI_point_3& upt) : Base(upt) { - m_is_selected = upt.m_is_selected; m_radius = upt.m_radius; } template UI_point_3(const UI_point_3& 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; } @@ -120,9 +107,6 @@ // Data private: - // Selection flag. - bool m_is_selected; - /// radius. FT m_radius; }; diff -Nru cgal-4.7/demo/Polyhedron/Io_implicit_function_plugin.cpp cgal-4.8/demo/Polyhedron/Io_implicit_function_plugin.cpp --- cgal-4.7/demo/Polyhedron/Io_implicit_function_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Io_implicit_function_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,213 +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 -//#include -#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 - -#include -#include -#include -#include -#include -#include -#include -#include - -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) - 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, Scene_interface* scene_interface); - - QList actions() const - { - return QList(); - } - -public Q_SLOTS: - void load_function() const; - -private: - void load_function_plugins(); - -private: - QList 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("menuFile"); - if ( NULL != menuFile ) - { - QList menuFileActions = menuFile->actions(); - - // Look for action just after "Load..." action - QAction* actionAfterLoad = NULL; - for ( QList::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(function_plugin); - - if ( NULL != function ) - { - functions_ << function; - } - } - } - } -} - -#include "Io_implicit_function_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Mainpage.md cgal-4.8/demo/Polyhedron/Mainpage.md --- cgal-4.7/demo/Polyhedron/Mainpage.md 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Mainpage.md 2016-04-04 19:00:12.000000000 +0000 @@ -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 +In the CMakeList.txt file, in the section Plugins, add the following lines : + + 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 +#include +#include + +#include +#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( "

Number of vertices: %3
" + "Number of edges: %3
" + "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::infinity()) + str+=QObject::tr("
Volume: %1").arg(volume); + if (area!=-std::numeric_limits::infinity()) + str+=QObject::tr("
Area: %1").arg(area); + str+="

"; + 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("
Number of isolated vertices : 0
"); + + 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(vertices.size()/3)); + vaos[0]->release(); + program->release(); + + } + + void changed() + { + compute_elements(); + are_buffers_filled = false; + } + +private: + + std::vector 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(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 +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 actions() const { + return QList() << 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 -Nru cgal-4.7/demo/Polyhedron/MainWindow_config.h cgal-4.8/demo/Polyhedron/MainWindow_config.h --- cgal-4.7/demo/Polyhedron/MainWindow_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/MainWindow_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,16 @@ +#ifndef MAINWINDOW_CONFIG_H +#define MAINWINDOW_CONFIG_H + +#include + +#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 -Nru cgal-4.7/demo/Polyhedron/MainWindow.cpp cgal-4.8/demo/Polyhedron/MainWindow.cpp --- cgal-4.7/demo/Polyhedron/MainWindow.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/MainWindow.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,7 +1,7 @@ #include "config.h" #include "MainWindow.h" #include "Scene.h" -#include "Scene_item.h" +#include #include #include @@ -29,9 +29,7 @@ #include #include #include - #include - #ifdef QT_SCRIPT_LIB # include # ifdef QT_SCRIPTTOOLS_LIB @@ -39,12 +37,12 @@ # endif #endif -#include "Polyhedron_demo_plugin_interface.h" -#include "Polyhedron_demo_io_plugin_interface.h" +#include +#include #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" @@ -54,18 +52,18 @@ #ifdef QT_SCRIPT_LIB # include # include - +using namespace CGAL::Three; QScriptValue myScene_itemToScriptValue(QScriptEngine *engine, - Scene_item* const &in) + CGAL::Three::Scene_item* const &in) { return engine->newQObject(in); } void myScene_itemFromScriptValue(const QScriptValue &object, - Scene_item* &out) + CGAL::Three::Scene_item* &out) { - out = qobject_cast(object.toQObject()); + out = qobject_cast(object.toQObject()); } #endif // QT_SCRIPT_LIB @@ -116,14 +114,13 @@ 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); @@ -132,14 +129,12 @@ // 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()), @@ -148,17 +143,21 @@ 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(new SceneDelegate(this)); + sceneView->setItemDelegate(delegate); - sceneView->header()->setStretchLastSection(false); - sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch); - sceneView->header()->setSectionResizeMode(Scene::NameColumn, QHeaderView::Stretch); + //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); @@ -167,7 +166,7 @@ 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())); @@ -184,8 +183,8 @@ connect(scene, SIGNAL(updated()), this, SLOT(selectionChanged())); - connect(scene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), - this, SLOT(removeManipulatedFrame(Scene_item*))); + connect(scene, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), + this, SLOT(removeManipulatedFrame(CGAL::Three::Scene_item*))); connect(scene, SIGNAL(updated_bbox()), this, SLOT(updateViewerBBox())); @@ -193,6 +192,9 @@ 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())); @@ -209,6 +211,19 @@ 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)), @@ -235,6 +250,8 @@ 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(); @@ -265,7 +282,7 @@ #ifdef QT_SCRIPT_LIB std::cerr << "Enable scripts.\n"; script_engine = new QScriptEngine(this); - qScriptRegisterMetaType(script_engine, + qScriptRegisterMetaType(script_engine, myScene_itemToScriptValue, myScene_itemFromScriptValue); # ifdef QT_SCRIPTTOOLS_LIB @@ -273,7 +290,7 @@ debugger->setObjectName("qt script debugger"); QAction* debuggerMenuAction = menuBar()->addMenu(debugger->createStandardMenu()); - debuggerMenuAction->setText(tr("Qt Script &debug")); + debuggerMenuAction->setText(tr("Qt Script &Debug")); for(unsigned int i = 0; i < 9; ++i) { QDockWidget* dock = new QDockWidget(debug_widgets_names[i], this); @@ -323,6 +340,46 @@ 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("menuFile"); + if ( NULL != menuFile ) + { + QList menuFileActions = menuFile->actions(); + + // Look for action just after "Load..." action + QAction* actionAfterLoad = NULL; + for ( QList::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()) { @@ -339,6 +396,18 @@ 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) { @@ -347,15 +416,9 @@ } } - // 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())); - } - } + // 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, @@ -409,6 +472,75 @@ } } +//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()) { + 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()) { + 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()) @@ -416,9 +548,41 @@ initPlugin(obj); initIOPlugin(obj); } - QList plugins_directories; - plugins_directories << qApp->applicationDirPath(); + QString dirPath = qApp->applicationDirPath(); + plugins_directories< actions = ui->menuOperations->actions(); - qSort(actions.begin(), actions.end(), actionsByName); - ui->menuOperations->clear(); - ui->menuOperations->addActions(actions); -} +//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 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 { @@ -482,15 +655,15 @@ bool MainWindow::initPlugin(QObject* obj) { QObjectList childs = this->children(); - Polyhedron_demo_plugin_interface* plugin = - qobject_cast(obj); + CGAL::Three::Polyhedron_demo_plugin_interface* plugin = + qobject_cast(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 = + QScriptValue objectValue = script_engine->newQObject(obj); script_engine->globalObject().setProperty(obj->objectName(), objectValue); evaluate_script_quiet(QString("plugins.push(%1);").arg(obj->objectName())); @@ -512,8 +685,8 @@ bool MainWindow::initIOPlugin(QObject* obj) { - Polyhedron_demo_io_plugin_interface* plugin = - qobject_cast(obj); + CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin = + qobject_cast(obj); if(plugin) { io_plugins << plugin; return true; @@ -653,8 +826,8 @@ 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); + //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); @@ -675,7 +848,7 @@ << "the reload action has not item attached\n"; return; } - Scene_item* item = qobject_cast(item_object); + CGAL::Three::Scene_item* item = qobject_cast(item_object); if(!item) { std::cerr << "Cannot reload item: " << "the reload action has a QObject* pointer attached\n" @@ -690,22 +863,22 @@ return; } - Polyhedron_demo_io_plugin_interface* fileloader = find_loader(loader_name); + CGAL::Three::Polyhedron_demo_io_plugin_interface* fileloader = find_loader(loader_name); QFileInfo fileinfo(filename); - Scene_item* new_item = load_item(fileinfo, fileloader); + 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->invalidate_buffers(); + new_item->invalidateOpenGLBuffers(); 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, +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; @@ -767,7 +940,9 @@ // << filename << "\", with following content:\n" // << program; } + QApplication::setOverrideCursor(Qt::WaitCursor); evaluate_script(program, filename); + QApplication::restoreOverrideCursor(); return; } #endif @@ -791,10 +966,10 @@ { // 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) { + 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->nameFilters(), filename) ) + if ( file_matches_filter(io_plugin->loadNameFilters(), filename) ) selected_items << io_plugin->name(); } } @@ -816,7 +991,7 @@ 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) @@ -827,7 +1002,10 @@ settings.setValue("OFF open directory", fileinfo.absoluteDir().absolutePath()); - Scene_item* scene_item = load_item(fileinfo, find_loader(load_pair.first)); + 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()); } @@ -836,7 +1014,7 @@ bool MainWindow::open(QString filename, QString loader_name) { QFileInfo fileinfo(filename); - Scene_item* item; + CGAL::Three::Scene_item* item; try { item = load_item(fileinfo, find_loader(loader_name)); } @@ -849,8 +1027,8 @@ } -Scene_item* MainWindow::load_item(QFileInfo fileinfo, Polyhedron_demo_io_plugin_interface* loader) { - Scene_item* item = NULL; +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()); @@ -869,6 +1047,7 @@ return item; } + void MainWindow::setFocusToQuickSearch() { ui->searchEdit->setFocus(Qt::ShortcutFocusReason); @@ -884,6 +1063,7 @@ else { QItemSelection s = proxyModel->mapSelectionFromSource(scene->createSelection(i)); + sceneView->selectionModel()->select(s, QItemSelectionModel::ClearAndSelect); } @@ -938,21 +1118,24 @@ int MainWindow::getSelectedSceneItemIndex() const { - QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows(); - if(selectedRows.size() != 1) + QModelIndexList selectedRows = sceneView->selectionModel()->selectedIndexes(); + if(selectedRows.size() == 0) return -1; else { QModelIndex i = proxyModel->mapToSource(selectedRows.first()); - return i.row(); + return scene->getIdFromModelIndex(i); } } QList MainWindow::getSelectedSceneItemIndices() const { - QModelIndexList selectedRows = sceneView->selectionModel()->selectedRows(); + + QModelIndexList selectedIndices = sceneView->selectionModel()->selectedIndexes(); QList result; - Q_FOREACH(QModelIndex index, selectedRows) { - result << proxyModel->mapToSource(index).row(); + Q_FOREACH(QModelIndex index, selectedIndices) { + int temp = scene->getIdFromModelIndex(proxyModel->mapToSource(index)); + if(!result.contains(temp)) + result<setSelectedItemIndex(getSelectedSceneItemIndex()); scene->setSelectedItemsList(getSelectedSceneItemIndices()); - Scene_item* item = scene->item(getSelectedSceneItemIndex()); + 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(Scene_item* item, scene->entries()) { + 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 @@ -995,7 +1178,7 @@ void MainWindow::showSceneContextMenu(int selectedItemIndex, const QPoint& global_pos) { - Scene_item* item = scene->item(selectedItemIndex); + 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."; @@ -1004,9 +1187,14 @@ 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")); + QAction* reload = menu->addAction(tr("&Reload Item from File")); reload->setData(qVariantFromValue(selectedItemIndex)); connect(reload, SIGNAL(triggered()), this, SLOT(reload_item())); @@ -1015,7 +1203,7 @@ saveas->setData(qVariantFromValue(selectedItemIndex)); connect(saveas, SIGNAL(triggered()), this, SLOT(on_actionSaveAs_triggered())); - QAction* showobject = menu->addAction(tr("&Zoom to this object")); + QAction* showobject = menu->addAction(tr("&Zoom to this Object")); showobject->setData(qVariantFromValue(selectedItemIndex)); connect(showobject, SIGNAL(triggered()), this, SLOT(viewerShowObject())); @@ -1023,6 +1211,7 @@ menu->setProperty(prop_name, true); } } + menu->addMenu(ui->menuOperations); if(menu) menu->exec(global_pos); } @@ -1033,10 +1222,27 @@ int index = -1; if(sender == sceneView) { - QModelIndex modelIndex = sceneView->indexAt(p); - if(!modelIndex.isValid()) return; - - index = proxyModel->mapToSource(modelIndex).row(); + 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(); @@ -1045,7 +1251,7 @@ showSceneContextMenu(index, sender->mapToGlobal(p)); } -void MainWindow::removeManipulatedFrame(Scene_item* item) +void MainWindow::removeManipulatedFrame(CGAL::Three::Scene_item* item) { if(item->manipulatable() && item->manipulatedFrame() == viewer->manipulatedFrame()) { @@ -1054,21 +1260,29 @@ } void MainWindow::updateInfo() { - Scene_item* item = scene->item(getSelectedSceneItemIndex()); + 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("
Number of isolated vertices : %1
").arg(item->getNbIsolatedvertices()); if(!item_filename.isEmpty()) { - item_text += QString("
File: %1").arg(item_filename); + item_text += QString("
File: %1").arg(item_filename); } ui->infoLabel->setText(item_text); } - else + else ui->infoLabel->clear(); } - void MainWindow::updateDisplayInfo() { - Scene_item* item = scene->item(getSelectedSceneItemIndex()); + CGAL::Three::Scene_item* item = scene->item(getSelectedSceneItemIndex()); if(item) ui->displayLabel->setPixmap(item->graphicalToolTip()); else @@ -1085,7 +1299,6 @@ 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() @@ -1111,6 +1324,10 @@ void MainWindow::closeEvent(QCloseEvent *event) { + for(int i=0; iclosure(); + } writeSettings(); event->accept(); } @@ -1162,11 +1379,11 @@ QStringList extensions; - typedef QMap FilterPluginMap; + typedef QMap FilterPluginMap; FilterPluginMap filterPluginMap; - Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { - QStringList split_filters = plugin->nameFilters().split(";;"); + 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()) { @@ -1189,18 +1406,17 @@ dialog.setFileMode(QFileDialog::ExistingFiles); if(dialog.exec() != QDialog::Accepted) { return; } - FilterPluginMap::iterator it = filterPluginMap.find(dialog.selectedNameFilter()); - Polyhedron_demo_io_plugin_interface* selectedPlugin = NULL; + CGAL::Three::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; + CGAL::Three::Scene_item* item = NULL; if(selectedPlugin) { QFileInfo info(filename); item = load_item(info, selectedPlugin); @@ -1227,17 +1443,17 @@ return; index = getSelectedSceneItemIndex(); } - Scene_item* item = scene->item(index); + CGAL::Three::Scene_item* item = scene->item(index); if(!item) return; - QVector canSavePlugins; + QVector canSavePlugins; QStringList filters; - Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { + Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { if(plugin->canSave(item)) { canSavePlugins << plugin; - filters += plugin->nameFilters(); + filters += plugin->saveNameFilters(); } } filters << tr("All files (*)"); @@ -1259,12 +1475,12 @@ save(filename, item); } -void MainWindow::save(QString filename, Scene_item* item) { +void MainWindow::save(QString filename, CGAL::Three::Scene_item* item) { QFileInfo fileinfo(filename); - Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { + Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { if( plugin->canSave(item) && - file_matches_filter(plugin->nameFilters(),filename) ) + file_matches_filter(plugin->saveNameFilters(),filename) ) { if(plugin->save(item, fileinfo)) break; @@ -1301,7 +1517,7 @@ Q_FOREACH(QModelIndex index, sceneView->selectionModel()->selectedRows()) { int i = proxyModel->mapToSource(index).row(); - Scene_item* item = scene->item(i); + CGAL::Three::Scene_item* item = scene->item(i); item->setVisible(!item->visible()); scene->itemChanged(i); } @@ -1334,7 +1550,7 @@ item->setCheckState(Qt::Checked); iStandardModel->appendRow(item); } - + //add operations plugins Q_FOREACH(PluginNamePair pair,plugins){ QStandardItem* item = new QStandardItem(pair.second); @@ -1343,7 +1559,7 @@ } //add io-plugins - Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) + Q_FOREACH(CGAL::Three::Polyhedron_demo_io_plugin_interface* plugin, io_plugins) { QStandardItem* item = new QStandardItem(plugin->name()); item->setCheckable(true); @@ -1382,6 +1598,7 @@ 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() ) @@ -1438,3 +1655,217 @@ 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 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(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 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 > items; + items.resize(classnames.size()); + Q_FOREACH(int id, getSelectedSceneItemIndices()) + { + Scene_item* s_item = scene->item(id); + for(int i=0; imetaObject()->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(" """); + Q_FOREACH(Scene_item* sit, items[i]) + { + str.append(QString("").arg(sit->name())); + } + + + + for(int j=0; j") + .arg(QString::number(data.categories[j].second)) + .arg(data.categories[j].first)); + titles_limit+=data.categories[j].second; + str.append(QString("").arg(data.titles.at(title))); + Q_FOREACH(Scene_item* sit, items[i]) + { + str.append(QString("").arg(sit->compute_stats(title))); + } + title++; + for(;title").arg(data.titles.at(title))); + Q_FOREACH(Scene_item* sit, items[i]) + { + str.append(QString("").arg(sit->compute_stats(title))); + } + } + + str.append(""); + } + + str.append(QString("""
%1 %2 %1 %1
%1 %1
")); + } + } + 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 -Nru cgal-4.7/demo/Polyhedron/MainWindow.h cgal-4.8/demo/Polyhedron/MainWindow.h --- cgal-4.7/demo/Polyhedron/MainWindow.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/MainWindow.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,6 +1,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include "config.h" +#include "MainWindow_config.h" #include #include @@ -13,176 +14,370 @@ #include #include #include - +#include 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" -class MainWindow : +/*! + * \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` - Polyhedron_demo_io_plugin_interface* find_loader(const QString& loader_name) const; + /*! 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; - /// 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*); + /*! \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); - - /// Open a file with a given loader, and return true iff it was successful. - /// - /// This slot is for use by scripts. + //!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`. + /*! 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); - void removeSceneItemFromSelection(int i); // same as unSelectSceneItem + /*! + * 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(); - void removeManipulatedFrame(Scene_item*); + //!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(); - void save(QString filename, Scene_item* item); + //!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 createSubMenus(QList); + /*! 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); - - bool onePolygonIsSelected() const; + /*! 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 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 plugin_blacklist; - Scene* scene; Viewer* viewer; QSortFilterProxyModel* proxyModel; QTreeView* sceneView; Ui::MainWindow* ui; - QVector io_plugins; + QVector io_plugins; QMap default_plugin_selection; // typedef to make Q_FOREACH work - typedef QPair PluginNamePair; + typedef QPair PluginNamePair; QVector 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 diff -Nru cgal-4.7/demo/Polyhedron/MainWindow.ui cgal-4.8/demo/Polyhedron/MainWindow.ui --- cgal-4.7/demo/Polyhedron/MainWindow.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/MainWindow.ui 2016-04-04 19:00:12.000000000 +0000 @@ -11,7 +11,7 @@
- CGAL Polyhedron demo + CGAL Three @@ -37,7 +37,7 @@ 0 0 978 - 21 + 26 @@ -53,6 +53,8 @@ + + @@ -69,17 +71,9 @@ &Operations - - - &Subdivision - - - - - - &Boolean operations + &Boolean Operations @@ -89,31 +83,14 @@ - - - Parameterization - - - - - - - PCA - - - - - - - @@ -122,7 +99,7 @@ - &Dock windows + &Dock Windows @@ -138,6 +115,7 @@ + @@ -198,6 +176,28 @@ + + + ... + + + + :/cgal/icons/resources/up.png:/cgal/icons/resources/up.png + + + + + + + ... + + + + :/cgal/icons/resources/down.png:/cgal/icons/resources/down.png + + + + Qt::Horizontal @@ -224,6 +224,9 @@ QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked + + QAbstractItemView::InternalMove + true @@ -231,7 +234,7 @@ QAbstractItemView::ExtendedSelection - 0 + 10 @@ -387,17 +390,17 @@ - Fit &plane + Fit &Plane - Fit &line + Fit &Line - &Curvature estimation + &Curvature Estimation @@ -456,12 +459,12 @@ - &Convex hull + &Convex Hull - &Erase all + &Erase All @@ -486,12 +489,12 @@ - Save a&ll + Save A&ll - Mer&ge all + Mer&ge All @@ -506,17 +509,17 @@ - Select &all + Select &All - Select &none + Select &None - &Invert selection + &Invert Selection @@ -529,17 +532,17 @@ - Set polyhedron A + Set Polyhedron A - Set polyhedron B + Set Polyhedron B - &Inside-out + &Inside-Out @@ -554,12 +557,12 @@ - Mean &value coordinates + Mean &Value Coordinates - Discrete &conformal maps + Discrete &Conformal Maps @@ -569,12 +572,12 @@ - Convert to nef polyhedron + Convert to Nef Polyhedron - Convert to normal polyhedron + Convert to Normal Polyhedron @@ -582,7 +585,7 @@ true - Draw &two sides + Draw &Two Sides Ctrl+T @@ -590,7 +593,7 @@ - Re&center scene + Re&center Scene Ctrl+C @@ -598,12 +601,12 @@ - Change &background color... + Change &Background Color... - &Minkowski sum (A/B) + &Minkowski Sum (A/B) Ctrl+O, M @@ -616,27 +619,27 @@ - Save snapshot + Save Snapshot - &Dump camera coordinates + &Dump Camera Coordinates - &Copy camera + &Copy Camera - &Paste camera + &Paste Camera - Select all items + Select All Items Ctrl+A @@ -644,7 +647,7 @@ - Load &script + Load &Script @@ -652,6 +655,27 @@ &Preferences + + + Least Square Conformal Maps + + + + + Load Plugin + + + + + true + + + true + + + Quick Camera Mode + + diff -Nru cgal-4.7/demo/Polyhedron/Mean_curvature_flow_skeleton_plugin.ui cgal-4.8/demo/Polyhedron/Mean_curvature_flow_skeleton_plugin.ui --- cgal-4.7/demo/Polyhedron/Mean_curvature_flow_skeleton_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Mean_curvature_flow_skeleton_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ - - - Mean_curvature_flow_skeleton_plugin - - - - 0 - 0 - 744 - 468 - - - - DockWidget - - - - - - - Is medially centered - - - - - - - - - - - - - quality_speed_tradeoff - - - - - - - - - - - - - - medially_centered_speed_tradeoff - - - - - - - - - - - - - - min_edge_length - - - - - - - - - - - - - - area_variation_factor - - - - - - - - - - - - - - - - Run one iteration - - - - - - - Run to convergence - - - - - - - Skeletonize - - - - - - - Segment - - - - - - - - - - - - 75 - true - - - - Steps of an iteration: - - - - - - - - - 1 - Contract - - - - - - - 2 - Collapse - - - - - - - 3 - Split - - - - - - - 4 - Degeneracy - - - - - - - - - - - - contract() - - diff -Nru cgal-4.7/demo/Polyhedron/Mesher_base.cpp cgal-4.8/demo/Polyhedron/Mesher_base.cpp --- cgal-4.7/demo/Polyhedron/Mesher_base.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Mesher_base.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -#include "Mesher_base.h" - diff -Nru cgal-4.7/demo/Polyhedron/Mesher_base.h cgal-4.8/demo/Polyhedron/Mesher_base.h --- cgal-4.7/demo/Polyhedron/Mesher_base.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Mesher_base.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#ifndef _MESHER_BASE_H -#define _MESHER_BASE_H - -#include -#include - -// 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 -Nru cgal-4.7/demo/Polyhedron/Meshing_dialog.ui cgal-4.8/demo/Polyhedron/Meshing_dialog.ui --- cgal-4.7/demo/Polyhedron/Meshing_dialog.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Meshing_dialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ - - - Meshing_dialog - - - true - - - - 0 - 0 - 414 - 355 - - - - Meshing criteria - - - - - - - 15 - 75 - true - - - - NO OBJECT - - - - - - - No size - - - - - - - Qt::RightToLeft - - - Sharp features - - - - - - &Protect sharp edges - - - true - - - - - - - - - - Qt::Vertical - - - QSizePolicy::MinimumExpanding - - - - 20 - 0 - - - - - - - - Surface - - - - - - Approximation &error - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - approx - - - - - - - - 110 - 0 - - - - - - - - Enable/Disable parameter - - - - - - true - - - - - - - &Facet max. size - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - facetSizing - - - - - - - - 110 - 0 - - - - 4 - - - - - - - Enable/Disable parameter - - - - - - true - - - - - - - Facet min. &angle (deg) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - facetAngle - - - - - - - - 110 - 0 - - - - 1.000000000000000 - - - 30.000000000000000 - - - 25.000000000000000 - - - - - - - Enable/Disable parameter - - - - - - true - - - - - - - - - - Volume - - - - - - &Tetrahedron max. size - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - tetSizing - - - - - - - - 110 - 0 - - - - 4 - - - - - - - <!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> - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - tetShape - - - - - - - - 110 - 0 - - - - 1.000000000000000 - - - 3.000000000000000 - - - - - - - Enable/Disable parameter - - - - - - true - - - - - - - Enable/Disable parameter - - - - - - true - - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - approx - noApprox - facetSizing - noFacetSizing - facetAngle - noAngle - tetSizing - noTetSizing - tetShape - noTetShape - buttonBox - - - - - buttonBox - accepted() - Meshing_dialog - accept() - - - 388 - 288 - - - 157 - 195 - - - - - buttonBox - rejected() - Meshing_dialog - reject() - - - 388 - 288 - - - 286 - 195 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Mesh_segmentation_widget.ui cgal-4.8/demo/Polyhedron/Mesh_segmentation_widget.ui --- cgal-4.7/demo/Polyhedron/Mesh_segmentation_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Mesh_segmentation_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,186 +0,0 @@ - - - Mesh_segmentation - - - - 0 - 0 - 286 - 254 - - - - Mesh Segmentation - - - - - - - SDF Calculation Parameters - - - - - - Number of rays: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 25 - - - - - - - Cone angle: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 180 - - - 120 - - - - - - - - - - Segmentation Parameters - - - - - - 1 - - - 5 - - - - - - - Qt::LeftToRight - - - Smoothness: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Number of clusters: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 10.000000000000000 - - - 0.010000000000000 - - - 0.260000000000000 - - - - - - - Qt::LeftToRight - - - Extract segments: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - true - - - - - - - - - - - - - - Create new item: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - - - - - - Calculate SDF - - - - - - - Segment - - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/opengl_tools.h cgal-4.8/demo/Polyhedron/opengl_tools.h --- cgal-4.7/demo/Polyhedron/opengl_tools.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/opengl_tools.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,10 +25,7 @@ #ifndef CGAL_OPENGL_TOOLS_H #define CGAL_OPENGL_TOOLS_H -//#ifdef CGAL_GLEW_ENABLED -//#else # include -//#endif namespace CGAL { namespace GL { diff -Nru cgal-4.7/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/AABB_tree/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/AABB_tree/Cut_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,495 @@ + +#include +#include +#include + +#include "Messages_interface.h" +#include "Scene_plane_item.h" +#include "Scene_polyhedron_item.h" +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "Polyhedron_type.h" + +#include + +#include +#include +#include +#include +//typedef CGAL::Simple_cartesian Epic_kernel; +typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel; + +typedef CGAL::AABB_face_graph_triangle_primitive AABB_primitive; +typedef CGAL::AABB_traits AABB_traits; +typedef CGAL::AABB_tree 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()<name()<<" at creation: "<%1 (mode: %2, color: %3)
" + "AABB_tree

" + "

Number of nodes: %4

") + .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 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(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 > 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(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("

%1 (mode: %2, color: %3)
" + "Edges

" + "

Number of edges: %4

") + .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 edges; + bool top; + +private: + mutable std::vector 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(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(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->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(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(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 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 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 Polyhedron_demo_cut_plugin::actions() const { + return QList() << 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(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(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 intersections; + it->second->all_intersections(plane, std::back_inserter(intersections)); + + for ( std::vector::iterator it = intersections.begin(), + end = intersections.end() ; it != end ; ++it ) + { + const Epic_kernel::Segment_3* inter_seg = + CGAL::object_cast(&(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,278 @@ +#include "Camera_positions_list.h" + +#include "ui_Camera_positions_list.h" +#include +#include +#include +#include +#include +#include +#include + + + +#include + +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h --- cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,46 @@ +#ifndef CAMERA_POSITIONS_LIST_H +#define CAMERA_POSITIONS_LIST_H + +#include +#include + +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui --- cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_list.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,223 @@ + + + Camera_positions_list + + + + 0 + 0 + 612 + 507 + + + + Camera Positions + + + + + + + + + &Open List + + + Ctrl+O + + + + + + + &Save List + + + Ctrl+S + + + + + + + ... + + + + :/cgal/icons/plus:/cgal/icons/plus + + + + + + + ... + + + + :/cgal/icons/minus:/cgal/icons/minus + + + + + + + &Clear + + + + + + + &Up + + + + :/cgal/icons/resources/up.png:/cgal/icons/resources/up.png + + + Ctrl+U + + + + + + + &Down + + + + :/cgal/icons/resources/down.png:/cgal/icons/resources/down.png + + + Ctrl+D + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Front + + + PushButton + + + + :/cgal/icons/resources/front.png:/cgal/icons/resources/front.png + + + + + + + Back + + + PushButton + + + + :/cgal/icons/resources/back.png:/cgal/icons/resources/back.png + + + + + + + Top + + + PushButton + + + + :/cgal/icons/resources/top.png:/cgal/icons/resources/top.png + + + + + + + Bottom + + + PushButton + + + + :/cgal/icons/resources/bot.png:/cgal/icons/resources/bot.png + + + + + + + Left + + + PushButton + + + + :/cgal/icons/resources/left.png:/cgal/icons/resources/left.png + + + + + + + Right + + + PushButton + + + + :/cgal/icons/resources/right.png:/cgal/icons/resources/right.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Camera_position/Camera_positions_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,52 @@ +#include +#include "Messages_interface.h" +#include +#include + +#include "Camera_positions_list.h" +#include + +#include +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 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"); + cpl->setViewer(viewer); + mainWindow->addDockWidget(Qt::LeftDockWidgetArea, cpl); +} + +QList +Polyhedron_demo_camera_positions_plugin::actions() const +{ + return QList(); +} + +#include "Camera_positions_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Camera_position/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Convex_decomposition/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Convex_decomposition/Nef_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,312 @@ +#include "Scene_polyhedron_item.h" +#include "Scene_nef_polyhedron_item.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +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->item(scene->mainSelectionIndex())) + || qobject_cast(scene->item(scene->mainSelectionIndex())) + || qobject_cast(scene->item(indexA)) + || qobject_cast(scene->item(indexB)) + || qobject_cast(scene->item(indexA)) + || qobject_cast(scene->item(indexB)) + ; + } + +// QList 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() << 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->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->item(index)); + + Scene_nef_polyhedron_item* item = + (pitem)? Scene_nef_polyhedron_item::from_polyhedron(pitem) + : qobject_cast(scene->item(index)); + + if(item) { + QTime time; + time.start(); + std::cerr << "Convex decomposition..."; + + QApplication::setOverrideCursor(Qt::WaitCursor); + + std::list convex_parts; + item->convex_decomposition(convex_parts); + int i = 0; + for(std::list::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->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->item(indexA)) || + qobject_cast(scene->item(indexB))) { + QMenu* menu = mw->findChild("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->item(indexA)); + Scene_nef_polyhedron_item* itemB = + qobject_cast(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/Convex_hull_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,133 @@ +#include +#include +#include +#include + +#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 +#include + +#include +#include +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->item(scene->mainSelectionIndex())) || + qobject_cast(scene->item(scene->mainSelectionIndex())) || + qobject_cast(scene->item(scene->mainSelectionIndex())) || + qobject_cast(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->item(index)); + + Scene_points_with_normal_item* pts_item = + qobject_cast(scene->item(index)); + + Scene_polylines_item* lines_item = + qobject_cast(scene->item(index)); + + Scene_polyhedron_selection_item* selection_item = + qobject_cast(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 >::const_iterator it = lines_item->polylines.begin(); + it != lines_item->polylines.end(); + ++it) nb_points+=it->size(); + + std::vector all_points; + all_points.reserve( nb_points ); + + for(std::list >::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Convex_hull/Kernel_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,137 @@ +#include +#include +#include +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" + +#include +#include + +#include +#include +#include + +#include +#include + +#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->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->item(index)); + + if(item) + { + Polyhedron* pMesh = item->polyhedron(); + + typedef CGAL::Exact_integer ET; // choose exact integral type + typedef Polyhedron_kernel Polyhedron_kernel; + + // get triangles from polyhedron + std::list 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 dual_points; + std::list::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 dualizer; + dualizer.run(convex_hull,*pKernel); + ::translate(*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 -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Add_point_set_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,85 @@ + + + Add_point_set_dialog + + + + 0 + 0 + 400 + 300 + + + + Dialog + + + + + + QLayout::SetMinimumSize + + + + + + 0 + 0 + + + + <!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> + + + false + + + Point set format: Ax Ay A3 Bx By Bz ... Zx Zy Zz + + + + + + + QLayout::SetMinimumSize + + + + + Add point set + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Add_polylines_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,91 @@ + + + Add_polylines_dialog + + + + 0 + 0 + 459 + 332 + + + + + 0 + 0 + + + + Add polylines + + + + + + QLayout::SetMinimumSize + + + + + + 0 + 0 + + + + <!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> + + + false + + + Polyline format: Ax Ay A3 Bx By Bz ... Zx Zy Zz + + + + + + + QLayout::SetMinimumSize + + + + + Create Polyline Item + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/IO/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/IO/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Function_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/IO/Function_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/IO/Function_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Function_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,97 @@ + + + FunctionDialog + + + + 0 + 0 + 399 + 149 + + + + + 0 + 0 + + + + Load Function + + + + + 40 + 100 + 341 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 20 + 40 + 261 + 26 + + + + + + + 20 + 20 + 251 + 16 + + + + Please choose the function to load: + + + + + + + buttonBox + accepted() + FunctionDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + FunctionDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/GOCAD_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,109 @@ +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" +#include "Kernel_type.h" +#include "Polyhedron_type.h" +#include +#include +#include +#include + +#include + +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(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(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(item); + + if(!poly_item) + return false; + + std::ofstream out(fileinfo.filePath().toUtf8()); + out.precision (std::numeric_limits::digits10 + 2); + Polyhedron* poly = const_cast(poly_item->polyhedron()); + + write_gocad(*poly, out, qPrintable(fileinfo.baseName())); + + + return true; + +} + +#include "GOCAD_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Implicit_function_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +//#include +#include +#include + +#include "implicit_functions/Implicit_function_interface.h" +#include "Scene_implicit_function_item.h" +#include "ui_Function_dialog.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +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 actions() const + { + return QList(); + } + +public Q_SLOTS: + void load_function() const; + +private: + void load_function_plugins(); + +private: + QList 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("menuFile"); + if ( NULL != menuFile ) + { + QList menuFileActions = menuFile->actions(); + + // Look for action just after "Load..." action + QAction* actionAfterLoad = NULL; + for ( QList::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(function_plugin); + + if ( NULL != function ) + { + functions_ << function; + } + } + } + } +} + +#include "Implicit_function_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Nef_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,79 @@ +#include "Scene_nef_polyhedron_item.h" + +#include +#include +#include + +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(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(item); + + if(!nef_item) + return false; + + std::ofstream out(fileinfo.filePath().toUtf8()); + out.precision (std::numeric_limits::digits10 + 2); + return (nef_item && nef_item->save(out)); +} + +#include "Nef_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,141 @@ +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" +#include "Polyhedron_type.h" + +#include +#include + +#include +#include +#include + +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(item) || + qobject_cast(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(item); + const Scene_polygon_soup_item* soup_item = + qobject_cast(item); + + if(!poly_item && !soup_item) + return false; + + std::ofstream out(fileinfo.filePath().toUtf8()); + out.precision (std::numeric_limits::digits10 + 2); + return (poly_item && poly_item->save(out)) || + (soup_item && soup_item->save(out)); +} + +#include "OFF_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_to_nef_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,57 @@ +#include "Scene_nef_polyhedron_item.h" +#include "Nef_type.h" + +#include +#include +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/OFF_to_xyz_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,85 @@ +#include "Scene_points_with_normal_item.h" +#include "Polyhedron_type.h" +#include + +#include + +#include +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(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(item); + if(!point_set_item) + return false; + + // Save point set as .xyz + std::ofstream out(fileinfo.filePath().toUtf8().data()); + out.precision (std::numeric_limits::digits10 + 2); + return point_set_item->write_off_point_set(out); +} + + +#include "OFF_to_xyz_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/PLY_to_xyz_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,73 @@ +#include "Scene_points_with_normal_item.h" +#include + +#include + +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(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(item); + if(!point_set_item) + return false; + + // Save point set as .xyz + std::ofstream out(fileinfo.filePath().toUtf8().data()); + out.precision (std::numeric_limits::digits10 + 2); + return point_set_item->write_ply_point_set(out); +} + + +#include "PLY_to_xyz_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,272 @@ +#include "Scene_polylines_item.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#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("menuFile"); + if ( NULL != menuFile ) + { + QList menuFileActions = menuFile->actions(); + + // Look for action just after "Load..." action + QAction* actionAfterLoad = NULL; + for ( QList::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 actions() const { + return QList(); + } + 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 > 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& 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(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(item); + + if(!poly_item) + return false; + + std::ofstream out(fileinfo.filePath().toUtf8()); + + out.precision (std::numeric_limits::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 > polylines; + polylines.resize(polylines.size()+1); + std::vector& 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/Selection_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,42 @@ +#include "Scene_polyhedron_selection_item.h" +#include +#include +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(scene_item); + } + bool save(const CGAL::Three::Scene_item* scene_item, QFileInfo fileinfo) { + const Scene_polyhedron_selection_item* item = qobject_cast(scene_item); + if(item == NULL) { return false; } + + return item->save(fileinfo.filePath().toStdString()); + } +}; + +#include +//Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_io_plugin, Polyhedron_demo_selection_io_plugin) +#include "Selection_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/STL_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,92 @@ +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" +#include "Kernel_type.h" +#include "Polyhedron_type.h" + +#include +#include + +#include +#include + +#include +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 > points; + std::vector > 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 , +// Jane Tournois +// + +#include + +#include "Polyhedron_type.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" + +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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(calldata); + this->Error = true; + break; + case vtkCommand::WarningEvent: + WarningMessage = static_cast(calldata); + this->Warning = true; + break; + } + } + + private: + bool Error; + bool Warning; + std::string ErrorMessage; + std::string WarningMessage; + }; + + template + bool vtkPointSet_to_polygon_mesh(vtkPointSet* poly_data, + TM& tmesh) + { + typedef typename boost::property_map::type VPMap; + typedef typename boost::property_map_value::type Point_3; + typedef typename boost::graph_traits::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_map(nb_points); + for (vtkIdType i = 0; iGetPoint(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; iGetCell(i); + + vtkIdType nb_vertices = cell_ptr->GetNumberOfPoints(); + if (nb_vertices < 3) + return false; + std::vector vr(nb_vertices); + for (vtkIdType k=0; kGetPointId(k)]; + + CGAL::Euler::add_face(vr, tmesh); + } + return true; + } + + template + void extract_segments_from_vtkPointSet(vtkPointSet* poly_data, + std::vector< std::vector >& segments) + { + // get nb of points and cells + vtkIdType nb_points = poly_data->GetNumberOfPoints(); + vtkIdType nb_cells = poly_data->GetNumberOfCells(); + + //extract points + std::vector point_map(nb_points); + for (vtkIdType i = 0; iGetPoint(i, coords); + point_map[i]=Point_3(coords[0], coords[1], coords[2]); + } + + //extract segments + for (vtkIdType i = 0; iGetCell(i); + + vtkIdType nb_vertices = cell_ptr->GetNumberOfPoints(); + if (nb_vertices !=2) continue; + segments.push_back( std::vector() ); + segments.back().push_back(point_map[cell_ptr->GetPointId(0)]); + segments.back().push_back(point_map[cell_ptr->GetPointId(1)]); + } + } + + template + void polygon_mesh_to_vtkUnstructured(const PM& pmesh,//PolygonMesh + const char* filename) + { + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + typedef typename boost::property_map::const_type VPMap; + typedef typename boost::property_map_value::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 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 polydata = + vtkSmartPointer::New(); + + polydata->SetPoints(vtk_points); + vtk_points->Delete(); + + polydata->SetPolys(vtk_cells); + vtk_cells->Delete(); + + // Combine the two data sets + //vtkSmartPointer appendFilter = + // vtkSmartPointer::New(); + //appendFilter->AddInputData(polydata); + //appendFilter->Update(); + + //vtkSmartPointer unstructuredGrid = + // vtkSmartPointer::New(); + //unstructuredGrid->ShallowCopy(appendFilter->GetOutput()); + + // Write the unstructured grid + vtkSmartPointer writer = + vtkSmartPointer::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::vertex_descriptor vertex_descriptor; + typedef boost::graph_traits::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(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(item); + + if (!poly_item) + return false; + else + { + if (extension != "vtp") + CGAL::polygon_mesh_to_vtkUnstructured( + *poly_item->polyhedron(), + output_filename.data()); + else + CGAL::polygon_mesh_to_vtkUnstructured( + *poly_item->polyhedron(), + output_filename.data()); + } + return true; + } + + bool canLoad() const { return true; } + + template + vtkSmartPointer + read_vtk_file(const std::string& input_filename, + vtkSmartPointer errorObserver) + { + vtkSmartPointer reader = vtkSmartPointer::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 data; + vtkSmartPointer obs = + vtkSmartPointer::New(); + + if (extension=="vtp") + data = read_vtk_file(fname,obs) + ->GetOutput(); + else + if (extension=="vtu") + data = read_vtk_file(fname,obs) + ->GetOutput(); + else{ + //read non-XML data + vtkSmartPointer reader = + read_vtk_file(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 > 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& segment, segments) + polyline_item->polylines.push_back(segment); + return polyline_item; + } + return NULL; + } +}; // end Polyhedron_demo_vtk_plugin + + +#include "VTK_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/IO/XYZ_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,223 @@ +#include "Scene_points_with_normal_item.h" +#include "Kernel_type.h" + +#include +#include +#include +#include +#include +#include +#include + +#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("menuFile"); + if ( NULL != menuFile ) + { + QList menuFileActions = menuFile->actions(); + + // Look for action just after "Load..." action + QAction* actionAfterLoad = NULL; + for ( QList::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 actions() const { + return QList(); + } +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(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(item); + if(!point_set_item) + return false; + + // Save point set as .xyz + std::ofstream out(fileinfo.filePath().toUtf8().data()); + out.precision (std::numeric_limits::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/mesh_2_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,231 @@ + + + mesh_2_dialog + + + true + + + + 0 + 0 + 408 + 357 + + + + 2D Mesh Criteria + + + + + + Mesh_2 + + + + + + + + Run Mesh Refinement + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + true + + + + + + + + + + + Maximum edge length + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + edgeLength_dspinbox + + + + + + + + 110 + 0 + + + + 1000.000000000000000 + + + 0.100000000000000 + + + + + + + + + + + Domain Definition: + + + + + + + + + Whole Domain + + + + + + + Use Nesting Number + + + + + + + With Seeds Inside the Domain + + + + + + + With Seeds Outside the Domain + + + + + + + + + + + + + Run Lloyd Optimisation + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + Number of iterations + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + nbIterations_spinbox + + + + + + + false + + + + 110 + 0 + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + edgeLength_dspinbox + buttonBox + + + + + buttonBox + accepted() + mesh_2_dialog + accept() + + + 388 + 288 + + + 157 + 195 + + + + + buttonBox + rejected() + mesh_2_dialog + reject() + + + 388 + 288 + + + 286 + 195 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_2/Mesh_2_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#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 + +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" +#include "Scene_points_with_normal_item.h" +#include "Polyhedron_type.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ui_mesh_2_dialog.h" + +struct FaceInfo2 +{ + FaceInfo2(){} + int nesting_level; + bool in_domain(){ + return nesting_level%2 == 1; + } +}; + +template +void +mark_domains(CDT& ct, + typename CDT::Face_handle start, + int index, + std::list& border ) +{ + if(start->info().nesting_level != -1){ + return; + } + std::list 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 +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 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 +void cdt2_to_face_graph(const CDT& cdt, TriangleMesh& tm) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef std::map 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 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 actions() const { + return QList() << 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->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 + void mesh(const std::vector& polylines_items, + const std::vector& points_items, + double diagonal_length) + { + // extract seeds + std::vector seeds; + Q_FOREACH(Scene_points_with_normal_item* points_item, points_items) + Q_FOREACH(UI_point_3 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 Vb; + typedef CGAL::Delaunay_mesh_face_base_2 Fm; + typedef CGAL::Triangulation_face_base_with_info_2 Fb; + typedef CGAL::Triangulation_data_structure_2 TDS; + typedef CGAL::No_intersection_tag Tag; + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; + typedef CGAL::Delaunay_mesh_size_criteria_2 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& 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& polylines_items, + const std::vector& 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& 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 pt, *points_item->point_set()) + if (pt[res]!=ref[res]) + return -1; + return res; + } + +public Q_SLOTS: + + void run() + { + //collect input polylines + std::vector polylines_items; + std::vector points_items; + double inf = std::numeric_limits::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->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->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 >(polylines_items, points_items, diag); + break; + case 1: + mesh >(polylines_items, points_items, diag); + break; + case 2: + mesh >(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/C3t3_io_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,424 @@ +#include +#include "Scene_c3t3_item.h" + +#include +#include +#include +#include + + +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(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(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 Index; +}; + +typedef Geom_traits Fake_gt; +typedef CGAL::Mesh_vertex_base_3 Fake_vertex_base; +typedef CGAL::Compact_mesh_cell_base_3 Fake_cell_base; +typedef CGAL::Triangulation_data_structure_3 Fake_tds; +typedef CGAL::Regular_triangulation_3 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 > +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::Other Vb2; + typedef Fake_CDT_3_vertex_base Other; + }; +}; + +template +std::istream& +operator>>( std::istream& is, Fake_CDT_3_vertex_base& v) +{ + is >> static_cast::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 > +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::Other Cb2; + typedef Fake_CDT_3_cell_base Other; + }; +}; + +template +std::istream& +operator>>( std::istream& is, Fake_CDT_3_cell_base& 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::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_cell_base<> > Fake_CDT_3_TDS; +typedef CGAL::Triangulation_3 Fake_CDT_3; + +namespace CGAL { +template <> +class Output_rep { + 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 { + 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 + 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(v1.index())); + break; + default: // case 2 + const typename V1::Index& index = v1.index(); + const Sp_index sp_index = boost::get(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 + 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 + +struct Update_vertex_from_CDT_3 { + template + 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 + 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()()) { + std::cerr << "Polyhedron_demo_c3t3_binary_io_plugin::try_load_other_binary_format:" + << "\n expected format: " << CGAL::Get_io_signature()() + << "\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 +#include "C3t3_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/config_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + + // ========================================================================== + // 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Detect_sharp_edges_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" +#include "Polyhedron_type.h" + +#include +#include + +#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->item(index)); + if (item) return true; + } + return false; + } + + // used by Polyhedron_demo_plugin_helper + QList actions() const { + return QList() << 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 Poly_tuple; + + // Get selected items + QList polyhedrons; + Q_FOREACH(int index, scene->selectionIndices()) + { + Scene_polyhedron_item* item = + qobject_cast(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Facet_extra_criterion.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + + +template +class Facet_extra_criterion : + public CGAL::Mesh_3::Abstract_criterion +{ +private: + typedef typename Tr::Facet Facet; + + typedef CGAL::Mesh_3::Abstract_criterion Base; + typedef typename Base::Quality Quality; + typedef typename Base::Badness Badness; + + typedef Facet_extra_criterion 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,105 @@ + + ImagePrecisionDialog + + + + 0 + 0 + 407 + 139 + + + + + 0 + 0 + + + + Image Drawing Precision + + + + + + 1 + + + Please choose the image drawing precision + + + true + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Ok + + + + + + + false + + + + + + + + 11 + true + + + + 1:x means that x voxels of the original image are represented by 1 cube in the drawn image + + + true + + + + + + + + + buttonBox + accepted() + ImagePrecisionDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + ImagePrecisionDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,136 @@ +#include "config.h" +#include "Scene_segmented_image_item.h" +#include "Image_type.h" +#include "ui_Image_res_dialog.h" + +#include +#include +#include +#include "Raw_image_dialog.h" +#include +#include +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 %1:\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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Io_implicit_function_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +//#include +#include +#include + +#include "implicit_functions/Implicit_function_interface.h" +#include "Scene_implicit_function_item.h" +#include "ui_Function_dialog.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +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 actions() const + { + return QList(); + } + +public Q_SLOTS: + void load_function() const; + +private: + void load_function_plugins(); + +private: + QList 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("menuFile"); + if ( NULL != menuFile ) + { + QList menuFileActions = menuFile->actions(); + + // Look for action just after "Load..." action + QAction* actionAfterLoad = NULL; + for ( QList::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(function_plugin); + + if ( NULL != function ) + { + functions_ << function; + } + } + } + } +} + +#include "Io_implicit_function_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Local_optimizers_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,225 @@ + + LocalOptim_dialog + + + + 0 + 0 + + + + + 0 + 0 + + + + Local optimizer parameters + + + + + + + 15 + 75 + true + + + + NO OBJECT + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 10 + + + + + + + + + 13 + + + + Parameters + + + + + + Max CPU running time (s) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + maxTime + + + + + + + + 100 + 0 + + + + 1 + + + 9999.000000000000000 + + + 60.000000000000000 + + + + + + + No time limit + + + + + + + Min. dihedral angle (degree) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + sliverBound + + + + + + + + 100 + 0 + + + + false + + + 1 + + + 180.000000000000000 + + + 8.000000000000000 + + + + + + + No angle bound + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + + Qt::RightToLeft + + + Create a new mesh object + + + true + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + LocalOptim_dialog + accept() + + + 384 + 191 + + + 157 + 195 + + + + + buttonBox + rejected() + LocalOptim_dialog + reject() + + + 384 + 191 + + + 286 + 195 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,168 @@ +#include "config_mesh_3.h" +#include "Mesh_3_plugin_cgal_code.h" + +#include +#include + +#include +#include + +#include + +#include "Mesh_function.h" +#include "Facet_extra_criterion.h" + +#include +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 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 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 > polylines_on_bbox; + CGAL::polylines_to_protect(*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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin_cgal_code.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 > 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,449 @@ +#include "config.h" +#include "config_mesh_3.h" + +#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER +#include +#include +#include "Messages_interface.h" + +#include +#include +#include +#include +#include +#include "Scene_c3t3_item.h" +#include +#include +#include +#include + +#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 actions() const { + return QList() << actionMesh_3; + } + + + bool applicable(QAction*) const { +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS + if(qobject_cast(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->item(ind))) + return true; + } +#endif + Q_FOREACH(int ind, scene->selectionIndices()){ + if( qobject_cast(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->item(ind)); + } +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_IMPLICIT_FUNCTIONS + if(function_item == NULL){ + function_item = qobject_cast(scene->item(ind)); + } +#endif +#ifdef CGAL_MESH_3_DEMO_ACTIVATE_SEGMENTED_IMAGES + if(image_item == NULL){ + image_item = qobject_cast(scene->item(ind)); + } +#endif + if(polylines_item == NULL){ + polylines_item = qobject_cast(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): %1, %2, %3") + .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
") + .arg(source_item_->name()) + .arg(thread->time()); + + Q_FOREACH( QString param, thread->parameters_log() ) + { + str.append(QString("( %1 )
").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 ],
") + .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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#include +#include + +#include +#include +#include + +#include "C3t3_type.h" +#include "Meshing_thread.h" +#include // for C3t3_initializer +#include + +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 > 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 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 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:: +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:: +~Mesh_function() +{ + delete domain_; + delete mesher_; +} + + +CGAL::Mesh_facet_topology topology(int manifold) { + return manifold == 0 ? CGAL::FACET_VERTICES_ON_SURFACE : + static_cast + (CGAL::MANIFOLD | + CGAL::FACET_VERTICES_ON_SAME_SURFACE_PATCH); +} + +template < typename D_ > +void +Mesh_function:: +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::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:: +stop() +{ + continue_ = false; +} + + +template < typename D_ > +QStringList +Mesh_function:: +parameters_log() const +{ + return p_.log(); +} + + +template < typename D_ > +QString +Mesh_function:: +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,440 @@ + + + Meshing_dialog + + + true + + + + 0 + 0 + 473 + 482 + + + + + 0 + 0 + + + + Meshing criteria + + + + QLayout::SetFixedSize + + + + + + 15 + 75 + true + + + + NO OBJECT + + + + + + + No size + + + + + + + Qt::LeftToRight + + + Sharp features + + + + + + Qt::RightToLeft + + + &Protect sharp edges + + + true + + + + + + + + + + Surface + + + + + + See advanced &controls... + + + + + + + + 110 + 0 + + + + 4 + + + + + + + Facet min. &angle (deg) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + facetAngle + + + + + + + Enable/Disable parameter + + + + + + true + + + + + + + Approximation &error + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + approx + + + + + + + &Facet max. size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + facetSizing + + + + + + + + 110 + 0 + + + + + + + + Enable/Disable parameter + + + + + + true + + + + + + + + 110 + 0 + + + + 1.000000000000000 + + + 30.000000000000000 + + + 25.000000000000000 + + + + + + + Enable/Disable parameter + + + + + + true + + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Plain + + + + + + + 0 + 0 + + + + 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. + + + true + + + + + + + Qt::RightToLeft + + + &manifold + + + + + + + + + + + + + Volume + + + + + + &Tetrahedron max. size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + tetSizing + + + + + + + + 110 + 0 + + + + 4 + + + + + + + <!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> + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + tetShape + + + + + + + + 110 + 0 + + + + 1.000000000000000 + + + 3.000000000000000 + + + + + + + Enable/Disable parameter + + + + + + true + + + + + + + Enable/Disable parameter + + + + + + true + + + + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 0 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + protect + approx + noApprox + facetSizing + noFacetSizing + facetAngle + noAngle + tetSizing + noTetSizing + tetShape + noTetShape + checkBox + manifoldCheckBox + + + + + buttonBox + accepted() + Meshing_dialog + accept() + + + 397 + 544 + + + 157 + 195 + + + + + buttonBox + rejected() + Meshing_dialog + reject() + + + 397 + 544 + + + 286 + 195 + + + + + checkBox + toggled(bool) + advanced + setVisible(bool) + + + 69 + 283 + + + 72 + 297 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Meshing_thread.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include + +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin_cgal_code.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include +#include + +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 +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 +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(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 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(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 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(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 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 +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

" + "Compute moves: %2
") + .arg(status_.iteration_done + 2) + .arg(translate_bool(status_.compute_moves_done)); + + if ( status_.compute_moves_done ) + { + res += QString("Move points: %1
") + .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 +class Optimization_function < Domain, Odt_parameters > + : public Global_optimization_function< Domain > +{ + // Private types + typedef C3t3::Triangulation Tr; + typedef CGAL::Mesh_3::Mesh_sizing_field Sizing; + typedef CGAL::Mesh_3::Odt_move Move; + typedef Global_visitor Visitor; + + typedef typename CGAL::Mesh_3::Mesh_global_optimizer 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 +class Optimization_function < Domain, Lloyd_parameters > + : public Global_optimization_function< Domain > +{ + // Private types + typedef C3t3::Triangulation Tr; + typedef CGAL::Mesh_3::Mesh_sizing_field Sizing; + typedef CGAL::Mesh_3::Lloyd_move Move; + typedef Global_visitor Visitor; + + typedef typename CGAL::Mesh_3::Mesh_global_optimizer 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 +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 Sc; + typedef Perturb_visitor Visitor; + + typedef CGAL::Mesh_3::Sliver_perturber 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

" + "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 Sq_radius; + typedef CGAL::Mesh_3::Volume_perturbation Volume; + typedef CGAL::Mesh_3::Dihedral_angle_perturbation Dihedral_angle; + typedef CGAL::Mesh_3::Li_random_perturbation 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 +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 Sc; + typedef Exude_visitor Visitor; + typedef CGAL::Mesh_3::Slivers_exuder 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
") + //"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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimization_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,630 @@ +#include +#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 +#include + +#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 +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include // 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 actions() const; + + bool applicable(QAction*) const { + return qobject_cast(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 +Mesh_3_optimization_plugin::actions() const +{ + return QList() << 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(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(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->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
" + "End reason: '%4'
") + .arg(name) + .arg(source_item_->name()) + .arg(thread->time()) + .arg(translate(return_code)); + + Q_FOREACH( QString param, thread->parameters_log() ) + { + str.append(QString("( %1 )
").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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Optimizer_thread.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include + +#include + +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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Polyhedron_demo_mesh_3_labeled_mesh_domain_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include "Image_type.h" + +#include + +namespace CGAL { + +/** + * \class Polyhedron_demo_labeled_mesh_domain_3 + * LabeledDomain must be a Labeled_mesh_domain_3 + */ +template +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; + + /// Type of indexes for surface patch of the input complex + typedef int Surface_patch_index; + typedef boost::optional 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 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(&index)) + return Index(index_pair->first * 1000 + index_pair->second); + + else if (const typename Base::Subdomain_index* sub_index = + boost::get(&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(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 + OutputIterator operator()(OutputIterator pts, const int n = 12) const + { + typename Base::Construct_initial_points cip = + r_domain_.Base::construct_initial_points_object(); + + std::vector > initial_points; + cip(std::back_inserter(initial_points), n); + + for (std::size_t i = 0; i < initial_points.size(); ++i) + { + std::pair 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 + 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Raw_image_dialog.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/raw_image.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,454 @@ + + Raw_image_dialog + + + + 0 + 0 + 585 + 342 + + + + Open raw image + + + + + + Image &value type + + + + + + Short (16 bits) + + + + + + + Float + + + + + + + Int (32 bits) + + + + + + + Double + + + + + + + Signed + + + + + + + char (8 bits) + + + + + + + + + + Image dimensions + + + + + + + + &Dimensions: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + dim_x + + + + + + + &Spacing: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + spacing_x + + + + + + + x: + + + 100000000 + + + + + + + y: + + + 100000000 + + + + + + + z: + + + 100000000 + + + + + + + vx: + + + 5 + + + 1.000000000000000 + + + + + + + vy: + + + 5 + + + 1.000000000000000 + + + + + + + vz: + + + 5 + + + 1.000000000000000 + + + + + + + &Offset: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + offset + + + + + + + bytes + + + 999999999 + + + + + + + Image size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0 + + + + + + + File size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 0 + + + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Open + + + + + + + int_bt + short_bt + signed_bt + float_bt + double_bt + dim_x + dim_y + dim_z + spacing_x + spacing_y + spacing_z + offset + buttonBox + + + + + float_bt + toggled(bool) + signed_bt + setDisabled(bool) + + + 47 + 112 + + + 553 + 94 + + + + + double_bt + toggled(bool) + signed_bt + setDisabled(bool) + + + 564 + 127 + + + 564 + 94 + + + + + buttonBox + accepted() + Raw_image_dialog + accept() + + + 191 + 316 + + + 183 + 313 + + + + + buttonBox + rejected() + Raw_image_dialog + reject() + + + 253 + 319 + + + 252 + 312 + + + + + dim_x + valueChanged(int) + Raw_image_dialog + update_image_size() + + + 178 + 187 + + + 99 + 141 + + + + + dim_z + valueChanged(int) + Raw_image_dialog + update_image_size() + + + 473 + 178 + + + 441 + 142 + + + + + char_bt + clicked() + Raw_image_dialog + update_image_size() + + + 71 + 52 + + + 137 + 3 + + + + + short_bt + clicked() + Raw_image_dialog + update_image_size() + + + 117 + 81 + + + 49 + 6 + + + + + float_bt + clicked() + Raw_image_dialog + update_image_size() + + + 137 + 111 + + + 67 + -5 + + + + + int_bt + clicked() + Raw_image_dialog + update_image_size() + + + 358 + 49 + + + 584 + 52 + + + + + dim_y + valueChanged(int) + Raw_image_dialog + update_image_size() + + + 332 + 186 + + + 271 + 142 + + + + + double_bt + clicked() + Raw_image_dialog + update_image_size() + + + 514 + 119 + + + 581 + 116 + + + + + + update_image_size() + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Smoother_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,340 @@ + + Smoother_dialog + + + + 0 + 0 + + + + + 0 + 0 + + + + Global smoother parameters + + + + + + + 15 + 75 + true + + + + NO OBJECT + + + + + + + Qt::Vertical + + + QSizePolicy::MinimumExpanding + + + + 20 + 10 + + + + + + + + + 13 + + + + Parameters + + + + 8 + + + 8 + + + -1 + + + + + Max CPU running time (s) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + maxTime + + + + + + + Qt::LeftToRight + + + No time limit + + + + + + + + 100 + 0 + + + + 1 + + + 9999.000000000000000 + + + 60.000000000000000 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 15 + + + + + + + + + 11 + true + + + + Advanced Parameters + + + false + + + false + + + + 8 + + + 8 + + + + + + 11 + true + + + + Maximum number of iterations + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + maxIterationNb + + + + + + + 0 + + + 200.000000000000000 + + + 100.000000000000000 + + + + + + + + 11 + true + + + + Convergence ratio + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 4 + + + 0.000100000000000 + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + 11 + true + + + + Freeze ratio + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + freezeRatio + + + + + + + 4 + + + 0.000000000000000 + + + 1.000000000000000 + + + 0.001000000000000 + + + 0.000000000000000 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + + Qt::RightToLeft + + + Create a new mesh object + + + true + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + Smoother_dialog + accept() + + + 384 + 191 + + + 157 + 195 + + + + + buttonBox + rejected() + Smoother_dialog + reject() + + + 384 + 191 + + + 286 + 195 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,458 @@ +#ifndef CGAL_VOLUME_PLANE_H +#define CGAL_VOLUME_PLANE_H + +#include + +#include +#include + +#include +#include + +#include "Volume_plane_interface.h" +#include +#include +#include +#include +#include + +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 +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 +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& 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& out, unsigned int i, unsigned int j) { + buildVertex(out, i, j, *this); + } + + void buildVertex(std::vector& 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& 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& 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 v_rec; + mutable QOpenGLShaderProgram program_bordures; + mutable QOpenGLShaderProgram program; + mutable std::vector< std::pair > 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 +const char* Volume_plane::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 +const char* Volume_plane::fragmentShader_source = + "#version 120\n" + "varying highp vec4 fullColor; \n" + "void main() { gl_FragColor = fullColor; } \n"; + +template +const char* Volume_plane::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 +const char* Volume_plane::fragmentShader_bordures_source = + "#version 120\n" + "varying highp vec4 fullColor; \n" + "void main() { gl_FragColor = fullColor; } \n"; + + + +template +Volume_plane::Volume_plane() + : Volume_plane_interface(new qglviewer::ManipulatedFrame) + { + } +template +void Volume_plane::setData(unsigned int adim, unsigned int bdim, unsigned int cdim, float xscale, float yscale, float zscale, std::vector &colors) +{ + adim_ = adim; + bdim_ = bdim; + cdim_= cdim; + xscale_ = xscale; + yscale_ =yscale; + zscale_ = zscale; + currentCube = 0; + colors_.swap(colors); + mFrame_->setConstraint(setConstraint(*this)); +} +template +Volume_plane::~Volume_plane() { + for(std::vector< std::pair< QOpenGLBuffer, unsigned int> >::iterator it = ebos.begin(); + it != ebos.end(); ++it) { + it->first.destroy(); + } + program.release(); +} + +template +void Volume_plane::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(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(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 +void Volume_plane::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(sizeof(float) * vertices.size())); + vVBO.release(); + printGlError(__LINE__); + + // for each patch + std::vector 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(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(colors_.size()*sizeof(float))); + cbuffer.release(); + + printGlError(__LINE__); +} + +template +void Volume_plane::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_interface.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,52 @@ +#ifndef CGAL_VOLUME_PLANE_INTERFACE_H_ +#define CGAL_VOLUME_PLANE_INTERFACE_H_ + +#include +#include +#include +#include +#include +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 &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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,200 @@ +#include "config.h" + +#include "Volume_plane_intersection.h" +#include "Volume_plane_interface.h" + +#include + +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"<compileSourceCode(fragment_source)) + { + std::cerr<<"Compiling fragmentsource FAILED"<(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(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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_intersection.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,78 @@ +#ifndef CGAL_VOLUME_PLANE_INTERSECTION_H_ +#define CGAL_VOLUME_PLANE_INTERSECTION_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +using namespace CGAL::Three; +class Volume_plane_interface; + +class Volume_plane_intersection + : public Scene_item { + typedef std::pair 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 a_vertex; + std::vector b_vertex; + std::vector 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_planes_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,390 @@ + +#ifdef _MSC_VER +# pragma warning(disable:4244) // conversion with loss of data +#endif + +#include +#include "config.h" + +#include "Volume_plane.h" +#include + +#include "Volume_plane_thread.h" +#include "Volume_plane_intersection.h" +#include "Scene_segmented_image_item.h" +#include +#include +#include "Messages_interface.h" +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +// 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 min_max; + + int operator()(float f) { + float s = f * (min_max.second - min_max.first); + return s + min_max.first; + } +}; + +struct DoubleConverter { + std::pair 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(); } + void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional(); } + void setViewer(Viewer_interface* viewer) { this->viewer = viewer; } + +private: + boost::optional ic; + boost::optional 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->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"); + CGAL_assertion(v != 0); + pxr_.setViewer(v); + createOrGetDockLayout(); + + } + QList actions() const { + return QList() << planeSwitch; + } + virtual void closure() + { + QDockWidget* controlDockWidget = mw->findChild("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->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 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(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(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::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(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* p = dynamic_cast< Volume_plane* >(plane)) { + intersection->setX(p); + } else if(Volume_plane* p = dynamic_cast< Volume_plane* >(plane)) { + intersection->setY(p); + } else if(Volume_plane* p = dynamic_cast< Volume_plane* >(plane)) { + intersection->setZ(p); + } + + connect(plane, SIGNAL(planeDestructionIncoming(Volume_plane_interface*)), + intersection, SLOT(planeRemoved(Volume_plane_interface*))); + } + +private: + QAction* planeSwitch; + PixelReader pxr_; + + std::vector threads; + unsigned int intersectionId; + + QLayout* createOrGetDockLayout() { + QLayout* layout = NULL; + QDockWidget* controlDockWidget = mw->findChild("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("vpSliderLayout"); + controlDockWidget->show(); + } + + return layout; + } + + template + 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 minmax(*std::min_element(begin, end), *std::max_element(begin, end)); + + Clamp_to_one_zero_range clamper = { minmax }; + + switchReaderConverter< Word >(minmax); + + Volume_plane *xitem = new Volume_plane(); + Volume_plane *yitem = new Volume_plane(); + Volume_plane *zitem = new Volume_plane(); + + threads.push_back(new X_plane_thread(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(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(zitem,img, clamper, name)); + connect(threads.back(), SIGNAL(finished(Volume_plane_thread*)), this, SLOT(addVP(Volume_plane_thread*))); + threads.back()->start(); + + } + + template + void switchReaderConverter(std::pair minmax) { + switchReaderConverter(minmax, typename boost::is_integral::type()); + } + + template + void switchReaderConverter(std::pair minmax, boost::true_type) { + // IntConverter + IntConverter x = { minmax }; pxr_.setIC(x); + } + + template + void switchReaderConverter(std::pair minmax, boost::false_type) { + // IntConverter + DoubleConverter x = { minmax }; pxr_.setFC(x); + } +}; + +#include "Volume_planes_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h --- cgal-4.7/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Mesh_3/Volume_plane_thread.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,128 @@ +#ifndef CGAL_VOLUME_PLANE_THREAD_H +#define CGAL_VOLUME_PLANE_THREAD_H + +#include "Volume_plane.h" +#include + +#include "Scene_segmented_image_item.h" + +#include +#include +#include + +struct Clamp_to_one_zero_range { + std::pair 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 buffer; + QString name; +}; + +template +class X_plane_thread : public Volume_plane_thread { +public: + X_plane_thread(Volume_plane*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 +class Y_plane_thread : public Volume_plane_thread { +public: + Y_plane_thread(Volume_plane* 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 +class Z_plane_thread : public Volume_plane_thread { +public: + Z_plane_thread(Volume_plane* 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 +void X_plane_thread::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(img->image(), i, j, k); + x = clamper(x); + buffer.push_back(x); + } + } + } + item->setData(static_cast(img->ydim()), static_cast(img->zdim()), static_cast(img->xdim()), + img->vx(), img->vy(), img->vz(), buffer); + + item->setName(name); + item->moveToThread(QApplication::instance()->thread()); + Q_EMIT finished(this); +} + +template +void Y_plane_thread::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(img->image(), j, i, k); + x = clamper(x); + buffer.push_back(x); + } + } + } + item->setData(static_cast(img->xdim()), static_cast(img->zdim()), static_cast(img->ydim()), + img->vx(), img->vy(), img->vz(), buffer); + item->setName(name); + item->moveToThread(QApplication::instance()->thread()); + Q_EMIT finished(this); +} + +template +void Z_plane_thread::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(img->image(), j, k, i); + x = clamper(x); + buffer.push_back(x); + } + } + } + item->setData(static_cast(img->xdim()), static_cast(img->ydim()), static_cast(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,232 @@ +#include "Messages_interface.h" +#include +#include +#include +#include +#include "Scene_polyhedron_item.h" +#include "Scene_plane_item.h" +#include +#include +#include +#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(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(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(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->item(id))) + return true; + } + return false; + } + QList actions() const { + return QList() << 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 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,90 @@ + + + ClipPolyhedronWidget + + + + 0 + 0 + 364 + 258 + + + + Clip Polyhedra + + + + + + + + + <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 be left open.</p><p><br/></p></body></html> + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::LeftToRight + + + false + + + &Keep Closed + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Clip + + + + + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Corefinement_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,181 @@ +#define CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS +#include +#include +#include +#include "Scene_polyhedron_item.h" +#include "Scene_combinatorial_map_item.h" +#include "Polyhedron_type.h" +#include +#include + +#include "Scene_polylines_item.h" + +#include +#include +#include +#include +#include +#include +#include + +//#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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 + 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->item(indexA)); + Scene_polyhedron_item* itemB = + qobject_cast(scene->item(indexB)); + if(!itemA || !itemB || itemA == itemB) + { + Q_FOREACH(int index, scene->selectionIndices()) { + Scene_polyhedron_item* item = + qobject_cast(scene->item(index)); + if(!item) + return; + } + if(scene->selectionIndices().size() == 2) { + indexA = scene->selectionIndices()[0]; + indexB = scene->selectionIndices()[1]; + itemA = + qobject_cast(scene->item(indexA)); + itemB = + qobject_cast(scene->item(indexB)); + } + } + std::vector poly_ptrs; + Q_FOREACH(int index, scene->selectionIndices()) { + Scene_polyhedron_item* item = + qobject_cast(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 Corefinement; + Corefinement corefinement; + + typedef std::list > 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(&A)); + typedef CGAL::Node_visitor_refine_polyhedra Split_visitor; + cmap_item->m_combinatorial_map=new Combinatorial_map_3(); + Split_visitor visitor(cmap_item->m_combinatorial_map); + CGAL::Intersection_of_Polyhedra_3 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Intersection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,220 @@ +#define CGAL_COREFINEMENT_DO_REPORT_SELF_INTERSECTIONS +#define CGAL_USE_SEGMENT_APPROACH +#include +#ifdef CGAL_USE_SEGMENT_APPROACH +#include +#else +#include +#endif +#include +#include +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" +#include +#include + +#include "Scene_polylines_item.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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 + 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->item(indexA)); + Scene_polyhedron_item* itemB = + qobject_cast(scene->item(indexB)); + if(!itemA || !itemB || itemA == itemB) + { + Q_FOREACH(int index, scene->selectionIndices()) { + Scene_polyhedron_item* item = + qobject_cast(scene->item(index)); + if(!item) + return; + } + if(scene->selectionIndices().size() == 2) { + indexA = scene->selectionIndices()[0]; + indexB = scene->selectionIndices()[1]; + itemA = + qobject_cast(scene->item(indexA)); + itemB = + qobject_cast(scene->item(indexB)); + } + } +#ifndef CGAL_USE_SEGMENT_APPROACH + if(!itemA || !itemB || itemA == itemB) + return; +#else + std::vector poly_ptrs; + Q_FOREACH(int index, scene->selectionIndices()) { + Scene_polyhedron_item* item = + qobject_cast(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 Split_visitor; + + CGAL::Intersection_of_Polyhedra_3 polyline_intersections; + + typedef std::pair Pair_of_facet_handles; + typedef std::vector Polyline_info; + typedef std::vector Polylines_infos; + Polylines_infos polylines_infos; + + typedef Scene_polylines_item::Polylines_container Polylines_container; + typedef std::back_insert_iterator To_container; + typedef std::back_insert_iterator To_infos; + To_container to_container(new_item->polylines); + To_infos to_infos(polylines_infos); + CGAL::Dispatch_output_iterator< + CGAL::cpp11::tuple, + CGAL::cpp11::tuple > 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,10 @@ +#ifndef SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H +#define SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H + +#ifdef scene_combinatorial_map_item_EXPORTS +# define SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Q_DECL_EXPORT +#else +# define SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Q_DECL_IMPORT +#endif + +#endif // SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,522 @@ +#include "Scene_combinatorial_map_item.h" +#include "Scene_polyhedron_item.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +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 +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 Volume_import_modifier; + + std::vector 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 + 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 + 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 + 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 + bool operator() (Dart_handle d){ + return d->template attribute<3>()->info().inside.size()==1 && + static_cast(*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 + bool operator() (Dart_handle d){ + return d->template attribute<3>()->info().inside.size()==1 && + static_cast(*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(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(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(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(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(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(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(positions_facets).swap(positions_facets); + normals.resize(0); + std::vector(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 cells(5); + for (unsigned int i=0; i<=4; ++i) + cells[i]=i; + std::vector res = combinatorial_map().count_cells(cells); + if (volume_to_display==0) + return QObject::tr("

Combinatorial_map_3 %1 (mode: %8, color: %9)

" + "

Number of darts: %2
" + "Number of vertices: %3
" + "Number of edges: %4
" + "Number of facets: %5
" + "Number of volumes: %6
" + "Number of connected components: %7

") + .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("

Combinatorial_map_3 %1 (mode: %8, color: %9)

" + "

Number of darts: %2
" + "Number of vertices: %3
" + "Number of edges: %4
" + "Number of facets: %5
" + "Number of volumes: %6
" + "Number of connected components: %7
" + "Currently Displaying facets of volume: %10

") + .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(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(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(nb_points/3)); + vaos[Points]->release(); + program->release(); + +} diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h --- cgal-4.7/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Operations_on_polyhedra/Scene_combinatorial_map_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,117 @@ +#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H +#define SCENE_COMBINATORIAL_MAP_ITEM_H + +//========= +#include +#include "Scene_combinatorial_map_item_config.h" +#include +#include +#include +#include +#include "Polyhedron_type.h" +#include +typedef CGAL::internal_IOP::Item_with_points_and_volume_info 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 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 positions_lines; + mutable std::vector positions_points; + mutable std::vector positions_facets; + mutable std::vector 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/PCA/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/PCA/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Create_bbox_mesh_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,156 @@ +#include + +#include +#include +#include +#include + +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" +#include + + +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 +{ + 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 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 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 Create_bbox_mesh_plugin::actions() const { + return QList() << 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Pca_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,232 @@ +#include +#include +#include +#include "Scene_polyhedron_item.h" +#include "Scene_plane_item.h" +#include "Polyhedron_type.h" + +#include +#include + +#include +#include +#include + + +#include // output for plane fitting +#include // 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->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->item(index)); + + if(item) + { + Polyhedron* pMesh = item->polyhedron(); + + // get triangles from the mesh + std::list 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 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::iterator Iterator; +// Make_quad_soup 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->item(index)); + + if(item) + { + Polyhedron* pMesh = item->polyhedron(); + + // get triangles from the mesh + std::list 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp cgal-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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(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(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(nb_lines/3)); + vaos[Edges]->release(); + program->release(); + +} + +QString Scene_polyhedron_transform_item::toolTip() const { + return QObject::tr("

Affine transformation of %1

" + "

Keep Ctrl pressed and use the arcball to define an affine transformation.
" + "Press S to apply the affine transformation to a copy of %1.

") + .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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h cgal-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Scene_polyhedron_transform_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include + +// 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Transform_polyhedron_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,143 @@ +#include +#include +#include "Scene_polyhedron_transform_item.h" +#include "Polyhedron_type.h" +#include +#include + +#include "Scene_polylines_item.h" + +#include +#include +#include +#include +#include +#include +#include +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 actions() const { + return QList() << actionTransformPolyhedron; + } + + bool applicable(QAction*) const { + return qobject_cast(scene->item(scene->mainSelectionIndex())) || + qobject_cast(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(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 { + typedef Polyhedron::HalfedgeDS HDS; + + CGAL::Aff_transformation_3 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PCA/Trivial_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,199 @@ +#include + +#include +#include +#include + +#include +#include +#include + +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("

Scene bounding box

" + "

x range: (%1, %2)
" + "y range: (%3, %4)
" + "z range: (%5, %6)

") + .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(positions_lines.size()/3)); + vaos[0]->release(); + program->release(); + + } + + void invalidateOpenGLBuffers() + { + compute_elements(); + are_buffers_filled = false; + compute_bbox(); + } + +private: + + mutable std::vector 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(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 +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 actions() const { + return QList() << 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/PMP/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/PMP/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Fairing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,135 @@ +#undef NDEBUG +#include + +#include "Messages_interface.h" +#include "Scene_polyhedron_selection_item.h" +#include +#include "ui_Fairing_widget.h" +#include "Polyhedron_type.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +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->item(scene->mainSelectionIndex())) + || qobject_cast(scene->item(scene->mainSelectionIndex())); + } + void print_message(QString message) { messages->information(message);} + QList actions() const { return QList() << 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(); + 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(*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(); + 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 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::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Fairing_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,144 @@ + + + Fairing + + + + 0 + 0 + 296 + 248 + + + + Fairing + + + + + + + Fairing + + + + + + + + Weight Type: + + + + + + + 0 + + + + Cotangent Weight + + + + + Uniform Weight + + + + + + + + + + + + Continuity: + + + + + + + 0 + + + 2 + + + 1 + + + + + + + + + Fair a region defined by a selection of vertices + + + + + + + + + + Refinement + + + + + + + + Density Control Factor: + + + + + + + 96.989999999999995 + + + 0.200000000000000 + + + 2.410000000000000 + + + + + + + + + Refine a region defined by a selection of faces + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,702 @@ +#undef NDEBUG +#define DEBUG_TRACE +#include + +#include "Messages_interface.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" +#include "Scene.h" + +#include +#include "ui_Hole_filling_widget.h" +#include "Polyhedron_type.h" + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include "Kernel_type.h" + +#include +#include + +// 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_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 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(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(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 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::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->item(scene->mainSelectionIndex())); } + void print_message(QString message) { messages->information(message); } + QList actions() const { return QList() << 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 visualizers; + // hold created facet for accept reject functionality + std::vector 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() ) + { 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() ) + { 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_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_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_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->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(); + 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(); + 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(); + 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(); + 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(); + 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(); + 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::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(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 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(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(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 > 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::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::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_polyline_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,170 @@ +#include + +#include "Messages_interface.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" +#include + +#include +#include "Polyhedron_type.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +namespace PMP = CGAL::Polygon_mesh_processing; + +template +class Polyhedron_builder : public CGAL::Modifier_base { +public: + Polyhedron_builder(std::vector >* triangles, + Scene_polylines_item::Polyline* polyline) + : triangles(triangles), polyline(polyline) + { } + + void operator()(HDS& hds) { + CGAL::Polyhedron_incremental_builder_3 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 >::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 >* 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->item(scene->mainSelectionIndex())); } + void print_message(QString message) { messages->information(message); } + QList actions() const { return QList() << 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 + void operator()(const T & /*t*/) const {} + }; + typedef boost::function_output_iterator 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->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 > 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Hole_filling_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,314 @@ + + + HoleFilling + + + true + + + + 0 + 0 + 815 + 973 + + + + Hole Filling + + + + true + + + + + + + + Action: + + + + + + + 2 + + + + Triangulate + + + + + Triangulate + Refine + + + + + Triangulate + Refine + Fair + + + + + + + + + + Hole Filling Parameters + + + + + + Use 3D Delaunay Triangulation Search Space + + + true + + + + + + + Skip Hole Fillings Making the Surface Self Intersecting + + + + + + + + + Small Hole #Vertices Threshold + + + + + + + 0 + + + 999999999.000000000000000 + + + 1.000000000000000 + + + 10.000000000000000 + + + + + + + + + + + + Refinement Parameters + + + + + + + + Density Factor + + + + + + + 96.989999999999995 + + + 0.200000000000000 + + + 1.410000000000000 + + + + + + + + + + + + Fairing Parameters + + + + + + + + Continuity + + + + + + + 0 + + + 2 + + + 1 + + + + + + + + + + + Weight Type + + + + + + + 1 + + + + Uniform Weight + + + + + Cotangent Weight + + + + + + + + + + + + + Hole Display and Selection + + + + + + true + + + + 75 + true + + + + Detect and Display Holes + + + + + + + + + Select All Holes + + + + + + + Select Small Holes + + + + + + + Deselect All Holes + + + + + + + + + Note: Use CTRL+Left mouse click to manually select/deselect a hole + + + + + + + + + + Actions + + + + + + + + true + + + Fill Selected Holes + + + + + + + Create Polyline Items for Selected Holes + + + + + + + + + + + + + + Reject + + + + + + + Accept + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Inside_out_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,83 @@ +#include +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" +#include "Polyhedron_type.h" + +#include +#include +#include +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->item(index)) + || qobject_cast(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->item(index)); + + Scene_polygon_soup_item* soup_item = + qobject_cast(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,250 @@ + + + Isotropic_remeshing_dialog + + + true + + + + 0 + 0 + 414 + 318 + + + + Isotropic remeshing criteria + + + + + + + 15 + 75 + true + + + + NO OBJECT + + + + + + + No size + + + + + + + Remesh + + + + + + Split only border/selected edges + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Isotropic remeshing + + + + + + + 110 + 0 + + + + + + + + Number of iterations + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + nbIterations_spinbox + + + + + + + Target edge length + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + edgeLength_dspinbox + + + + + + + + 110 + 0 + + + + 1000.000000000000000 + + + 0.100000000000000 + + + + + + + Protect borders/selected edges + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + true + + + + + + + + + + + + + + Allow 1D smoothing along borders + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Preserve duplicated edges + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + edgeLength_dspinbox + nbIterations_spinbox + buttonBox + + + + + buttonBox + accepted() + Isotropic_remeshing_dialog + accept() + + + 388 + 288 + + + 157 + 195 + + + + + buttonBox + rejected() + Isotropic_remeshing_dialog + reject() + + + 388 + 288 + + + 286 + 195 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,733 @@ +//#define CGAL_PMP_REMESHING_VERBOSE +//#define CGAL_PMP_REMESHING_DEBUG +//#define CGAL_PMP_REMESHING_VERY_VERBOSE + +#include + +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Scene_polyhedron_selection_item.h" +#include "Polyhedron_type.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#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 +PointOutputIterator +sample_edge( + typename boost::graph_traits::halfedge_descriptor hd, + TriangleMesh& triangle_mesh, + double target_length, + const PointPMap& pmap, + PointOutputIterator out) +{ + typedef typename boost::property_traits::value_type Point_3; + typedef typename CGAL::Kernel_traits::Kernel::Vector_3 Vector_3; + typename boost::property_traits::reference src=get(pmap, source(hd,triangle_mesh) ); + typename boost::property_traits::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 +EdgeOutputIterator +split_identical_edges( + typename boost::graph_traits::halfedge_descriptor hd, + TriangleMesh& tm, + const PointPMap& pmap, + const PointRange& points, + EdgeOutputIterator out) +{ + typedef typename PointRange::value_type Point_3; + typedef boost::graph_traits 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 +// 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 +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::type PointPMap; + typedef typename boost::property_traits::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 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::edge_descriptor edge_descriptor; + typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef boost::graph_traits::face_descriptor face_descriptor; + + typedef boost::unordered_set Edge_set; + typedef Scene_polyhedron_selection_item::Is_constrained_map 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 actions() const { + return QList() << actionIsotropicRemeshing_; + } + + bool applicable(QAction*) const + { + if (scene->selectionIndices().size() == 1) + { + return qobject_cast(scene->item(scene->mainSelectionIndex())) + || qobject_cast(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->item(index))) + return true; + } + return false; + } + + void detect_and_split_duplicates(std::vector& selection, + std::map& edges_to_protect, + double target_length) + { + typedef Polyhedron::Point_3 Point_3; + typedef std::pair Segment_3; + + typedef std::map< Segment_3, + std::vector< std::pair > > 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_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 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->item(index)); + + Scene_polyhedron_selection_item* selection_item = + qobject_cast(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::edge_descriptor edge_descriptor; + typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef boost::graph_traits::face_descriptor face_descriptor; + + const Polyhedron& pmesh = (poly_item != NULL) + ? *poly_item->polyhedron() + : *selection_item->polyhedron(); + + boost::property_map::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 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(); + selection_item->changed_with_poly_item(); + } + else if (poly_item) + { + if (edges_only) + { + std::vector border; + CGAL::Polygon_mesh_processing::border_halfedges( + faces(*poly_item->polyhedron()), + pmesh, + std::back_inserter(border)); + std::vector 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 edges_to_protect_map; + std::vector 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::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 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 selection; + BOOST_FOREACH(int index, scene->selectionIndices()) + { + Scene_polyhedron_item* poly_item = + qobject_cast(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::edge_descriptor edge_descriptor; + std::map 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(0, selection.size()), + Remesh_polyhedron_item_for_parallel_for( + 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::edge_descriptor edge_descriptor; + typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef boost::graph_traits::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::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 border; + CGAL::Polygon_mesh_processing::border_halfedges( + faces(*poly_item->polyhedron()) + , *poly_item->polyhedron() + , std::back_inserter(border)); + std::vector 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 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 + struct Remesh_polyhedron_item_for_parallel_for + : RemeshFunctor + { + const std::vector& selection_; + std::map& edges_to_protect_; + + public: + // Constructor + Remesh_polyhedron_item_for_parallel_for( + const std::vector& selection, + std::map& 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& 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): %1, %2, %3") + .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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Jet_fitting_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,142 @@ +#include +#include +#include "Polyhedron_type.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" + +#include + +#include "Scene.h" +#include + +#include +#include +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->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->item(index)); + if(!poly_item) + return; + + // wait cursor + QApplication::setOverrideCursor(Qt::WaitCursor); + + Polyhedron* pMesh = poly_item->polyhedron(); + + // types + typedef CGAL::Monge_via_jet_fitting 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 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::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Join_and_split_polyhedra_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,176 @@ +#include +#include +#include +#include "Kernel_type.h" +#include "Polyhedron_type.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" +#include "Messages_interface.h" + +#include +#include + +#include +#include + +#include +#include +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 actions() const { return QList() << 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->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->item(mainSelectionIndex)); + + QList indices_to_remove; + Q_FOREACH(int index, scene->selectionIndices()) { + if (index == mainSelectionIndex) + continue; + + Scene_polyhedron_item* item = + qobject_cast(scene->item(index)); + if(item) + { + indices_to_remove.push_front(index); + CGAL::Polyhedron_copy_3 + 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& new_polyhedra): + m_new_polyhedra(new_polyhedra) {} + void operator()(const Polyhedron& p){ + m_new_polyhedra.push_back( new Polyhedron(p) ); + } + std::list& 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->item(index)); + if(item) + { + std::list 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 + 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->item(index)); + if(item) + { + item->setItemIsMulticolor(true); + std::list 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,920 @@ +#include +#include +#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 +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef Polyhedron::Facet_iterator Facet_iterator; + +typedef CGAL::Mean_curvature_flow_skeletonization Mean_curvature_skeleton; +typedef Mean_curvature_skeleton::Skeleton Skeleton; + +typedef Polyhedron::Traits Kernel; +typedef Kernel::Point_3 Point; + +struct Polyline_visitor +{ + typedef std::vector Polyline; + typedef std::vector Polyline_of_ids; + + std::list& polylines; + Skeleton& skeleton; + + Polyline_visitor(std::list& lines, Skeleton& skeleton) + : polylines(lines), + skeleton(skeleton) + {} + + void start_new_polyline() + { + Polyline V; + polylines.push_back(V); + } + + void add_node(boost::graph_traits::vertex_descriptor vd) + { + Polyline& polyline = polylines.back(); + polyline.push_back(skeleton[vd].point); + } + + void end_polyline(){} +}; + +template +struct Facet_with_id_pmap + : public boost::put_get_helper > +{ + 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& internal_vector + ) : internal_vector(internal_vector) { } + + reference operator[](key_type key) const + { return internal_vector[key->id()]; } +private: + std::vector& 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), SIGNAL(updated_bbox()), + this, SLOT(on_actionUpdateBBox())); + connect(ui->pushButton_segment, SIGNAL(clicked()), + this, SLOT(on_actionSegment())); + + QObject* scene_object = dynamic_cast(scene); + connect(scene_object, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), + this, SLOT(on_actionItemAboutToBeDestroyed(CGAL::Three::Scene_item*))); + } + + virtual void closure() + { + dockWidget->hide(); + } + + QList actions() const { + return QList() << actionMCFSkeleton << actionConvert_to_medial_skeleton; + } + + bool applicable(QAction*) const { + return qobject_cast(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 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->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 distances(num_vertices(*input_triangle_mesh)); + BOOST_FOREACH(boost::graph_traits::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 sdf_values( num_faces(*input_triangle_mesh) ); + Facet_with_id_pmap 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 segment_ids( num_faces(*input_triangle_mesh) ); + Facet_with_id_pmap 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(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->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->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->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->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->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 fixedPoints; + mcs->fixed_points(fixedPoints); + + Point_set *ps = fixedPointsItem->point_set(); + for (size_t i = 0; i < fixedPoints.size(); ++i) + { + UI_point_3 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->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->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 fixedPoints; + mcs->fixed_points(fixedPoints); + + Point_set *ps = fixedPointsItem->point_set(); + for (size_t i = 0; i < fixedPoints.size(); ++i) + { + UI_point_3 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 nonFixedPoints; + mcs->non_fixed_points(nonFixedPoints); + ps = nonFixedPointsItem->point_set(); + for (size_t i = 0; i < nonFixedPoints.size(); ++i) + { + UI_point_3 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 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 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->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->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 fixedPoints; + mcs->fixed_points(fixedPoints); + + Point_set *ps = fixedPointsItem->point_set(); + for (size_t i = 0; i < fixedPoints.size(); ++i) + { + UI_point_3 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,174 @@ + + + Mean_curvature_flow_skeleton_plugin + + + + 0 + 0 + 744 + 468 + + + + DockWidget + + + + + + + Is medially centered + + + + + + + + + + + + + quality_speed_tradeoff + + + + + + + + + + + + + + medially_centered_speed_tradeoff + + + + + + + + + + + + + + min_edge_length + + + + + + + + + + + + + + area_variation_factor + + + + + + + + + + + + + + + + Run one iteration + + + + + + + Run to convergence + + + + + + + Skeletonize + + + + + + + Segment + + + + + + + + + + + + 75 + true + + + + Steps of an iteration: + + + + + + + + + 1 - Contract + + + + + + + 2 - Collapse + + + + + + + 3 - Split + + + + + + + 4 - Degeneracy + + + + + + + + + + + + contract() + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Orient_soup_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,172 @@ +#include +#include +#include +#include +#include +#include + +#include "Scene_polygon_soup_item.h" +#include "Scene_polyhedron_item.h" + +#include +#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->item(index))) + return true; + else + if (action==actionShuffle && + qobject_cast(scene->item(index))) + return true; + } + return false; + } + + QList 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 Polyhedron_demo_orient_soup_plugin::actions() const { + return QList() << 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->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->item(index)); + + if(item) { + item->shuffle_orientations(); + //scene->itemChanged(item); + } + else { + Scene_polyhedron_item* poly_item = + qobject_cast(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->item(index)); + + if(item) + { + item->setDisplayNonManifoldEdges(!item->displayNonManifoldEdges()); + scene->itemChanged(item); + } +} + +#include "Orient_soup_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,257 @@ +#include +#include "opengl_tools.h" + +#include "Messages_interface.h" +#include "Scene_polyhedron_item.h" +#include "Scene_points_with_normal_item.h" +#include + +#include +#include "Polyhedron_type.h" + +#include +#include +#include +#include "ui_Point_inside_polyhedron_widget.h" + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +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->item(i)) != NULL; + point_item_exists |= qobject_cast(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 actions() const { return QList() << 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 polys; + typedef CGAL::Side_of_triangle_mesh Point_inside; + std::vector inside_testers;// to put all polyhedra to query object + // it does not support copy-construction so let's use pointers + std::vector point_sets; + Q_FOREACH(CGAL::Three::Scene_interface::Item_id id, scene->selectionIndices()) { + Scene_polyhedron_item* poly_item = qobject_cast(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->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::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::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->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 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,95 @@ + + + Point_inside_polyhedron + + + + 0 + 0 + 542 + 258 + + + + Point Inside Polyhedron + + + + + + + Sample Random Points from Bbox + + + + + + + Point Location + + + + + + + + Inside + + + + + + + On Boundary + + + + + + + Outside + + + + + + + + + Select + + + + + + + + 75 + true + + + + Note: + + + + + + + + + <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> + + + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,348 @@ +#include +#include + +#include "Messages_interface.h" +#include "Scene_plane_item.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" +#include "Scene.h" + +#include +#include "ui_Polyhedron_slicer_widget.h" + +#include +#include +#include + +#include "Polyhedron_type.h" + +#include +#include +#include +#include +#include + +#include +#include + +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->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 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& planes, + const std::vector& plane_positions, + std::list >& 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 Polyhedron_demo_polyhedron_slicer_plugin::actions() const { + return QList() << 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)) + { 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(); + 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 planes; + std::vector 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 > 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 >::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_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& planes, + const std::vector& plane_positions, + std::list >& polylines) +{ + CGAL::Polygon_mesh_slicer slicer(poly); + std::vector::const_iterator plane_position_it = plane_positions.begin(); + for(std::vector::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_slicer_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,136 @@ + + + Polyhedron_slicer + + + + 0 + 0 + 289 + 208 + + + + Polyhedron Slicer + + + + + + + + + + + + Base 2 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Base 1 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Center + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Update Plane + + + + + + + + + + + Distance with planes + + + + + + + + + + + + + + New polyline item for each polyline + + + + + + + Generate + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Polyhedron_stitching_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,167 @@ +#include +#include +#include +#include "Kernel_type.h" +#include "Polyhedron_type.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polylines_item.h" + +#include +#include + +#include + +#include +#include +#include + +template +struct Is_border { + const G& g; + Is_border(const G& g) + : g(g) + {} + + template + bool operator()(const Descriptor& d) const { + return is_border(d,g); + } + + bool operator()(typename boost::graph_traits::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 actions() const { return QList() << 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->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::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->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, Is_border > BorderGraph; + + Is_border 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,115 @@ +#include + +#include "Scene_polyhedron_item.h" +#include +#include "Polyhedron_type.h" +#include +#include +#include "Messages_interface.h" +#include + +#include +#include +#include + +#include +#include + +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 actions() const + { + return QList() << actionRemoveIsolatedVertices + << actionRemoveDegenerateFaces; + } + + bool applicable(QAction*) const + { + int item_id = scene->mainSelectionIndex(); + return qobject_cast( + 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->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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,418 @@ +#include +#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 +#include +#include "ui_Selection_widget.h" + +#include +#include +#include + +#include + +#include +#include + +struct Is_terminal +{ + template + bool operator ()(VertexDescriptor , const Graph& ) + { + return false; // degree(vd,g) != 2; is a bad test in case of parallel edges + } +}; + + +template +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::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->item(scene->mainSelectionIndex())) + || qobject_cast(scene->item(scene->mainSelectionIndex())); + } + void print_message(QString message) { messages->information(message); } + QList actions() const { return QList() << 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(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(); + 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(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(); + 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(); + 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(); + if(!selection_item) { + print_message("Error: there is no selected polyhedron selection item!"); + return; + } + + boost::optional 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(); + if(!selection_item) { + print_message("Error: there is no selected polyhedron selection item!"); + return; + } + boost::optional 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(); + 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(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(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(); + 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(); + 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 p2vd; + std::map::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 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(); + 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(); + 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(); + 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(); + 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(); + 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->item(item_id)); + if(!selection_item) { return; } + + Scene_polyhedron_item* poly_item = get_selected_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(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_item); + if(poly_item) { + std::pair 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_item); + if(selection_item) { + Scene_polyhedron_item* poly_item = selection_item->polyhedron_item(); + std::pair 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Selection_widget.ui cgal-4.8/demo/Polyhedron/Plugins/PMP/Selection_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Selection_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Selection_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,369 @@ + + + Selection + + + + 0 + 0 + 455 + 684 + + + + Selection + + + + + + + + + + + Selection &Type: + + + Selection_type_combo_box + + + + + + + + Vertex + + + + + Facet + + + + + Edge + + + + + Connected component (facet) + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Insertion + + + true + + + + + + + Removal + + + + + + + + + + + + + Brush &size: + + + Brush_size_spin_box + + + + + + + + + + + + + + + + + + Select &All + + + + + + + &Clear + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Isolated &Component Size: + + + Threshold_size_spin_box + + + + + + + 999999999 + + + 8 + + + + + + + &Get Minimum + + + + + + + + + Select &Isolated Components Below Threshold + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Sharp edges angle: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 180 + + + 60 + + + + + + + Select + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Expand or reduce selection: + + + + + + + -50 + + + 50 + + + + + + + Apply + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Create Point Set Item from Selected Vertices + + + + + + + Create Polyline Item from Selected Edges + + + + + + + Create Polyhedron Item from Selected Facets + + + + + + + Erase Selected Facets from Polyhedron Item + + + + + + + + + + Keep connected components of Selected Facets + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 75 + true + + + + Create Selection Item + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Self_intersection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,101 @@ +#include +#include +#include +#include +#include "opengl_tools.h" +#include "Kernel_type.h" +#include "Polyhedron_type.h" +#include "Scene_polyhedron_item.h" +#include "Scene_polyhedron_selection_item.h" + +#include +#include + +#include +#include +#include + +#include +#include + +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->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->item(index)); + + if(item) + { + Polyhedron* pMesh = item->polyhedron(); + + // compute self-intersections + + typedef Polyhedron::Facet_handle Facet_handle; + std::vector > 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 >::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 -Nru cgal-4.7/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/PMP/Triangulate_facets_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,144 @@ +#include +#include +#include +#include "Messages_interface.h" +#include +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" + +#include +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 actions() const { + return QList() << actionTriangulateFacets + << actionUnTriangulateFacets; + } + + bool applicable(QAction*) const { + Q_FOREACH(CGAL::Three::Scene_interface::Item_id index, scene->selectionIndices()){ + if ( qobject_cast(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->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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,115 @@ +#include +#include +#include +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include + +#include + +#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 actions() const { return QList() << 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->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->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 Covariance; + std::vector 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Features_detection_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,133 @@ + + + VCMFeaturesDetectionDialog + + + + 0 + 0 + 318 + 208 + + + + Normal Estimation + + + + + + + + Offset Radius: + + + + + + + 3 + + + 0.050000000000000 + + + 0.100000000000000 + + + + + + + + + + + Convolution Radius: + + + + + + + 3 + + + 0.050000000000000 + + + + + + + + + + + Threshold: + + + + + + + 3 + + + 0.020000000000000 + + + 0.160000000000000 + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + VCMFeaturesDetectionDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + VCMFeaturesDetectionDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Merge_point_sets_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,91 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +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 actions() const { + return QList() << actionMergePointSets; + } + + bool applicable(QAction*) const { + if (scene->selectionIndices().size() < 2) + return false; + + Q_FOREACH(int index, scene->selectionIndices()) + { + if ( qobject_cast(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->item(mainSelectionIndex)); + + QList indices_to_remove; + Q_FOREACH(int index, scene->selectionIndices()) + { + if (index == mainSelectionIndex) + continue; + + Scene_points_with_normal_item* item = + qobject_cast(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_average_spacing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,117 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +// 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 actions() const { + return QList() << actionAverageSpacing; + } + + //! Applicable if the currently selected item is a + //! points_with_normal_item. + bool applicable(QAction*) const { + return qobject_cast(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->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( + 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,128 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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 + (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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_bilateral_smoothing_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,130 @@ + + + PointSetBilateralSmoothingDialog + + + + 0 + 0 + 357 + 141 + + + + Bilateral Smoothing + + + + + + Iterations + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + Neighborhood size + + + + + + + 1 + + + 2147483647 + + + 1 + + + + + + + + + + + + + 1 + + + 2147483647 + + + 24 + + + + + + + ° + + + 90 + + + 25 + + + + + + + Sharpness Angle + + + + + + + + + buttonBox + accepted() + PointSetBilateralSmoothingDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PointSetBilateralSmoothingDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,288 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#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 actions() const { + return QList() << actionNormalEstimation << actionNormalInversion; + } + + bool applicable(QAction* action) const { + Scene_points_with_normal_item* item = qobject_cast(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->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->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(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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_normal_estimation_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,415 @@ + + + NormalEstimationDialog + + + + 0 + 0 + 400 + 473 + + + + Dialog + + + + + + PCA Estimate Normals + + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Support Size + + + + + + + Nearest Neighbors + + + 3 + + + 10000000 + + + 6 + + + + + + + + + + Jet Estimate Normals + + + true + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Support Size + + + + + + + Nearest Neighbors + + + 3 + + + 100000000 + + + 12 + + + + + + + + + + VCM Estimate Normals + + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Offset Radius + + + + + + + 0.010000000000000 + + + 0.010000000000000 + + + 0.100000000000000 + + + + + + + + + + Convolution Radius + + + true + + + + + + + Convolution Neighbors + + + + + + + false + + + 100000000 + + + 40 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Orient Estimated Normals + + + true + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Neighborhood Size + + + + + + + Nearest Neighbors + + + 6 + + + 100000000 + + + 18 + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonJet + toggled(bool) + frame_2 + setEnabled(bool) + + + 199 + 96 + + + 199 + 135 + + + + + buttonPCA + toggled(bool) + frame + setEnabled(bool) + + + 199 + 18 + + + 199 + 57 + + + + + buttonVCM + toggled(bool) + frame_3 + setEnabled(bool) + + + 199 + 174 + + + 199 + 245 + + + + + buttonOrient + toggled(bool) + frame_4 + setEnabled(bool) + + + 199 + 316 + + + 199 + 355 + + + + + buttonRadius + toggled(bool) + m_convolution_radius + setEnabled(bool) + + + 90 + 242 + + + 285 + 245 + + + + + buttonNeighbors + toggled(bool) + m_convolution_neighbors + setEnabled(bool) + + + 101 + 274 + + + 285 + 277 + + + + + buttonBox + accepted() + NormalEstimationDialog + accept() + + + 199 + 428 + + + 199 + 225 + + + + + buttonBox + rejected() + NormalEstimationDialog + reject() + + + 199 + 428 + + + 199 + 225 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,116 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_outliers_removal_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,109 @@ + + OutlierRemovalDialog + + + + 0 + 0 + 331 + 120 + + + + Outlier Removal + + + + + + Removed Percentage: + + + + + + + % + + + 0.010000000000000 + + + 100.000000000000000 + + + 0.100000000000000 + + + 5.000000000000000 + + + + + + + Neighbors + + + + + + + 6 + + + 9999 + + + 24 + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + OutlierRemovalDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + OutlierRemovalDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,509 @@ +#include +#include +#include +#include +#include +#include "opengl_tools.h" + +#include "Messages_interface.h" +#include "Scene_points_with_normal_item.h" +#include "Scene_polylines_item.h" + +#include +#include +#include "ui_Point_set_selection_widget.h" +#include "Point_set_3.h" + +#include +#include +#include + +#include +#include +#include + +#include +#include + + +// 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 Polygon_2; + + bool rectangle; + std::vector 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->item(scene->mainSelectionIndex())); + } + void print_message(QString message) { messages->information(message); } + QList actions() const { return QList() << 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->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(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(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(); + 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 > 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(); + 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->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->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->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->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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_selection_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,151 @@ + + + PointSetSelection + + + + 0 + 0 + 369 + 239 + + + + Point Set Selection + + + + + + + + + + + Selection &Tool: + + + Selection_tool_combo_box + + + + + + + + Rectangle + + + + + Free Form + + + + + + + + + + + + 6 + + + QLayout::SetDefaultConstraint + + + + + Selection &Mode: + + + Selection_mode_combo_box + + + + + + + + New Selection + + + + + Union + + + + + Intersection + + + + + Difference + + + + + + + + + + + + Select &All + + + + + + + &Clear + + + + + + + + + &Invert Selection + + + + + + + &Erase Selected Points + + + + + + + Create Point Set Item from Selected Points + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#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 Point_with_normal; +//typedef std::vector Point_list; +//typedef CGAL::Identity_property_map PointPMap; +//typedef CGAL::Normal_of_point_with_normal_pmap 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->item(scene->mainSelectionIndex())); + if (item && item->has_normals()) + return true; + return false; + } + + QList actions() const { + return QList() << 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->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 PointPMap; + typedef CGAL::Normal_of_point_with_normal_pmap NormalPMap; + + typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; + typedef CGAL::Shape_detection_3::Efficient_RANSAC 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 >(); + } + if(dialog.detect_cylinder()){ + shape_detection.add_shape_factory >(); + } + if(dialog.detect_torus()){ + shape_detection.add_shape_factory< CGAL::Shape_detection_3::Torus >(); + } + if(dialog.detect_cone()){ + shape_detection.add_shape_factory< CGAL::Shape_detection_3::Cone >(); + } + if(dialog.detect_sphere()){ + shape_detection.add_shape_factory< CGAL::Shape_detection_3::Sphere >(); + } + + // 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, shape_detection.shapes()) + { + CGAL::Shape_detection_3::Cylinder *cyl; + cyl = dynamic_cast *>(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(64 + rand.get_int(0, 192)); + g = static_cast(64 + rand.get_int(0, 192)); + b = static_cast(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 *>(shape.get())){ + CGAL::Shape_detection_3::Cylinder * cyl + = dynamic_cast *>(shape.get()); + ss << item->name().toStdString() << "_cylinder_" << cyl->radius() << "_"; + } + else if (dynamic_cast *>(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*>(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 *>(shape.get())) + ss << item->name().toStdString() << "_cone_"; + else if (dynamic_cast *>(shape.get())) + ss << item->name().toStdString() << "_torus_"; + else if (dynamic_cast *>(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 Vb; + typedef CGAL::Alpha_shape_face_base_2 Fb; + typedef CGAL::Triangulation_data_structure_2 Tds; + typedef CGAL::Delaunay_triangulation_2 Triangulation_2; + typedef CGAL::Alpha_shape_2 Alpha_shape_2; + + + std::vector 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 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 + +#include "Point_set_shape_detection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,261 @@ + + + PointSetShapeDetectionDialog + + + + 0 + 0 + 444 + 269 + + + + Shape Detection + + + + + + + + Plane + + + true + + + + + + + Cylinder + + + true + + + + + + + Torus + + + + + + + Cone + + + + + + + Sphere + + + + + + + + + + + Epsilon: + + + + + + + Fitting tolerance in Euclidean distance + + + 3 + + + 1.000000000000000 + + + 0.001000000000000 + + + 0.002000000000000 + + + + + + + + + + + Normal Tolerance: + + + + + + + Normal angle deviation tolerance as cosine of the angle + + + 0.001000000000000 + + + 0.900000000000000 + + + + + + + + + + + Minimum Numbr of Points: + + + + + + + Smallest allowed size for a primitive + + + 10000 + + + 50 + + + 100 + + + + + + + + + + + Connectivity Epsilon: + + + + + + + Maximum world distance between points on a shape to be considered as connected + + + 2 + + + 1.000000000000000 + + + 0.010000000000000 + + + 0.020000000000000 + + + + + + + + + + + Search Rigorosity (Probability): + + + + + + + Probability to overlook the largest primitive in one extraction iteration + + + 1.000000000000000 + + + 0.010000000000000 + + + 0.050000000000000 + + + + + + + + + Generate Alpha Shapes for Planes + + + + + + + Do Not Generate Point Subsets + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + PointSetShapeDetectionDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PointSetShapeDetectionDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,201 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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( + 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_simplification_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,204 @@ + + + PointSetSimplificationDialog + + + + 0 + 0 + 450 + 251 + + + + Simplification + + + + + + Maximum Cluster Size + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + Random + + + true + + + + + + + Grid + + + + + + + % + + + 2 + + + 0.100000000000000 + + + 100.000000000000000 + + + 0.100000000000000 + + + 50.000000000000000 + + + + + + + Hierarchy + + + + + + + false + + + * average spacing + + + 2 + + + 0.100000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + Points to Remove Randomly + + + + + + + Grid Cell Size + + + + + + + false + + + 1 + + + 2147483647 + + + 10 + + + + + + + Maximum Surface Variation + + + + + + + false + + + + + + 5 + + + 0.000010000000000 + + + 0.333330000000000 + + + 0.012340000000000 + + + 0.333330000000000 + + + + + + + + + buttonBox + accepted() + PointSetSimplificationDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PointSetSimplificationDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_smoothing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,97 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +// 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 actions() const { + return QList() << actionJetSmoothing; + } + + bool applicable(QAction*) const { + return qobject_cast(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->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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,146 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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(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( + points->begin(), points->end(), + 6 /* knn = 1 ring */); + + std::vector > new_points; + CGAL::edge_aware_upsample_point_set(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_upsampling_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,156 @@ + + + PointSetUpsamplingDialog + + + + 0 + 0 + 443 + 175 + + + + Edge Aware Upsampling + + + + + + Sharpness Angle + + + + + + + Neighborhood Radius + + + + + + + Edge Sensitivity + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + Output Size + + + + + + + 1.000000000000000 + + + 0.010000000000000 + + + + + + + + + + * input size + + + 1.000000000000000 + + + 1000.000000000000000 + + + 4.000000000000000 + + + + + + + ° + + + 90 + + + 25 + + + + + + + * average spacing + + + 2 + + + 0.100000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 3.000000000000000 + + + + + + + + + buttonBox + accepted() + PointSetUpsamplingDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PointSetUpsamplingDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,128 @@ +#include "config.h" +#include "Scene_points_with_normal_item.h" +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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(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 + (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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Point_set_wlop_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,122 @@ + + + WLOPRegularizationAndSimplificationDialog + + + + 0 + 0 + 292 + 109 + + + + WLOP Simplification and Regularization + + + + + + Retained Percentage + + + + + + + % + + + 2 + + + 0.100000000000000 + + + 100.000000000000000 + + + 0.100000000000000 + + + 50.000000000000000 + + + + + + + Neighborhood Radius + + + + + + + * average spacing + + + 2 + + + 0.100000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + WLOPRegularizationAndSimplificationDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + WLOPRegularizationAndSimplificationDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,873 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include "Scene_polygon_soup_item.h" +#include "Scene_polyhedron_item.h" +#include "Scene_points_with_normal_item.h" +#include "Polyhedron_type.h" +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#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 + 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 Tree_traits; + typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search; + typedef Neighbor_search::Tree Tree; + typedef Neighbor_search::iterator Search_iterator; + + typedef CGAL::Scale_space_surface_reconstruction_3 ScaleSpace; + + template + 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(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 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 scales; + generate_scales (std::back_inserter (scales)); + + std::vector 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(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 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 scales; + generate_scales (std::back_inserter (scales)); + + std::vector 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::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(points.begin(), points.end(), + scale); + } + + template + 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 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 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(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(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 + +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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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->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 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->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->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 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin_impl.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,245 @@ +//---------------------------------------------------------- +// Poisson reconstruction method: +// Reconstructs a surface mesh from a point set and returns it as a polyhedron. +//---------------------------------------------------------- + + +// CGAL +#include // must be included before kernel +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CGAL_EIGEN3_ENABLED +#include +#endif + +#include + +#include "Kernel_type.h" +#include "Polyhedron_type.h" +#include "Scene_points_with_normal_item.h" + + +// Poisson implicit function +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; + +// Surface mesher +typedef CGAL::Surface_mesh_default_triangulation_3 STr; +typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; +typedef CGAL::Implicit_surface_3 Surface_3; + +// AABB tree +typedef CGAL::AABB_face_graph_triangle_primitive Primitive; +typedef CGAL::AABB_traits AABB_traits; +typedef CGAL::AABB_tree 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::EigenType> > solver; + ok = function.compute_implicit_function(solver, use_two_passes); + } + if(solver_name=="Eigen - built-in CG") + { + CGAL::Eigen_solver_traits::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 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=("< 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui --- cgal-4.7/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,483 @@ + + + SurfaceReconstructionDialog + + + + 0 + 0 + 397 + 663 + + + + Surface Reconstruction + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Longest Edge + + + + + + + 999999999.000000000000000 + + + + + + + Radius Ratio Bound + + + + + + + Beta Angle + + + + + + + 0.010000000000000 + + + 1000.000000000000000 + + + 5.000000000000000 + + + + + + + ° + + + 150.000000000000000 + + + 30.000000000000000 + + + + + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Average Neighborhood Size + + + + + + + 0 + + + 100000 + + + 30 + + + + + + + Size of Sample to Estimate Neighborhood + + + + + + + 1000000 + + + 200 + + + + + + + Iterations + + + + + + + 1 + + + 1000000 + + + 4 + + + + + + + Generate separate shells + + + false + + + + + + + Force manifold output + + + true + + + + + + + Smoothed version + + + false + + + + + + + + + + Poisson Reconstruction + + + + + + + false + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Min Triangle Angle: + + + + + + + ° + + + 1.000000000000000 + + + 30.000000000000000 + + + 20.000000000000000 + + + + + + + Max Triangle Size: + + + + + + + * average spacing + + + 0 + + + 1.000000000000000 + + + 1000.000000000000000 + + + 1.000000000000000 + + + 100.000000000000000 + + + + + + + Approximation Error: + + + + + + + * average spacing + + + 6 + + + 0.010000000000000 + + + 100.000000000000000 + + + 0.010000000000000 + + + 0.250000000000000 + + + + + + + Solver: + + + + + + + + + + + + + + Perform two passes + + + + + + + Do not fill holes + + + + + + + + + + Advancing Front Reconstruction + + + + + + + Select Method and Parameters Automatically + + + true + + + + + + + Scale Space Reconstruction + + + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + Output surface has boundaries + + + true + + + + + + + Output surface must pass exactly through input points + + + true + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + SurfaceReconstructionDialog + accept() + + + 198 + 640 + + + 198 + 331 + + + + + buttonBox + rejected() + SurfaceReconstructionDialog + reject() + + + 198 + 640 + + + 198 + 331 + + + + + buttonAdvancing + toggled(bool) + frameAdvancing + setEnabled(bool) + + + 198 + 116 + + + 198 + 155 + + + + + buttonAuto + toggled(bool) + frameAuto + setEnabled(bool) + + + 198 + 18 + + + 198 + 67 + + + + + buttonPoisson + toggled(bool) + framePoisson + setEnabled(bool) + + + 198 + 414 + + + 198 + 525 + + + + + buttonScaleSpace + toggled(bool) + frameScaleSpace + setEnabled(bool) + + + 198 + 194 + + + 198 + 304 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Subdivision_methods/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Subdivision_methods/Subdivision_methods_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,125 @@ +#include +#include +#include +#include + +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" +#include +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->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->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->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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,2 @@ +#include "Mesher_base.h" + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesher_base.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,27 @@ +#ifndef _MESHER_BASE_H +#define _MESHER_BASE_H + +#include +#include + +// 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,349 @@ +#include +#include + +#include "ui_Mesh_segmentation_widget.h" +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" +#include "Scene.h" +#include "Color_map.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include + + +template +struct Polyhedron_with_id_to_vector_property_map + : public boost::put_get_helper > +{ +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* internal_vector) + : internal_vector(internal_vector) { } + + reference operator[](key_type key) const { return (*internal_vector)[key->id()]; } +private: + std::vector* 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 > Item_sdf_map; +public: + + QList actions() const { + return QList() << actionSegmentation; + } + + bool applicable(QAction*) const { + return + qobject_cast(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_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 + void colorize_sdf(Scene_polyhedron_item* item, SDFPropertyMap sdf_values, std::vector& color_vector); + template + void colorize_segmentation(Scene_polyhedron_item* item, SegmentPropertyMap segment_ids, std::vector& 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 color_map_sdf; + std::vector color_map_segmentation; + Item_sdf_map item_sdf_map; +}; + +void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_sdf() +{ + color_map_sdf = std::vector(256); + int r = 0, g = 0, b = 255; + for(int i = 0; i <= 255; ++i) + { + if(i > 128 && i <= 192) { r = static_cast( ((i - 128) / (192.0 - 128)) * 255 ); } + if(i > 0 && i <= 98) { g = static_cast( ((i) / (98.0)) * 255 ); } + if(i > 191 && i <=255) { g = 255 - static_cast( ((i - 191) / (255.0 - 191)) * 255 ); } + if(i > 64 && i <= 127) { b = 255 - static_cast( ((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_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->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()) ).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 sdf_pmap(&pair->second); + QTime time; + time.start(); + std::pair 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->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& sdf_data = it == item_sdf_map.end() ? + std::vector() : it->second; + pair = item_sdf_map.insert(std::make_pair(new_item, sdf_data) ).first; + } + else + { + std::pair res = + item_sdf_map.insert(std::make_pair(item, std::vector()) ); + 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 sdf_pmap(&pair->second); + sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays); + } + + std::vector internal_segment_map(pair->first->polyhedron()->size_of_facets()); + Polyhedron_with_id_to_vector_property_map segment_pmap(&internal_segment_map); + Polyhedron_with_id_to_vector_property_map 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 +void Polyhedron_demo_mesh_segmentation_plugin::colorize_sdf( + Scene_polyhedron_item* item, + SDFPropertyMap sdf_values, + std::vector& 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(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(patch_id)); + } +} + +template +void Polyhedron_demo_mesh_segmentation_plugin::colorize_segmentation( + Scene_polyhedron_item* item, + SegmentPropertyMap segment_ids, + std::vector& 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(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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_segmentation_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,186 @@ + + + Mesh_segmentation + + + + 0 + 0 + 286 + 254 + + + + Mesh Segmentation + + + + + + + SDF Calculation Parameters + + + + + + Number of rays: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 25 + + + + + + + Cone angle: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 180 + + + 120 + + + + + + + + + + Segmentation Parameters + + + + + + 1 + + + 5 + + + + + + + Qt::LeftToRight + + + Smoothness: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Number of clusters: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 10.000000000000000 + + + 0.010000000000000 + + + 0.260000000000000 + + + + + + + Qt::LeftToRight + + + Extract segments: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + true + + + + + + + + + + + + + + Create new item: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + Calculate SDF + + + + + + + Segment + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,97 @@ +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Polyhedron_type.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +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->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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,193 @@ +#include +#include +#include +#include + +#include "Scene_polyhedron_item.h" +#include "Scene_textured_polyhedron_item.h" +#include "Textured_polyhedron_type.h" +#include "Polyhedron_type.h" + +#include + +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +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->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->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 Adaptor; + Adaptor adaptor(*pMesh); + + bool success = false; + switch(method) + { + case PARAM_MVC: + { + std::cout << "Parameterize (MVC)..."; + typedef CGAL::Mean_value_coordinates_parameterizer_3 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 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 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,174 @@ + + Remeshing_dialog + + + + 0 + 0 + 389 + 173 + + + + Meshing criteria + + + + + + + + &Angle: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + angle + + + + + + + 1.000000000000000 + + + 30.000000000000000 + + + 25.000000000000000 + + + + + + + &Size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + sizing + + + + + + + 4 + + + + + + + Approximation &error: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + approx + + + + + + + + + + + Non manifold + + + + + Manifold + + + + + Manifold with boundaries + + + + + + + + &Topological criterion: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + tags + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + buttonBox + accepted() + Remeshing_dialog + accept() + + + 384 + 191 + + + 157 + 195 + + + + + buttonBox + rejected() + Remeshing_dialog + reject() + + + 384 + 191 + + + 286 + 195 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin_cgal_code.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,366 @@ +#include +#include + +#include "Polyhedron_type.h" +#include +#include +#include "Scene_polyhedron_item.h" +#include "Scene_polygon_soup_item.h" + +#include + +#include "C2t3_type.h" +#include "Scene_c2t3_item.h" + +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +template +class Surface_mesh_modified_criteria_3 +{ +public: + typedef Tr Triangulation; + typedef typename Tr::Geom_traits::FT FT; + + typedef typename CGAL::array 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 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 uniform_size_criterion; + // bound on radii of surface Delaunay balls + + CGAL::Surface_mesher::Aspect_ratio_criterion aspect_ratio_criterion; + // lower bound on minimum angle in degrees + +}; // end class Surface_mesh_default_criteria_3 + + +// +// Types for meshing +// +typedef CGAL::Simple_cartesian Simple_cartesian_kernel; +// input surface +// typedef CGAL::Mesh_3::Robust_intersection_traits_3 IGT; +typedef CGAL::AABB_polyhedral_oracle 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 +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 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 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::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(0, c2t3, input, facets_criteria); + ; + break; + case 1: + mesher = new Mesher(0, c2t3, input, facets_criteria); + break; + default: + mesher = new Mesher(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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Remeshing_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,142 @@ +#include "config.h" +#ifdef CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER +#include +#include +#include "ui_Remeshing_dialog.h" + +#include +#include +#include +#include +#include +#include +#include "Scene_polyhedron_item.h" +#include +#include + +// 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->item(scene->mainSelectionIndex())); + } + + QList actions() const { + return QList() << 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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,531 @@ +#include "Scene_polyhedron_shortest_path_item.h" + +#include "Scene_polylines_item.h" + +#include +#include +#include +#include + +#include + +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 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(event); + Qt::KeyboardModifiers modifiers = keyEvent->modifiers(); + m_shiftHeld = modifiers.testFlag(Qt::ShiftModifier); + } + + if (event->type() == QEvent::MouseButtonPress && m_shiftHeld) + { + QMouseEvent* mouseEvent = static_cast(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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Scene_polyhedron_shortest_path_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include "Messages_interface.h" + +#include "Polyhedron_type.h" +#include "Kernel_type.h" + +#include "opengl_tools.h" + +#include +#include +#include +#include +#include + +#include +#include + +#ifndef Q_MOC_RUN +#include +#endif + +#include +#include +#include + +#include + +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::type VertexPointMap; + + typedef boost::graph_traits GraphTraits; + typedef GraphTraits::face_descriptor face_descriptor; + typedef GraphTraits::face_iterator face_iterator; + + typedef CGAL::Surface_mesh_shortest_path_traits Surface_mesh_shortest_path_traits; + typedef CGAL::Surface_mesh_shortest_path Surface_mesh_shortest_path; + typedef Surface_mesh_shortest_path::Face_location Face_location; + typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; + typedef CGAL::AABB_traits AABB_face_graph_traits; + typedef CGAL::AABB_tree 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 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,311 @@ +#include +#include + +#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 +#include +#include +#include +#include +#include +#include +#include +//#include +#include +#include +#include +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::type VertexIndexMap; + typedef boost::property_map::type HalfedgeIndexMap; + typedef boost::property_map::type FaceIndexMap; + typedef boost::property_map::type VertexPointMap; + + typedef CGAL::Surface_mesh_shortest_path_traits Surface_mesh_shortest_path_traits; + typedef CGAL::Surface_mesh_shortest_path Surface_mesh_shortest_path; + + struct ShortestPathsPointsVisitor + { + typedef std::vector 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 Shortest_paths_map; + +public: + + QList actions() const + { + return QList() << actionMakeShortestPaths; + } + + bool applicable(QAction*) const + { + return qobject_cast(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_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(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(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->item(itemIndex)); + + if (!item) + { + return; + } + + if(item->polyhedron_item() == NULL) + { + Scene_polyhedron_item* polyhedronItem = get_selected_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(); + 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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_widget.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,71 @@ + + + Shortest_path + + + + 0 + 0 + 334 + 402 + + + + Shortest_path + + + + + + + Shortest_path &Type: + + + Selection_type_combo_box + + + + + + + + Insertion + + + + + Removal + + + + + Compute Path + + + + + + + + + Vertex + + + + + Edge + + + + + Face + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Deform_mesh.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,423 @@ + + + DeformMesh + + + + 0 + 0 + 568 + 588 + + + + Surface Mesh Deformation + + + + + + + Selection + + + + + + + + + + + + Brush Size ROI: + + + + + + + Control Vertices Brush Size: + + + + + + + + + + + + + + + + + + + + + + + + + Set All Vertices as ROI + + + + + + + Clear ROI + + + + + + + + + + + + Use Shift + Left Click to paint ROI vertices + + + ROI + + + true + + + + + + + Use Shift + Left Click to paint control vertices + + + Control vertices + + + + + + + + + + + + + Insertion + + + true + + + + + + + Removal + + + + + + + + + + QLayout::SetDefaultConstraint + + + + + Load ROI / Control Vertices + + + + + + + Show As Sphere + + + false + + + + + + + Show ROI + + + true + + + + + + + Save ROI / Control Vertices + + + + + + + + + + + + + + + + + + + + + + Isolated Component Size: + + + + + + + 999999999 + + + 8 + + + + + + + Get Minimum + + + + + + + + + Select Isolated Components Below Threshold + + + + + + + + + + + + Qt::DefaultContextMenu + + + Remeshing + + + false + + + + + + + + Warning : after remeshing all ROI and control vertices will be unselected. "Discard changes" will be unavailable. + + + Qt::LeftToRight + + + Remesh after deformation + + + + + + + + + If unchecked, automatic value is used (the average edge length at ROI boundary) + + + Qt::RightToLeft + + + Target edge length + + + + + + + Qt::RightToLeft + + + Nb. iterations + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + + + + + + + Group of Control Vertices Navigation + + + + + + + + + 0 + 0 + + + + << + + + + + + + >> + + + + + + + + + + + Create new + + + + + + + Delete + + + + + + + + + + + Activate Pivoting + + + + + + + Activate Fixed Plane Deformation + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + + + + + Reset mesh to last version saved by "Overwrite Initial Geometry". Not available when Remeshing is ON. + + + Discard changes + + + + + + + + 0 + 0 + + + + Overwrite Initial Geometry + + + + + + + + 0 + 0 + + + + Apply and Close + + + + + + + + + + + + + + + diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,418 @@ +#include +#include "Scene_polyhedron_item.h" +#include "Scene_edit_polyhedron_item.h" + +#include +#include +#include + +#include + +#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 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 Polyhedron_demo_edit_polyhedron_plugin::actions() const { + return QList() << 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->item(i)) + || qobject_cast(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(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->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->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->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->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->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->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->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->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->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->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->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->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->item(item_id)); + if(!edit_item) return; // the selected item is not of the right type + + boost::optional 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->item(item_id)); + if(!edit_item) return; // the selected item is not of the right type + + boost::optional 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->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->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->item(i)); + if (poly_item) + { poly_item->update_halfedge_indices(); } + Scene_edit_polyhedron_item* edit_item = qobject_cast(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->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->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->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->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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,10 @@ +#ifndef SCENE_EDIT_POLYHEDRON_ITEM_CONFIG_H +#define SCENE_EDIT_POLYHEDRON_ITEM_CONFIG_H + +#ifdef scene_edit_polyhedron_item_EXPORTS +# define SCENE_EDIT_POLYHEDRON_ITEM_EXPORT Q_DECL_EXPORT +#else +# define SCENE_EDIT_POLYHEDRON_ITEM_EXPORT Q_DECL_IMPORT +#endif + +#endif // SCENE_EDIT_POLYHEDRON_ITEM_CONFIG_H diff -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,973 @@ +//#define CGAL_PMP_REMESHING_VERBOSE + +#include "opengl_tools.h" +#include "create_sphere.h" +#include "Scene_edit_polyhedron_item.h" +#include +#include +#include + +#include + +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&)), this, + SLOT(selected(const std::set&))); + + 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(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(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(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(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(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(ROI_color).swap(ROI_color); + nb_ROI = ROI_points.size(); + ROI_points.resize(0); + std::vector(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(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(pos_bbox).swap(pos_bbox); + color_bbox.resize(0); + std::vector(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(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(pos_sphere).swap(pos_sphere); + // normals_sphere.resize(0); + // std::vector(normals_sphere).swap(normals_sphere); + control_color.resize(0); + std::vector(control_color).swap(control_color); + nb_control = control_points.size(); + control_points.resize(0); + std::vector(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(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(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(pos_axis).swap(pos_axis); + color_lines.resize(0); + std::vector(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(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(fb->halfedge()->vertex()->id()); + tris[counter * 3 + 1] = static_cast(fb->halfedge()->next()->vertex()->id()); + tris[counter * 3 + 2] = static_cast(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(eb->vertex()->id()); + edges[counter * 2 + 1] = static_cast(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; iframe == 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::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* 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* 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 roi_facets; + std::set 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::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 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(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(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(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(nb_sphere/3), + static_cast(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(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(nb_sphere/3), + static_cast(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(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(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("

Polyhedron %1 (mode: %5, color: %6)

" + "

Number of vertices: %2
" + "Number of edges: %3
" + "Number of facets: %4

") + .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 -Nru cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h --- cgal-4.7/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include + +#include +#include + +#include +#include +#include + +#include "ui_Deform_mesh.h" + +#include +#include +#include + +#include +#include +#include +#include + + +typedef Polyhedron::Vertex_handle Vertex_handle; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::face_descriptor face_descriptor; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::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* positions) : positions(positions) {} + std::vector* 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 Deform_mesh; + + +typedef Deform_mesh::Point Point; + +/// For storing associated data with a group of control vertices +class Control_vertices_data +{ +public: + std::vector 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 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::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::iterator hb = ctrl_vertices_group.begin(); + for(std::vector::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::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::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::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& m) + { + bool any_changes = false; + for(std::set::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 positions; + mutable std::vector tris; + mutable std::vector edges; + mutable std::vector color_lines; + mutable std::vector color_bbox; + mutable std::vector ROI_points; + mutable std::vector control_points; + mutable std::vector ROI_color; + mutable std::vector control_color; + mutable std::vector normals; + mutable std::vector pos_bbox; + mutable std::vector pos_axis; + mutable std::vector pos_sphere; + mutable std::vector normals_sphere; + mutable std::vector 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 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::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::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 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 get_minimum_isolated_component() { + Travel_isolated_components::Minimum_visitor visitor; + Travel_isolated_components().travel + (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 select_isolated_components(std::size_t threshold) { + typedef boost::function_output_iterator Output_iterator; + Output_iterator out(deform_mesh); + + Travel_isolated_components::Selection_visitor visitor(threshold, out); + Travel_isolated_components().travel + (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 -Nru cgal-4.7/demo/Polyhedron/Point_inside_polyhedron_widget.ui cgal-4.8/demo/Polyhedron/Point_inside_polyhedron_widget.ui --- cgal-4.7/demo/Polyhedron/Point_inside_polyhedron_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Point_inside_polyhedron_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,95 +0,0 @@ - - - Point_inside_polyhedron - - - - 0 - 0 - 542 - 258 - - - - Point Inside Polyhedron - - - - - - - Sample Random Points from Bbox - - - - - - - Point Location - - - - - - - - Inside - - - - - - - On Boundary - - - - - - - Outside - - - - - - - - - Select - - - - - - - - 75 - true - - - - Note: - - - - - - - - - <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> - - - - - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Point_set_selection_widget.ui cgal-4.8/demo/Polyhedron/Point_set_selection_widget.ui --- cgal-4.7/demo/Polyhedron/Point_set_selection_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Point_set_selection_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ - - - PointSetSelection - - - - 0 - 0 - 369 - 239 - - - - Point Set Selection - - - - - - - - - - - Selection &Tool: - - - Selection_tool_combo_box - - - - - - - - Rectangle - - - - - Free form - - - - - - - - - - - - 6 - - - QLayout::SetDefaultConstraint - - - - - Selection &Mode: - - - Selection_mode_combo_box - - - - - - - - New Selection - - - - - Union - - - - - Intersection - - - - - Difference - - - - - - - - - - - - Select &All - - - - - - - &Clear - - - - - - - - - &Invert Selection - - - - - - - &Erase Selected Points - - - - - - - Create Point Set Item from Selected Points - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_3.cpp cgal-4.8/demo/Polyhedron/Polyhedron_3.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_3.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_3.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,91 +1,13 @@ -#include "MainWindow.h" -#include -#include -#include -#include - -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(widget)) { - QMessageBox::critical( - mw, - tr("Unhandled exception"), - e.what()); - break; - } - } - QApplication::restoreOverrideCursor(); - } catch (...) { - qFatal("Unknown exception encountered. Aborting."); - } - return false; - } -}; +#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); - app.setOrganizationDomain("geometryfactory.com"); - app.setOrganizationName("GeometryFactory"); - app.setApplicationName("Polyhedron_3 demo"); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) - app.setAttribute(Qt::AA_UseDesktopOpenGL); -#endif - - // Import resources from libCGAL (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); - } -#ifdef QT_SCRIPT_LIB - if(!args.empty() && args[0] == "--debug-scripts") - { - mainWindow.enableScriptDebugger(); - args.removeAt(0); - } - QFileInfo autostart_js("autostart.js"); - if(autostart_js.exists()) { - mainWindow.load_script(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; + Polyhedron_demo app(argc, argv, + "Polyhedron_3 demo", + "CGAL Polyhedron Demo"); + return app.try_exec(); } - -#ifndef USE_FORWARD_DECL -# include "Scene.cpp" -# include "Scene_item.cpp" -# include "Viewer.cpp" -# include "Viewer_moc.cpp" -# include "MainWindow.cpp" -# include "MainWindow_moc.cpp" -#endif diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_3.qrc cgal-4.8/demo/Polyhedron/Polyhedron_3.qrc --- cgal-4.7/demo/Polyhedron/Polyhedron_3.qrc 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_3.qrc 2016-04-04 19:00:12.000000000 +0000 @@ -12,9 +12,18 @@ resources/plus.png resources/check-off.png resources/minus.png + resources/back.png + resources/front.png + resources/top.png + resources/bot.png + resources/left.png + resources/right.png + resources/up.png + resources/down.png resources/about.html + resources/shader_c3t3.v resources/shader_with_light.v resources/shader_with_light.f resources/shader_without_light.f @@ -24,5 +33,10 @@ resources/shader_with_textured_edges.v resources/shader_with_texture.v resources/shader_instanced.v + resources/shader_no_light_no_selection.f + resources/shader_c3t3_edges.f + resources/shader_c3t3.f + resources/shader_c3t3_edges.v + resources/shader_plane_two_faces.f diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +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 -#include "Kernel_type.h" -#include "Polyhedron_type.h" -#include - -#include -#include -#include -#include -#include -#include - -#include "ui_Polyhedron_demo_advancing_front_plugin.h" - -struct Perimeter { - - double bound; - - Perimeter(double bound) - : bound(bound) - {} - - bool operator()(const Kernel::Point_3& p, const Kernel::Point_3& q, const Kernel::Point_3& r) const - { - if(bound == 0){ - return false; - } - double d = sqrt(squared_distance(p,q)); - if(d>bound) return true; - d += sqrt(squared_distance(p,r)) ; - if(d>bound) return true; - d+= sqrt(squared_distance(q,r)); - return d>bound; - } -}; - - -class Polyhedron_demo_advancing_front_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - QAction* actionAdvancingFrontReconstruction; - -public: - void init(QMainWindow* mainWindow, Scene_interface* scene_interface) { - - actionAdvancingFrontReconstruction = new QAction(tr("Advancing Front reconstruction"), mainWindow); - actionAdvancingFrontReconstruction->setObjectName("actionAdvancingFrontReconstruction"); - - Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface); - } - - //! Applicate for Point_sets with normals. - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << actionAdvancingFrontReconstruction; - } - -public Q_SLOTS: - void on_actionAdvancingFrontReconstruction_triggered(); -}; // end class Polyhedron_demo_advancing_front_plugin - - -class Polyhedron_demo_advancing_front_plugin_dialog : public QDialog, private Ui::AdvancingFrontDialog -{ - Q_OBJECT - public: - Polyhedron_demo_advancing_front_plugin_dialog(QWidget* /*parent*/ = 0) - { - setupUi(this); - - } - - double trianglePerimeter() const { return m_inputPerimeter->value(); } -}; - -void Polyhedron_demo_advancing_front_plugin::on_actionAdvancingFrontReconstruction_triggered() -{ - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* point_set_item = - qobject_cast(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_advancing_front_plugin_dialog dialog; - if(!dialog.exec()) - return; - const double sm_perimeter = dialog.trianglePerimeter(); - - - QApplication::setOverrideCursor(Qt::WaitCursor); - - // Add polyhedron to scene - - // Reconstruct point set as a polyhedron - Scene_polyhedron_item* new_item = new Scene_polyhedron_item(Polyhedron()); - Polyhedron& P = * const_cast(new_item->polyhedron()); - Perimeter filter(sm_perimeter); - CGAL::advancing_front_surface_reconstruction((points)->begin(), points->end(), P, filter); - - - new_item->setName(tr("%1 Advancing Front (%2)") - .arg(point_set_item->name()) - .arg(sm_perimeter)); - new_item->setColor(Qt::lightGray); - scene->addItem(new_item); - - // Hide point set - point_set_item->setVisible(false); - scene->itemChanged(index); - - - QApplication::restoreOverrideCursor(); - - } -} - -#include "Polyhedron_demo_advancing_front_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin_impl.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin_impl.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin_impl.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin_impl.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +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 - -#include "Kernel_type.h" -#include "Polyhedron_type.h" -#include "Scene_points_with_normal_item.h" - -#include - -Polyhedron* -advancing_front_reconstruct(const Point_set& points, - double sm_perimeter, - double sm_area) -{ - typedef CGAL::Advancing_front_surface_reconstruction Reconstruction; - typedef Reconstruction::Triangulation_3 Triangulation_3; - Polyhedron* output_mesh = new Polyhedron; - - Triangulation_3 dt(points.begin(), points.end()); - - Reconstruction reconstruction(dt); - - reconstruction(); - - CGAL::AFSR::construct_polyhedron(*output_mesh, reconstruction); - - return output_mesh; -} - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_advancing_front_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,84 +0,0 @@ - - - AdvancingFrontDialog - - - - 0 - 0 - 376 - 170 - - - - Advancing front reconstruction - - - - - - Max triangle perimeter: - - - - - - - - - - 0.000000000000000 - - - 999999999.000000000000000 - - - 0.000000000000000 - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - AdvancingFrontDialog - accept() - - - 177 - 123 - - - 53 - 125 - - - - - buttonBox - rejected() - AdvancingFrontDialog - reject() - - - 257 - 119 - - - 257 - 143 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -#include -#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 - -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) - 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 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")); - mainWindow->addDockWidget(Qt::LeftDockWidgetArea, cpl); -} - -QList -Polyhedron_demo_camera_positions_plugin::actions() const -{ - return QList(); -} - -#include "Polyhedron_demo_camera_positions_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_config.h cgal-4.8/demo/Polyhedron/Polyhedron_demo_config.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_convex_hull_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -#include -#include -#include -#include - -#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 -#include - -class Polyhedron_demo_convex_hull_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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() << "actionConvexHull"; - } - - bool applicable(QAction*) const { - return - qobject_cast(scene->item(scene->mainSelectionIndex())) || - qobject_cast(scene->item(scene->mainSelectionIndex())) || - qobject_cast(scene->item(scene->mainSelectionIndex())) || - qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* poly_item = - qobject_cast(scene->item(index)); - - Scene_points_with_normal_item* pts_item = - qobject_cast(scene->item(index)); - - Scene_polylines_item* lines_item = - qobject_cast(scene->item(index)); - - Scene_polyhedron_selection_item* selection_item = - qobject_cast(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 >::const_iterator it = lines_item->polylines.begin(); - it != lines_item->polylines.end(); - ++it) nb_points+=it->size(); - - std::vector all_points; - all_points.reserve( nb_points ); - - for(std::list >::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 "Polyhedron_demo_convex_hull_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_corefinement_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -#include -#include -#include -#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 -#include -#include -#include -#include -#include -#include - -//#define PRINT_EACH_VOLUME - -class Polyhedron_demo_corefinement_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << actionPolyhedronCorefinement_3; - } - - void init(QMainWindow* mainWindow, Scene_interface* scene_interface) { - this->scene = scene_interface; - this->mw = mainWindow; - actionPolyhedronCorefinement_3 = new QAction("Polyhedra corefinement (A/B)", mw); - 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 - 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->item(indexA)); - Scene_polyhedron_item* itemB = - qobject_cast(scene->item(indexB)); - if(!itemA || !itemB || itemA == itemB) - { - Q_FOREACH(int index, scene->selectionIndices()) { - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - if(!item) - return; - } - if(scene->selectionIndices().size() == 2) { - indexA = scene->selectionIndices()[0]; - indexB = scene->selectionIndices()[1]; - itemA = - qobject_cast(scene->item(indexA)); - itemB = - qobject_cast(scene->item(indexB)); - } - } - std::vector poly_ptrs; - Q_FOREACH(int index, scene->selectionIndices()) { - Scene_polyhedron_item* item = - qobject_cast(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 Corefinement; - Corefinement corefinement; - - typedef std::list > 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(&A)); - typedef CGAL::Node_visitor_refine_polyhedra Split_visitor; - cmap_item->m_combinatorial_map=new Combinatorial_map_3(); - Split_visitor visitor(cmap_item->m_combinatorial_map); - CGAL::Intersection_of_Polyhedra_3 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->invalidate_buffers(); - std::cout << "ok (" << time.elapsed() << " ms)" << std::endl; - - } - - QApplication::restoreOverrideCursor(); -} - -#include "Polyhedron_demo_corefinement_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,126 @@ +#include "Polyhedron_demo.h" +#include "MainWindow.h" +#include +#include +#include + +#include +#include + +struct Polyhedron_demo_impl { + bool catch_exceptions; + QScopedPointer 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(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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_cut_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,488 +0,0 @@ - -#include -#include -#include - -#include "Messages_interface.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 - -#include -#include -#include -#include -#include - -#include - -#include "Polyhedron_type.h" - -#include - -#include -#include -#include -#include "Scene_item.h" -//typedef CGAL::Simple_cartesian Epic_kernel; -typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel; - -typedef CGAL::AABB_face_graph_triangle_primitive AABB_primitive; -typedef CGAL::AABB_traits AABB_traits; -typedef CGAL::AABB_tree AABB_tree; - -class Q_DECL_EXPORT Scene_aabb_item : public Scene_item -{ - Q_OBJECT -public: - Scene_aabb_item(const AABB_tree& tree_) : Scene_item(1,1), tree(tree_) - { - positions_lines.resize(0); - } - - ~Scene_aabb_item() - { - } - - 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("

%1 (mode: %2, color: %3)
" - "AABB_tree

" - "

Number of nodes: %4

") - .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 invalidate_buffers() - { - compute_elements(); - are_buffers_filled = false; - } -public: - const AABB_tree& tree; -private: - std::vector positions_lines; - - mutable QOpenGLShaderProgram *program; - - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer)const - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[0]->bind(); - - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), - static_cast(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() - { - positions_lines.clear(); - - CGAL::AABB_drawing_traits > traits; - traits.v_edges = &positions_lines; - - tree.traversal(0, traits); - } - void draw_edges(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(positions_lines.size()/3)); - program->release(); - vaos[0]->release(); - } -}; // end class Scene_aabb_item - -class Q_DECL_EXPORT Scene_edges_item : public Scene_item -{ - Q_OBJECT -public: - Scene_edges_item():Scene_item(1,1) - { - positions_lines.resize(0); - top = true; - } - ~Scene_edges_item() - { - } - 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()); - } - void invalidate_buffers() - { - compute_elements(); - are_buffers_filled = false; - } - - Scene_edges_item* clone() const { - Scene_edges_item* item = new Scene_edges_item(); - item->edges = edges; - return item; - } - - QString toolTip() const { - return - tr("

%1 (mode: %2, color: %3)
" - "Edges

" - "

Number of edges: %4

") - .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 edges; - bool top; - -private: - std::vector positions_lines; - void timerEvent(QTimerEvent* /*event*/) - { - top = true; - } - - mutable QOpenGLShaderProgram *program; - - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer)const - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[0]->bind(); - - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), - static_cast(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() - { - 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(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(positions_lines.size()/3)); - vaos[0]->release(); - program->release(); - - } - -}; // 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) - 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->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(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(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 actions() const; - -public Q_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 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 Polyhedron_demo_cut_plugin::actions() const { - return QList() << 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(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) { - Scene_item* item = scene->item(i); - Scene_polyhedron_item* poly_item = qobject_cast(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 intersections; - it->second->all_intersections(plane, std::back_inserter(intersections)); - - for ( std::vector::iterator it = intersections.begin(), - end = intersections.end() ; it != end ; ++it ) - { - const Epic_kernel::Segment_3* inter_seg = - CGAL::object_cast(&(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->invalidate_buffers(); - scene->itemChanged(edges_item); - } - QApplication::restoreOverrideCursor(); - - edges_item->top = false; -} - -void Polyhedron_demo_cut_plugin::enableAction() { - actionCreateCutPlane->setEnabled(true); -} - -#include "Polyhedron_demo_cut_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h cgal-4.8/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_detect_sharp_edges.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,32 @@ + +#ifndef POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H +#define POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H + +#include + +namespace CGAL +{ + template + 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 + 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 detect_features; + detect_features.detect_sharp_edges(*pMesh, angle); + } + +}//end namespace CGAL + +#endif //POLYHEDRON_DEMO_DETECT_SHARP_EDGES_H diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_edit_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,399 +0,0 @@ -#include "Polyhedron_demo_plugin_helper.h" -#include "Scene_polyhedron_item.h" -#include "Scene_edit_polyhedron_item.h" - -#include -#include -#include - -#include - -#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) - 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, Scene_interface* scene_interface); - QList 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_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 Polyhedron_demo_edit_polyhedron_plugin::actions() const { - return QList() << actionDeformation; -} -bool Polyhedron_demo_edit_polyhedron_plugin::applicable(QAction*) const { - Q_FOREACH(Scene_interface::Item_id i, scene->selectionIndices()) - { - if(qobject_cast(scene->item(i)) - || qobject_cast(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(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->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->item(item_id)); - if(!edit_item) return; // the selected item is not of the right type - - edit_item->prev_ctrl_vertices_group(); - edit_item->invalidate_buffers(); - 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->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->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->invalidate_buffers(); - 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->item(item_id)); - if(!edit_item) return; // the selected item is not of the right type - - edit_item->delete_ctrl_vertices_group(); - edit_item->invalidate_buffers(); - 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->item(item_id)); - if(!edit_item) return; // the selected item is not of the right type - - edit_item->clear_roi(); - edit_item->invalidate_buffers(); - 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->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->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->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->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->item(item_id)); - if(!edit_item) return; // the selected item is not of the right type - - boost::optional 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->item(item_id)); - if(!edit_item) return; // the selected item is not of the right type - - boost::optional 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->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->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->invalidate_buffers(); - 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->item(i)); - if (poly_item) - { poly_item->update_halfedge_indices(); } - Scene_edit_polyhedron_item* edit_item = qobject_cast(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->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->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->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->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 "Polyhedron_demo_edit_polyhedron_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_fairing_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_fairing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_fairing_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_fairing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -#undef NDEBUG -#include - -#include "Messages_interface.h" -#include "Scene_polyhedron_selection_item.h" -#include "Polyhedron_demo_plugin_helper.h" -#include "ui_Fairing_widget.h" -#include "Polyhedron_type.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -class Polyhedron_demo_fairing_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -public: - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())) - || qobject_cast(scene->item(scene->mainSelectionIndex())); - } - void print_message(QString message) { messages->information(message);} - QList actions() const { return QList() << actionFairing; } - - using Polyhedron_demo_plugin_helper::init; - void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m) { - mw = mainWindow; - scene = scene_interface; - messages = m; - actionFairing = new QAction(tr("Fairing"), mw); - connect(actionFairing, SIGNAL(triggered()), this, SLOT(fairing_action())); - - dock_widget = new QDockWidget("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())); - } - -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(); - 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(*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(); - QApplication::restoreOverrideCursor(); - } - - void on_Refine_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_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 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::iterator it = new_facets.begin(); it != new_facets.end(); ++it) { - selection_item->selected_facets.insert(*it); - } - selection_item->changed_with_poly_item(); - 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 "Polyhedron_demo_fairing_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -#include -#include -#include -#include "config.h" -#include "Scene_points_with_normal_item.h" -#include "Polyhedron_demo_plugin_helper.h" -#include "Polyhedron_demo_plugin_interface.h" - -#include - -#include - -#include "ui_Polyhedron_demo_features_detection_plugin.h" - -class Polyhedron_demo_features_detection_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0") - QAction* actionDetectFeatures; -public: - QList actions() const { return QList() << actionDetectFeatures; } - void init(QMainWindow* mainWindow, 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->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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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 Covariance; - std::vector 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 "Polyhedron_demo_features_detection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_features_detection_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ - - - VCMFeaturesDetectionDialog - - - - 0 - 0 - 318 - 208 - - - - Normal estimation - - - - - - - - Offset Radius: - - - - - - - 3 - - - 0.050000000000000 - - - 0.100000000000000 - - - - - - - - - - - Convolution Radius: - - - - - - - 3 - - - 0.050000000000000 - - - - - - - - - - - Threshold: - - - - - - - 3 - - - 0.020000000000000 - - - 0.160000000000000 - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - VCMFeaturesDetectionDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - VCMFeaturesDetectionDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ -#include "Scene_polyhedron_item.h" -#include "Scene_polygon_soup_item.h" -#include "Kernel_type.h" -#include "Polyhedron_type.h" -#include -#include -#include "Polyhedron_demo_io_plugin_interface.h" -#include - -#include - - - -class Polyhedron_demo_gocad_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; - 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(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->invalidate_buffers(); - } - - - return item; -} - -bool Polyhedron_demo_gocad_plugin::canSave(const Scene_item* item) -{ - // This plugin supports polyhedrons - return qobject_cast(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(item); - - if(!poly_item) - return false; - - std::ofstream out(fileinfo.filePath().toUtf8()); - - Polyhedron* poly = const_cast(poly_item->polyhedron()); - - write_gocad(*poly, out, qPrintable(fileinfo.baseName())); - - - return true; - -} - -#include "Polyhedron_demo_gocad_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo.h cgal-4.8/demo/Polyhedron/Polyhedron_demo.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,42 @@ +#ifndef POLYHEDRON_DEMO_H +#define POLYHEDRON_DEMO_H + +#include + +#include "Polyhedron_demo_config.h" + +#include +#include + +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 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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_hole_filling_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_hole_filling_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_hole_filling_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_hole_filling_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,698 +0,0 @@ -#undef NDEBUG -#define DEBUG_TRACE -#include - -#include "Messages_interface.h" -#include "Scene_polyhedron_item.h" -#include "Scene_polylines_item.h" -#include "Scene.h" - -#include "Polyhedron_demo_plugin_helper.h" -#include "ui_Hole_filling_widget.h" -#include "Polyhedron_type.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include "Kernel_type.h" - -#include -#include - -// Class for visualizing holes in a polyhedron -// provides mouse selection functionality -class Q_DECL_EXPORT Scene_hole_visualizer : public 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_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 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(); } - Bbox bbox() const { - if(polyline_data_list.empty()) { return Bbox(); } - 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(); - } - return 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(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(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(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 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::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 -/////////////////////////////////////////////////////////////////////////////////////////////////// - -class Polyhedron_demo_hole_filling_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -public: - bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } - void print_message(QString message) { messages->information(message); } - QList actions() const { return QList() << actionHoleFilling; } - - using Polyhedron_demo_plugin_helper::init; - void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m); - - 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(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->invalidate_buffers(); - 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 visualizers; - // hold created facet for accept reject functionality - std::vector 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() ) - { 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() ) - { 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, - 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); - 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_interface)) - { connect(scene_casted, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), this, SLOT(item_about_to_be_destroyed(Scene_item*))); } -} - -void Polyhedron_demo_hole_filling_plugin::item_about_to_be_destroyed(Scene_item* scene_item) { - Scene_polyhedron_item* poly_item = qobject_cast(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_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(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); - i < end; ++i) - { - Scene_hole_visualizer* hole_visualizer = qobject_cast(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(); - 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(); - 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(); - 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(); - 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(); - 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(); - 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::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(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 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(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(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 > 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::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::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 "Polyhedron_demo_hole_filling_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_hole_filling_polyline_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_hole_filling_polyline_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_hole_filling_polyline_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_hole_filling_polyline_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -#include - -#include "Messages_interface.h" -#include "Scene_polyhedron_item.h" -#include "Scene_polylines_item.h" -#include "Scene_interface.h" - -#include "Polyhedron_demo_plugin_interface.h" -#include "Polyhedron_type.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -template -class Polyhedron_builder : public CGAL::Modifier_base { -public: - Polyhedron_builder(std::vector >* triangles, - Scene_polylines_item::Polyline* polyline) - : triangles(triangles), polyline(polyline) - { } - - void operator()(HDS& hds) { - CGAL::Polyhedron_incremental_builder_3 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 >::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 >* triangles; - Scene_polylines_item::Polyline* polyline; -}; - -class Polyhedron_demo_hole_filling_polyline_plugin : - public QObject, - public Polyhedron_demo_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -public: - bool applicable(QAction *) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } - void print_message(QString message) { messages->information(message); } - QList actions() const { return QList() << actionHoleFillingPolyline; } - void init(QMainWindow* mainWindow, 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 - void operator()(const T & /*t*/) const {} - }; - typedef boost::function_output_iterator 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->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 > patch; - CGAL::Polygon_mesh_processing::triangulate_hole_polyline(*it, std::back_inserter(patch), 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 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; - 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 "Polyhedron_demo_hole_filling_polyline_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_inside_out_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#include -#include -#include - -#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" -#include - -class Polyhedron_demo_inside_out_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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"; - } - - bool applicable(QAction*) const { - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - return qobject_cast(scene->item(index)) - || qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* poly_item = - qobject_cast(scene->item(index)); - - Scene_polygon_soup_item* soup_item = - qobject_cast(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->invalidate_buffers(); - } - else { - soup_item->inside_out(); - soup_item->invalidate_buffers(); - } - - // update scene - scene->itemChanged(index); - - // default cursor - QApplication::restoreOverrideCursor(); - } -} - -#include "Polyhedron_demo_inside_out_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_intersection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,218 +0,0 @@ -#define CGAL_USE_SEGMENT_APPROACH -#include -#ifdef CGAL_USE_SEGMENT_APPROACH -#include -#else -#include -#endif -#include -#include -#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 - -#include -#include -#include -#include -#include -#include -#include - -class Polyhedron_demo_intersection_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << actionPolyhedronIntersection_3; - } - - void init(QMainWindow* mainWindow, Scene_interface* scene_interface) { - this->scene = scene_interface; - this->mw = mainWindow; - actionPolyhedronIntersection_3 = new QAction("Intersect polyhedra (A/B)", mw); - 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 - 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->item(indexA)); - Scene_polyhedron_item* itemB = - qobject_cast(scene->item(indexB)); - if(!itemA || !itemB || itemA == itemB) - { - Q_FOREACH(int index, scene->selectionIndices()) { - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - if(!item) - return; - } - if(scene->selectionIndices().size() == 2) { - indexA = scene->selectionIndices()[0]; - indexB = scene->selectionIndices()[1]; - itemA = - qobject_cast(scene->item(indexA)); - itemB = - qobject_cast(scene->item(indexB)); - } - } -#ifndef CGAL_USE_SEGMENT_APPROACH - if(!itemA || !itemB || itemA == itemB) - return; -#else - std::vector poly_ptrs; - Q_FOREACH(int index, scene->selectionIndices()) { - Scene_polyhedron_item* item = - qobject_cast(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 Split_visitor; - - CGAL::Intersection_of_Polyhedra_3 polyline_intersections; - - typedef std::pair Pair_of_facet_handles; - typedef std::vector Polyline_info; - typedef std::vector Polylines_infos; - Polylines_infos polylines_infos; - - typedef Scene_polylines_item::Polylines_container Polylines_container; - typedef std::back_insert_iterator To_container; - typedef std::back_insert_iterator To_infos; - To_container to_container(new_item->polylines); - To_infos to_infos(polylines_infos); - CGAL::Dispatch_output_iterator< - CGAL::cpp11::tuple, - CGAL::cpp11::tuple > 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 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->invalidate_buffers(); - - QApplication::restoreOverrideCursor(); -} - -#include "Polyhedron_demo_intersection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -#include "Scene_nef_polyhedron_item.h" - -#include "Polyhedron_demo_io_plugin_interface.h" -#include - -class Polyhedron_demo_io_nef_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; - 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(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(item); - - if(!nef_item) - return false; - - std::ofstream out(fileinfo.filePath().toUtf8()); - - return (nef_item && nef_item->save(out)); -} - -#include "Polyhedron_demo_io_nef_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h cgal-4.8/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_io_plugin_interface.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -#ifndef POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H -#define POLYHEDRON_DEMO_IO_PLUGIN_INTERFACE_H - -#include -#include - -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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_jet_fitting_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include "Scene.h" -#include - -#include -#include - -class Polyhedron_demo_jet_fitting_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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"; - } - - bool applicable(QAction*) const { - return qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - Scene_polyhedron_item* poly_item = - qobject_cast(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 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 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::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->invalidate_buffers(); - min_curv->invalidate_buffers(); - - // default cursor - QApplication::restoreOverrideCursor(); -} - -#include "Polyhedron_demo_jet_fitting_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_join_and_split_polyhedra_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -#include -#include -#include -#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 -#include - -#include -#include - -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(Polyhedron_demo_plugin_interface) - QAction* actionJoinPolyhedra, *actionSplitPolyhedra, *actionColorConnectedComponents; - Messages_interface* msg_interface; -public: - QList actions() const { return QList() << actionJoinPolyhedra << actionSplitPolyhedra << actionColorConnectedComponents; } - 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"); - actionColorConnectedComponents = new QAction(tr("Color each connected component of selected polyhedra"), mainWindow); - 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->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() -{ - Scene_interface::Item_id mainSelectionIndex = -1; - Scene_polyhedron_item* mainSelectionItem = NULL; - - - QList indices_to_remove; - Q_FOREACH(int index, scene->selectionIndices()) { - if (mainSelectionIndex==-1){ - mainSelectionItem = - qobject_cast(scene->item(index)); - if(mainSelectionItem!=NULL) mainSelectionIndex=index; - continue; - } - - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - if(item) - { - indices_to_remove.push_front(index); - CGAL::Polyhedron_copy_3 - modifier( *(item->polyhedron()) ); - mainSelectionItem->polyhedron()->delegate(modifier); - } - } - - mainSelectionItem->invalidate_buffers(); - scene->itemChanged(mainSelectionIndex); - - //remove the other items - Q_FOREACH(int index, indices_to_remove) - { - scene->erase(index); - } -} - -struct Polyhedron_appender{ - Polyhedron_appender(std::list& new_polyhedra): - m_new_polyhedra(new_polyhedra) {} - void operator()(const Polyhedron& p){ - m_new_polyhedra.push_back( new Polyhedron(p) ); - } - std::list& 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->item(index)); - if(item) - { - std::list 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 - 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->item(index)); - if(item) - { - std::list new_polyhedra; - Polyhedron_cc_marker marker; - CGAL::internal::corefinement::mark_connected_components( - *item->polyhedron(), - CGAL::internal::corefinement::Dummy_true(), - marker - ); - item->invalidate_buffers(); - scene->itemChanged(item); - } - } -} - - -#include "Polyhedron_demo_join_and_split_polyhedra_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_kernel_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -#include -#include -#include -#include -#include - -#include "Scene_polyhedron_item.h" -#include "Polyhedron_type.h" - -#include "Polyhedron_demo_plugin_helper.h" -#include "Polyhedron_demo_plugin_interface.h" - -#include -#include -#include - -#include -#include - -#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) - 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->item(scene->mainSelectionIndex())); - } - -public Q_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->item(index)); - - if(item) - { - Polyhedron* pMesh = item->polyhedron(); - - typedef CGAL::Exact_integer ET; // choose exact integral type - typedef Polyhedron_kernel Polyhedron_kernel; - - // get triangles from polyhedron - std::list 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 dual_points; - std::list::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 dualizer; - dualizer.run(convex_hull,*pKernel); - ::translate(*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 "Polyhedron_demo_kernel_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/polyhedron_demo_macros.cmake cgal-4.8/demo/Polyhedron/polyhedron_demo_macros.cmake --- cgal-4.7/demo/Polyhedron/polyhedron_demo_macros.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/polyhedron_demo_macros.cmake 2016-04-04 19:00:12.000000000 +0000 @@ -1,4 +1,5 @@ include(AddFileDependencies) +include (CGAL_Macros) macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name) list_split(option ARGN_TAIL ${ARGN} ) @@ -38,5 +39,7 @@ endif() # Link with CGAL target_link_libraries( ${plugin_name} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) - add_dependencies( ${plugin_name} Polyhedron_3 ) + if(TARGET Polyhedron_3) + add_dependencies( ${plugin_name} Polyhedron_3 ) + endif() endmacro(polyhedron_demo_plugin) diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,917 +0,0 @@ -#ifdef CGAL_GLEW_ENABLED -#include // tmp hack to make sure gl.his included before glew.h -#endif - -#include "Polyhedron_demo_plugin_helper.h" -#include "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 "MainWindow.h" -#include "ui_MainWindow.h" - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef Polyhedron::Facet_iterator Facet_iterator; - -typedef CGAL::Mean_curvature_flow_skeletonization Mean_curvature_skeleton; -typedef Mean_curvature_skeleton::Skeleton Skeleton; - -typedef Polyhedron::Traits Kernel; -typedef Kernel::Point_3 Point; - -struct Polyline_visitor -{ - typedef std::vector Polyline; - typedef std::vector Polyline_of_ids; - - std::list& polylines; - Skeleton& skeleton; - - Polyline_visitor(std::list& lines, Skeleton& skeleton) - : polylines(lines), - skeleton(skeleton) - {} - - void start_new_polyline() - { - Polyline V; - polylines.push_back(V); - } - - void add_node(boost::graph_traits::vertex_descriptor vd) - { - Polyline& polyline = polylines.back(); - polyline.push_back(skeleton[vd].point); - } - - void end_polyline(){} -}; - -template -struct Facet_with_id_pmap - : public boost::put_get_helper > -{ - 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& internal_vector - ) : internal_vector(internal_vector) { } - - reference operator[](key_type key) const - { return internal_vector[key->id()]; } -private: - std::vector& internal_vector; -}; - -class Polyhedron_demo_mean_curvature_flow_skeleton_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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, Scene_interface* scene_interface) { - mcs = NULL; - dockWidget = NULL; - ui = NULL; - - actionMCFSkeleton = new QAction(tr("Mean Curvature Skeleton (Advanced)"), mainWindow); - actionMCFSkeleton->setObjectName("actionMCFSkeleton"); - - actionConvert_to_medial_skeleton = new QAction(tr("Extract Medial Skeleton"), mainWindow); - 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), SIGNAL(updated_bbox()), - this, SLOT(on_actionUpdateBBox())); - connect(ui->pushButton_segment, SIGNAL(clicked()), - this, SLOT(on_actionSegment())); - - QObject* scene_object = dynamic_cast(scene); - connect(scene_object, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), - this, SLOT(on_actionItemAboutToBeDestroyed(Scene_item*))); - } - - QList actions() const { - return QList() << actionMCFSkeleton << actionConvert_to_medial_skeleton; - } - - bool applicable(QAction*) const { - return qobject_cast(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 modifier(mcs->meso_skeleton()); - meso_skeleton->delegate(modifier); - scene->item(contractedItemIndex)->invalidate_buffers(); - 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(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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 distances(num_vertices(*input_triangle_mesh)); - BOOST_FOREACH(boost::graph_traits::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 sdf_values( num_faces(*input_triangle_mesh) ); - Facet_with_id_pmap 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 segment_ids( num_faces(*input_triangle_mesh) ); - Facet_with_id_pmap 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(segment_ids[i++] )); - } - - scene->item(InputMeshItemIndex)->setVisible(false); - Scene_polyhedron_item* item_segmentation = new Scene_polyhedron_item(segmented_polyhedron); - 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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::IsTerminalDefault() ); - - skeleton_item->setName(QString("Medial skeleton curve of %1").arg(item->name())); - scene->addItem(skeleton_item); - skeleton_item->invalidate_buffers(); - - item->setPointsMode(); - - QApplication::restoreOverrideCursor(); - } -} - -void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionContract() -{ - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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 fixedPoints; - mcs->fixed_points(fixedPoints); - - Point_set *ps = fixedPointsItem->point_set(); - for (size_t i = 0; i < fixedPoints.size(); ++i) - { - UI_point_3 point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z()); - ps->select(&point); - ps->push_back(point); - } - - 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)->invalidate_buffers(); - scene->itemChanged(fixedPointsItemIndex); - scene->setSelectedItem(index); - QApplication::restoreOverrideCursor(); -} - -void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionRun() -{ - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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; - - Scene_interface::Item_id contracted_item_index = scene->mainSelectionIndex(); - Scene_polyhedron_item* contracted_item = - qobject_cast(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 fixedPoints; - mcs->fixed_points(fixedPoints); - - Point_set *ps = fixedPointsItem->point_set(); - for (size_t i = 0; i < fixedPoints.size(); ++i) - { - UI_point_3 point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z()); - ps->select(&point); - ps->push_back(point); - } - - 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 nonFixedPoints; - mcs->non_fixed_points(nonFixedPoints); - ps = nonFixedPointsItem->point_set(); - for (size_t i = 0; i < nonFixedPoints.size(); ++i) - { - UI_point_3 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 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 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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::IsTerminalDefault() ); - - skeleton->setName(QString("skeleton curve of %1").arg(item->name())); - scene->addItem(skeleton); - skeleton->invalidate_buffers(); - - // 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - if (!check_item_index(index)) - { - return; - } - - Scene_polyhedron_item* item = - qobject_cast(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 fixedPoints; - mcs->fixed_points(fixedPoints); - - Point_set *ps = fixedPointsItem->point_set(); - for (size_t i = 0; i < fixedPoints.size(); ++i) - { - UI_point_3 point(fixedPoints[i].x(), fixedPoints[i].y(), fixedPoints[i].z()); - ps->select(&point); - ps->push_back(point); - } - if (fixedPointsItemIndex == -1) - { - fixedPointsItemIndex = scene->addItem(fixedPointsItem); - } - else - { - Scene_item* temp = scene->replaceItem(fixedPointsItemIndex, fixedPointsItem, false); - delete temp; - } - - scene->item(fixedPointsItemIndex)->invalidate_buffers(); - scene->itemChanged(fixedPointsItemIndex); - update_meso_skeleton(); - scene->setSelectedItem(index); - - QApplication::restoreOverrideCursor(); -} - -void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionItemAboutToBeDestroyed(Scene_item* /* item */) -{ - if (mcs != NULL) - { - delete mcs; - mcs = NULL; - } -} - -#include "Polyhedron_demo_mean_curvature_flow_skeleton_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin_cgal_code.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,671 +0,0 @@ -#include -#include - -#include "Polyhedron_type.h" - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include - -#include - -typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; - -// Triangulation -typedef CGAL::Mesh_triangulation_3::type Tr; - -// 3D complex -typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; - -// Mesh Criteria -typedef CGAL::Mesh_criteria_3 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 -#include -#include -#include - - -class Q_DECL_EXPORT Scene_c3t3_item : public Scene_item -{ - Q_OBJECT -public: - typedef qglviewer::ManipulatedFrame ManipulatedFrame; - - Scene_c3t3_item(const C3t3& c3t3) - : Scene_item(7,3), c3t3_(c3t3), frame(new ManipulatedFrame()), last_known_scene(NULL) - { - positions_lines.resize(0); - positions_poly.resize(0); - color_lines.resize(0); - color_poly.resize(0); - color_grid.resize(0); - normals.resize(0); - //Generates an integer which will be used as ID for each buffer - } - - ~Scene_c3t3_item() - { - delete frame; - } - - void invalidate_buffers() - { - compute_elements(); - are_buffers_filled = false; - } - - void contextual_changed() - { - if(frame->isManipulated()||frame->isSpinning()) - invalidate_buffers(); - } - 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("

3D complex in a 3D triangulation

" - "

Number of vertices: %1
" - "Number of surface facets: %2
" - "Number of volume tetrahedra: %3

") - .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(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(); - viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(positions_poly.size()/3)); - program->release(); - vaos[0]->release(); - - - } - void draw_edges(Viewer_interface* viewer) const { - if(!are_buffers_filled) - initialize_buffers(viewer); - vaos[2]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program->bind(); - 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(positions_grid.size()/3)); - program->release(); - vaos[2]->release(); - - vaos[1]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program->bind(); - viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines.size()/3)); - program->release(); - vaos[1]->release(); - - } - void draw_points(Viewer_interface * viewer) const - { - if(!are_buffers_filled) - initialize_buffers(viewer); - vaos[1]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program->bind(); - viewer->glDrawArrays(GL_POINTS, 0, static_cast(positions_lines.size()/3)); - vaos[1]->release(); - program->release(); - - vaos[2]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program->bind(); - 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(positions_grid.size()/3)); - program->release(); - vaos[2]->release(); - } -private: - void draw_triangle(const Kernel::Point_3& pa, - const Kernel::Point_3& pb, - const Kernel::Point_3& pc, bool is_cut) { - -#undef darker - Kernel::Vector_3 n = cross_product(pb - pa, pc - pa); - n = n / CGAL::sqrt(n*n); - -if(!is_cut) -{ - for(int i=0; i<3; i++) - { - - color_poly.push_back(this->color().redF()); - color_poly.push_back(this->color().greenF()); - color_poly.push_back(this->color().blueF()); - } -} -else -{ - for(int i=0; i<3; i++) - { - color_poly.push_back(this->color().darker(150).redF()); - color_poly.push_back(this->color().darker(150).greenF()); - color_poly.push_back(this->color().darker(150).blueF()); - } -} - 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 draw_triangle_edges(const Kernel::Point_3& pa, - const Kernel::Point_3& pb, - const Kernel::Point_3& pc) { - -#undef darker - Kernel::Vector_3 n = cross_product(pb - pa, pc - pa); - n = n / CGAL::sqrt(n*n); - for(int i=0; i<6; i++) - { - color_lines.push_back(0.0); - color_lines.push_back(0.0); - color_lines.push_back(0.0); - } - 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 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 Q_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.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.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())); - } - return menu; - } - - void set_scene(Scene_interface* scene){ last_known_scene=scene; } - -private: - C3t3 c3t3_; - qglviewer::ManipulatedFrame* frame; - Scene_interface* last_known_scene; - - - std::vector positions_lines; - std::vector positions_grid; - std::vector positions_poly; - std::vector normals; - std::vector color_lines; - std::vector color_poly; - std::vector color_grid; - - mutable QOpenGLShaderProgram *program; - - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer)const - { - //vao containing the data for the facets - { - program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer); - program->bind(); - - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_poly.data(), - static_cast(positions_poly.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(normals.size()*sizeof(float))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[1].release(); - - buffers[2].bind(); - buffers[2].allocate(color_poly.data(), - static_cast(color_poly.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[2].release(); - vaos[0]->release(); - program->release(); - - } - - //vao containing the data for the lines - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - - vaos[1]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_lines.data(), - static_cast(positions_lines.size()*sizeof(float))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[3].release(); - - buffers[4].bind(); - buffers[4].allocate(color_lines.data(), - static_cast(color_lines.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[4].release(); - vaos[1]->release(); - program->release(); - - } - - //vao containing the data for the grid - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - - vaos[2]->bind(); - buffers[5].bind(); - buffers[5].allocate(positions_grid.data(), - static_cast(positions_grid.size()*sizeof(float))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[5].release(); - - buffers[6].bind(); - buffers[6].allocate(color_grid.data(), - static_cast(color_grid.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[6].release(); - vaos[2]->release(); - program->release(); - } - are_buffers_filled = true; - } - void compute_elements() - { - positions_lines.clear(); - positions_poly.clear(); - color_lines.clear(); - color_grid.clear(); - color_poly.clear(); - normals.clear(); - - //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); - } - float colors[3]; - colors[0] = this->color().redF(); - colors[1] = this->color().greenF(); - colors[2] = this->color().blueF(); - - for(int i=0; i< 132; i++) - { - color_grid.push_back(colors[i%3]); - } - } - - //The facets - { - if(isEmpty()) - return; - - 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(); - - - - 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); - bool is_showned = false; - if(pa.x() * clip_plane[0] + pa.y() * clip_plane[1] + pa.z() * clip_plane[2] + clip_plane[3] > 0 - && pb.x() * clip_plane[0] + pb.y() * clip_plane[1] + pb.z() * clip_plane[2] + clip_plane[3] > 0 - && pc.x() * clip_plane[0] + pc.y() * clip_plane[1] + pc.z() * clip_plane[2] + clip_plane[3] > 0) - is_showned = true; - - if(is_showned && sa != ON_ORIENTED_BOUNDARY && - sb != ON_ORIENTED_BOUNDARY && - sc != ON_ORIENTED_BOUNDARY && - sb == sa && sc == sa ) - { - 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); - } - - } - - - 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(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(pa,pb,pc); - draw_triangle_edges(pa,pb,pd); - draw_triangle_edges(pa,pc,pd); - draw_triangle_edges(pb,pc,pd); - } - } - } - } - -}; - -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(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 "Polyhedron_demo_mesh_3_plugin_cgal_code.moc" -//#include "Scene_c3t3_item.moc" //Check this one, it's strange moc include. - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_3_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,190 +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 -#include -#include -#include -#include -#include "Scene_polyhedron_item.h" -#include -#include -#include -#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) - 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; - actionMesh_3 = new QAction("Create a tetrahedral mesh", mw); - if(actionMesh_3) { - connect(actionMesh_3, SIGNAL(triggered()), - this, SLOT(mesh_3())); - } - } - - QList actions() const { - return QList() << actionMesh_3; - } - - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - -public Q_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->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): %1, %2, %3") - .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(); -} - -#include "Polyhedron_demo_mesh_3_plugin.moc" - -#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_segmentation_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,359 +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 -#include -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include -#include - - -template -struct Polyhedron_with_id_to_vector_property_map - : public boost::put_get_helper > -{ -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* internal_vector) - : internal_vector(internal_vector) { } - - reference operator[](key_type key) const { return (*internal_vector)[key->id()]; } -private: - std::vector* internal_vector; -}; - -class Polyhedron_demo_mesh_segmentation_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -private: - typedef std::map > Item_sdf_map; -public: - - QList actions() const { - return QList() << actionSegmentation; - } - - bool applicable(QAction*) const { - return - qobject_cast(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_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 - void colorize_sdf(Scene_polyhedron_item* item, SDFPropertyMap sdf_values, std::vector& color_vector); - template - void colorize_segmentation(Scene_polyhedron_item* item, SegmentPropertyMap segment_ids, std::vector& 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(Scene_item*); -private: - QAction* actionSegmentation; - QDockWidget* dock_widget; - Ui::Mesh_segmentation ui_widget; - - std::vector color_map_sdf; - std::vector color_map_segmentation; - Item_sdf_map item_sdf_map; -}; - -void Polyhedron_demo_mesh_segmentation_plugin::init_color_map_sdf() -{ - color_map_sdf = std::vector(256); - int r = 0, g = 0, b = 255; - for(int i = 0; i <= 255; ++i) - { - if(i > 128 && i <= 192) { r = static_cast( ((i - 128) / (192.0 - 128)) * 255 ); } - if(i > 0 && i <= 98) { g = static_cast( ((i) / (98.0)) * 255 ); } - if(i > 191 && i <=255) { g = 255 - static_cast( ((i - 191) / (255.0 - 191)) * 255 ); } - if(i > 64 && i <= 127) { b = 255 - static_cast( ((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_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->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()) ).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 sdf_pmap(&pair->second); - QTime time; - time.start(); - std::pair 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->invalidate_buffers(); - 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->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& sdf_data = it == item_sdf_map.end() ? - std::vector() : it->second; - pair = item_sdf_map.insert(std::make_pair(new_item, sdf_data) ).first; - } - else - { - std::pair res = - item_sdf_map.insert(std::make_pair(item, std::vector()) ); - 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 sdf_pmap(&pair->second); - sdf_values(*(pair->first->polyhedron()), sdf_pmap, cone_angle, number_of_rays); - } - - std::vector internal_segment_map(pair->first->polyhedron()->size_of_facets()); - Polyhedron_with_id_to_vector_property_map segment_pmap(&internal_segment_map); - Polyhedron_with_id_to_vector_property_map 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->invalidate_buffers(); - 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 -void Polyhedron_demo_mesh_segmentation_plugin::colorize_sdf( - Scene_polyhedron_item* item, - SDFPropertyMap sdf_values, - std::vector& 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(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(patch_id)); - } -} - -template -void Polyhedron_demo_mesh_segmentation_plugin::colorize_segmentation( - Scene_polyhedron_item* item, - SegmentPropertyMap segment_ids, - std::vector& 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(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 "Polyhedron_demo_mesh_segmentation_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_mesh_simplification_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#include "Polyhedron_demo_plugin_helper.h" -#include "Polyhedron_demo_plugin_interface.h" - -#include "Scene_polyhedron_item.h" -#include "Polyhedron_type.h" - -#include -#include -#include -#include - -#include -#include -#include - -class Polyhedron_demo_mesh_simplification_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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"; - } - - bool applicable(QAction*) const { - return qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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->invalidate_buffers(); - scene->itemChanged(index); - QApplication::restoreOverrideCursor(); - } -} - -#include "Polyhedron_demo_mesh_simplification_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_nef_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,292 +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 -#include -#include -#include -#include -#include -#include - -class Polyhedron_demo_nef_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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"; - } - - bool applicable(QAction*) const { - const int indexA = scene->selectionAindex(); - const int indexB = scene->selectionBindex(); - - return qobject_cast(scene->item(scene->mainSelectionIndex())) - || qobject_cast(scene->item(scene->mainSelectionIndex())) - || qobject_cast(scene->item(indexA)) - || qobject_cast(scene->item(indexB)) - || qobject_cast(scene->item(indexA)) - || qobject_cast(scene->item(indexB)) - ; - } - -// QList 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() << 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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->item(index)); - - Scene_nef_polyhedron_item* item = - (pitem)? Scene_nef_polyhedron_item::from_polyhedron(pitem) - : qobject_cast(scene->item(index)); - - if(item) { - QTime time; - time.start(); - std::cerr << "Convex decomposition..."; - - QApplication::setOverrideCursor(Qt::WaitCursor); - - std::list convex_parts; - item->convex_decomposition(convex_parts); - int i = 0; - for(std::list::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->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->item(indexA)) || - qobject_cast(scene->item(indexB))) { - QMenu* menu = mw->findChild("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->item(indexA)); - Scene_nef_polyhedron_item* itemB = - qobject_cast(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 "Polyhedron_demo_nef_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,227 +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 -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - 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 actions() const { - return QList() << actionNormalEstimation << actionNormalInversion; - } - - bool applicable(QAction* action) const { - Scene_points_with_normal_item* item = qobject_cast(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); - } - - 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->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->invalidate_buffers(); - scene->itemChanged(item); - } -} - -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->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 - item->invalidate_buffers(); - 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 -} - -#include "Polyhedron_demo_normal_estimation_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_normal_estimation_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ - - NormalEstimationDialog - - - - 0 - 0 - 311 - 120 - - - - Normal estimation - - - - - - Direction: - - - - - - - - quadric - - - - - plane - - - - - - - - neighbors - - - 6 - - - 9999 - - - 18 - - - - - - - Orientation: - - - - - - - - MST - - - - - - - - neighbors - - - 6 - - - 9999 - - - 18 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - NormalEstimationDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - NormalEstimationDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp 2015-10-07 13:02:59.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +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 - -#include -#include -#include - -class Polyhedron_demo_off_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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)"; } - 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; - } - - // 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.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; - } - else - if( total_nb_of_vertices!= item->polyhedron()->size_of_vertices()) - { - QApplication::restoreOverrideCursor(); - QMessageBox::warning((QWidget*)NULL, - tr("Isolated vertices found"), - tr("%1 isolated vertices ignored") - .arg(total_nb_of_vertices-item->polyhedron()->size_of_vertices())); - } - - return item; -} - -bool Polyhedron_demo_off_plugin::canSave(const Scene_item* item) -{ - // This plugin supports polyhedrons and polygon soups - return qobject_cast(item) || - qobject_cast(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(item); - const Scene_polygon_soup_item* soup_item = - qobject_cast(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 "Polyhedron_demo_off_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -#include "Scene_nef_polyhedron_item.h" -#include "Nef_type.h" - -#include "Polyhedron_demo_io_plugin_interface.h" -#include - -class Polyhedron_demo_off_to_nef_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; - 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 "Polyhedron_demo_off_to_nef_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -#include "Scene_points_with_normal_item.h" -#include "Polyhedron_type.h" -#include "Polyhedron_demo_io_plugin_interface.h" - -#include - -#include - -class Polyhedron_demo_off_to_xyz_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; - 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 "Polyhedron_demo_off_to_xyz_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -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->item(index))) - return true; - else - if (action==actionShuffle && - qobject_cast(scene->item(index))) - return true; - } - return false; - } - - QList actions() const; - -public Q_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 Polyhedron_demo_orient_soup_plugin::actions() const { - return QList() << 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->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->invalidate_buffers(); - poly_item->setProperty("source filename", item->property("source filename")); - scene->replaceItem(index, poly_item); - delete item; - } else { - item->invalidate_buffers(); - 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->item(index)); - - if(item) { - item->shuffle_orientations(); - //scene->itemChanged(item); - } - else { - Scene_polyhedron_item* poly_item = - qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polygon_soup_item* item = - qobject_cast(scene->item(index)); - - if(item) - { - item->setDisplayNonManifoldEdges(!item->displayNonManifoldEdges()); - scene->itemChanged(item); - } -} - -#include "Polyhedron_demo_orient_soup_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_parameterization_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,151 +0,0 @@ -#include -#include -#include - -#include "Scene_polyhedron_item.h" -#include "Scene_textured_polyhedron_item.h" -#include "Textured_polyhedron_type.h" -#include "Polyhedron_type.h" - -#include - -#include -#include -#include -#include - -#include - -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - // used by Polyhedron_demo_plugin_helper - QStringList actionsNames() const { - return QStringList() << "actionMVC" - << "actionDCP"; - } - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - -public Q_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->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 Adaptor; - Adaptor adaptor(*pMesh); - - bool success = false; - switch(method) - { - case PARAM_MVC: - { - std::cout << "Parameterize (MVC)..."; - typedef CGAL::Mean_value_coordinates_parameterizer_3 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 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 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); -} - -#include "Polyhedron_demo_parameterization_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_pca_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,211 +0,0 @@ -#include -#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 -#include -#include - - -#include // output for plane fitting -#include // 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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - // used by Polyhedron_demo_plugin_helper - QStringList actionsNames() const { - return QStringList() << "actionFitPlane" - << "actionFitLine"; - } - - bool applicable(QAction*) const { - return qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - - if(item) - { - Polyhedron* pMesh = item->polyhedron(); - - // get triangles from the mesh - std::list 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 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::iterator Iterator; -// Make_quad_soup 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->item(index)); - - if(item) - { - Polyhedron* pMesh = item->polyhedron(); - - // get triangles from the mesh - std::list 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 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 "Polyhedron_demo_pca_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,4 +1,4 @@ -#include "Polyhedron_demo_plugin_helper.h" +#include #include #include #include @@ -8,6 +8,7 @@ #include #include +using namespace CGAL::Three; QAction* Polyhedron_demo_plugin_helper:: getActionFromMainWindow(QMainWindow* mw, @@ -27,7 +28,7 @@ init(QMainWindow* mainWindow, Scene_interface* scene_interface) { mw = mainWindow; scene = scene_interface; - Q_FOREACH(QString actionName, actionsNames()) + Q_FOREACH(QString actionName,actionsNames()) { actions_map[actionName] = getActionFromMainWindow(mw, actionName); } @@ -114,12 +115,12 @@ void Polyhedron_demo_plugin_helper::add_dock_widget(QDockWidget* dock_widget) { - mw->addDockWidget(Qt::LeftDockWidgetArea, dock_widget); + mw->addDockWidget(::Qt::LeftDockWidgetArea, dock_widget); QList dockWidgets = mw->findChildren(); int counter = 0; Q_FOREACH(QDockWidget* dock, dockWidgets) { - if( mw->dockWidgetArea(dock) != Qt::LeftDockWidgetArea || + if( mw->dockWidgetArea(dock) != ::Qt::LeftDockWidgetArea || dock == dock_widget ) { continue; } diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_helper.h cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_helper.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_helper.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#ifndef POLYHEDRON_DEMO_OPERATION_HELPER_H -#define POLYHEDRON_DEMO_OPERATION_HELPER_H - -#include "Scene_item_config.h" //defines SCENE_ITEM_EXPORT - -#include -#include -#include - -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 actions() const; - - // To get a selected item with the type of SceneType - template - SceneType* get_selected_item() const { - int item_id = scene->mainSelectionIndex(); - SceneType* scene_item = qobject_cast(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(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); i < end && counter < 2; ++i) { - if(SceneType* tmp = qobject_cast(scene->item(i))) { - scene_item = tmp; - counter++; - last_selected=i; - } - } - if(counter != 1) { return NULL; } - scene->setSelectedItem(last_selected); - } - return scene_item; - } - - void add_dock_widget(QDockWidget* dock); - - // Auto-connect actions to slots. Called by init(). - void autoConnectActions(); - -protected: - QMap actions_map; - Scene_interface* scene; - QMainWindow* mw; -}; - -#endif // POLYHEDRON_DEMO_OPERATION_HELPER_H diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_interface.h cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_interface.h --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_plugin_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_plugin_interface.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -#ifndef POLYHEDRON_DEMO_PLUGIN_INTERFACE_H -#define POLYHEDRON_DEMO_PLUGIN_INTERFACE_H - -#include -#include -#include - -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 actions() const = 0; -}; - -Q_DECLARE_INTERFACE(Polyhedron_demo_plugin_interface, - "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -#endif // POLYHEDRON_DEMO_PLUGIN_INTERFACE_H diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_inside_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,248 +0,0 @@ -#include -#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_helper.h" -#include "Polyhedron_type.h" - -#include -#include -#include -#include "ui_Point_inside_polyhedron_widget.h" - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -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(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(Scene_interface::Item_id i = 0, end = scene->numberOfEntries(); - i < end && (!poly_item_exists || !point_item_exists); ++i) - { - poly_item_exists |= qobject_cast(scene->item(i)) != NULL; - point_item_exists |= qobject_cast(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 actions() const { return QList() << actionPointInsidePolyhedron; } - - using Polyhedron_demo_plugin_helper::init; - 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.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())); - - } -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 polys; - typedef CGAL::Side_of_triangle_mesh Point_inside; - std::vector inside_testers;// to put all polyhedra to query object - // it does not support copy-construction so let's use pointers - std::vector point_sets; - Q_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) { - Scene_polyhedron_item* poly_item = qobject_cast(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->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::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(); - - 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::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) - { - 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; - 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(Scene_interface::Item_id id, scene->selectionIndices()) { - Scene_points_with_normal_item* point_item = qobject_cast(scene->item(id)); - if(point_item) { - point_item->invalidate_buffers(); - scene->itemChanged(point_item); - } - } - } - - void on_Sample_random_points_from_bbox() { - - // calculate bbox of selected polyhedron items - boost::optional 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 - - Q_FOREACH(Scene_interface::Item_id id, scene->selectionIndices()) { - Scene_polyhedron_item* poly_item = qobject_cast(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 "Polyhedron_demo_point_inside_polyhedron_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_average_spacing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -class Polyhedron_demo_point_set_average_spacing_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -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 actions() const { - return QList() << actionAverageSpacing; - } - - //! Applicable if the currently selected item is a - //! points_with_normal_item. - bool applicable(QAction*) const { - return qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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( - 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 "Polyhedron_demo_point_set_average_spacing_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +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 -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "ui_Polyhedron_demo_point_set_bilateral_smoothing_plugin.h" - -class Polyhedron_demo_point_set_bilateral_smoothing_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - QAction* actionBilateralSmoothing; - -public: - void init(QMainWindow* mainWindow, 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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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 - (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->invalidate_buffers(); - scene->itemChanged(index); - - QApplication::restoreOverrideCursor(); - - } -} - -#include "Polyhedron_demo_point_set_bilateral_smoothing_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_bilateral_smoothing_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +0,0 @@ - - - PointSetBilateralSmoothingDialog - - - - 0 - 0 - 357 - 141 - - - - Bilateral smoothing - - - - - - Iterations - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Neighborhood size - - - - - - - 1 - - - 2147483647 - - - 1 - - - - - - - - - - - - - 1 - - - 2147483647 - - - 24 - - - - - - - ° - - - 90 - - - 25 - - - - - - - Sharpness Angle - - - - - - - - - buttonBox - accepted() - PointSetBilateralSmoothingDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - PointSetBilateralSmoothingDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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(), first_point_to_remove, false); - points->select(first_point_to_remove, points->end(), true); - - // Updates scene - item->invalidate_buffers(); - scene->itemChanged(index); - - QApplication::restoreOverrideCursor(); - } -} - -#include "Polyhedron_demo_point_set_outliers_removal_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_outliers_removal_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ - - OutlierRemovalDialog - - - - 0 - 0 - 331 - 120 - - - - Outlier Removal - - - - - - Removed percentage: - - - - - - - % - - - 0.010000000000000 - - - 100.000000000000000 - - - 0.100000000000000 - - - 5.000000000000000 - - - - - - - Neighbors - - - - - - - 6 - - - 9999 - - - 24 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - OutlierRemovalDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - OutlierRemovalDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_selection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_selection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_selection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_selection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,475 +0,0 @@ -#include -#include -#include -#include -#include -#include "opengl_tools.h" - -#include "Messages_interface.h" -#include "Scene_points_with_normal_item.h" -#include "Scene_polylines_item.h" - -#include "Scene_interface.h" -#include "Polyhedron_demo_plugin_helper.h" -#include "ui_Point_set_selection_widget.h" -#include "Point_set_3.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include - - -// Class for visualizing selection -// provides mouse selection functionality -class Q_DECL_EXPORT Scene_point_set_selection_visualizer : public 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 Polygon_2; - - bool rectangle; - std::vector 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(); } - Bbox bbox() const { - return 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(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 -/////////////////////////////////////////////////////////////////////////////////////////////////// - - -class Polyhedron_demo_point_set_selection_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -public: - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - void print_message(QString message) { messages->information(message); } - QList actions() const { return QList() << actionPointSetSelection; } - using Polyhedron_demo_plugin_helper::init; - void init(QMainWindow* mainWindow, 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); - - - } - - -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->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(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(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(); - if(!point_set_item) - { - print_message("Error: no point set selected!"); - return; - } - - if (selection_mode == 0) // New selection - { - for(Point_set::iterator it = point_set_item->point_set()->begin (); - it != point_set_item->point_set()->end(); ++ it) - point_set_item->point_set()->select(&*it,false); - } - - QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin(); - qglviewer::Camera* camera = viewer->camera(); - - for(Point_set::iterator it = point_set_item->point_set()->begin (); - it != point_set_item->point_set()->end(); ++ it) - { - bool already_selected = it->is_selected (); - - qglviewer::Vec vp (it->x (), it->y (), it->z ()); - qglviewer::Vec vsp = camera->projectedCoordinatesOf (vp); - - bool now_selected = visualizer->is_selected (vsp); - - // NEW INTERSECTION or UNION - // * Select point if it is now selected - if (selection_mode < 2 && now_selected) - point_set_item->point_set()->select(&*it,true); - // INTERSECTION - // * Unselect point if it was selected and is not anymore - else if (selection_mode == 2) - { - if (already_selected && !now_selected) - point_set_item->point_set()->select(&*it,false); - } - // DIFFERENCE - // * Unselect point if it was selected and is now selected - else if (selection_mode == 3) - { - if (already_selected && now_selected) - point_set_item->point_set()->select(&*it,false); - } - - } - - point_set_item->invalidate_buffers(); - } - - - - -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(); - 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->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->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->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->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 Point_set; - for(Point_set::iterator it = point_set_item->point_set()->begin (); - it != point_set_item->point_set()->end(); ++ it) { - if (it->is_selected ()) - new_item->point_set()->push_back(*it); - } - new_item->resetSelection(); - new_item->invalidate_buffers(); - - 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 "Polyhedron_demo_point_set_selection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,220 +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 - -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include "ui_Polyhedron_demo_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 Point_with_normal; -//typedef std::vector Point_list; -//typedef CGAL::Identity_property_map PointPMap; -//typedef CGAL::Normal_of_point_with_normal_pmap NormalPMap; - -class Polyhedron_demo_point_set_shape_detection_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - QAction* actionDetect; - -public: - void init(QMainWindow* mainWindow, 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->item(scene->mainSelectionIndex())); - if (item && item->has_normals()) - return true; - return false; - } - - QList actions() const { - return QList() << actionDetect; - } - - public Q_SLOTS: - void on_actionDetect_triggered(); - -}; // 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(); } -}; - -void Polyhedron_demo_point_set_shape_detection_plugin::on_actionDetect_triggered() { - CGAL::Random rand(time(0)); - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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 PointPMap; - typedef CGAL::Normal_of_point_with_normal_pmap NormalPMap; - - typedef CGAL::Shape_detection_3::Efficient_RANSAC_traits Traits; - typedef CGAL::Shape_detection_3::Efficient_RANSAC 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 >(); - } - if(dialog.detect_cylinder()){ - shape_detection.add_shape_factory >(); - } - if(dialog.detect_torus()){ - shape_detection.add_shape_factory< CGAL::Shape_detection_3::Torus >(); - } - if(dialog.detect_cone()){ - shape_detection.add_shape_factory< CGAL::Shape_detection_3::Cone >(); - } - if(dialog.detect_sphere()){ - shape_detection.add_shape_factory< CGAL::Shape_detection_3::Sphere >(); - } - - // 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, shape_detection.shapes()) - { - CGAL::Shape_detection_3::Cylinder *cyl; - cyl = dynamic_cast *>(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(64 + rand.get_int(0, 192)); - g = static_cast(64 + rand.get_int(0, 192)); - b = static_cast(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 *>(shape.get())){ - CGAL::Shape_detection_3::Cylinder * cyl - = dynamic_cast *>(shape.get()); - ss << item->name().toStdString() << "_cylinder_" << cyl->radius() << "_"; - } - else if (dynamic_cast *>(shape.get())) - ss << item->name().toStdString() << "_plane_"; - else if (dynamic_cast *>(shape.get())) - ss << item->name().toStdString() << "_cone_"; - else if (dynamic_cast *>(shape.get())) - ss << item->name().toStdString() << "_torus_"; - else if (dynamic_cast *>(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()); - scene->addItem(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); - } -} - -#include - -#include "Polyhedron_demo_point_set_shape_detection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_shape_detection_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,247 +0,0 @@ - - - PointSetShapeDetectionDialog - - - - 0 - 0 - 444 - 205 - - - - Shape Detection - - - - - - - - Plane - - - true - - - - - - - Cylinder - - - true - - - - - - - Torus - - - - - - - Cone - - - - - - - Sphere - - - - - - - - - - - Epsilon: - - - - - - - Fitting tolerance in Euclidean distance - - - 3 - - - 1.000000000000000 - - - 0.001000000000000 - - - 0.002000000000000 - - - - - - - - - - - Normal tolerance: - - - - - - - Normal angle deviation tolerance as cosine of the angle - - - 0.001000000000000 - - - 0.900000000000000 - - - - - - - - - - - minimum no. of points: - - - - - - - Smallest allowed size for a primitive - - - 10000 - - - 50 - - - 100 - - - - - - - - - - - Connectivity epsilon: - - - - - - - Maximum world distance between points on a shape to be considered as connected - - - 2 - - - 1.000000000000000 - - - 0.010000000000000 - - - 0.020000000000000 - - - - - - - - - - - Search rigorosity (probability): - - - - - - - Probability to overlook the largest primitive in one extraction iteration - - - 1.000000000000000 - - - 0.010000000000000 - - - 0.050000000000000 - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - PointSetShapeDetectionDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - PointSetShapeDetectionDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +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 -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - 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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << 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); - } - - 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->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(), first_point_to_remove, false); - points->select(first_point_to_remove, points->end(), true); - - // Updates scene - item->invalidate_buffers(); - 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 "Polyhedron_demo_point_set_simplification_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ - - PointSetSimplificationDialog - - - - 0 - 0 - 403 - 153 - - - - Simplification - - - - - - Method: - - - - - - - - Random - - - - - Grid Clustering - - - - - - - - Points to Remove Randomly - - - - - - - % - - - 2 - - - 0.100000000000000 - - - 100.000000000000000 - - - 0.100000000000000 - - - 50.000000000000000 - - - - - - - Grid Cell Size - - - - - - - * average spacing - - - 2 - - - 0.100000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - PointSetSimplificationDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - PointSetSimplificationDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +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 -#include -#include -#include -#include -#include - -#include - -class Polyhedron_demo_point_set_smoothing_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - 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 actions() const { - return QList() << actionJetSmoothing; - } - - bool applicable(QAction*) const { - return qobject_cast(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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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(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->invalidate_buffers(); - scene->itemChanged(index); - - QApplication::restoreOverrideCursor(); - } -} - -#include "Polyhedron_demo_point_set_smoothing_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,139 +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 -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "ui_Polyhedron_demo_point_set_upsampling_plugin.h" - -class Polyhedron_demo_point_set_upsampling_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - QAction* actionEdgeAwareUpsampling; - -public: - void init(QMainWindow* mainWindow, 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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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(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( - points->begin(), points->end(), - 6 /* knn = 1 ring */); - - std::vector > new_points; - CGAL::edge_aware_upsample_point_set(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->invalidate_buffers(); - scene->itemChanged(index); - - QApplication::restoreOverrideCursor(); - - } -} - -#include "Polyhedron_demo_point_set_upsampling_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_upsampling_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ - - - PointSetUpsamplingDialog - - - - 0 - 0 - 443 - 175 - - - - Edge Aware Upsampling - - - - - - Sharpness Angle - - - - - - - Neighborhood Radius - - - - - - - Edge Sensitivity - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Output Size - - - - - - - 1.000000000000000 - - - 0.010000000000000 - - - - - - - - - - * input size - - - 1.000000000000000 - - - 1000.000000000000000 - - - 4.000000000000000 - - - - - - - ° - - - 90 - - - 25 - - - - - - - * average spacing - - - 2 - - - 0.100000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 3.000000000000000 - - - - - - - - - buttonBox - accepted() - PointSetUpsamplingDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - PointSetUpsamplingDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +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 -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "ui_Polyhedron_demo_point_set_wlop_plugin.h" - -class Polyhedron_demo_point_set_wlop_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - QAction* actionSimplifyAndRegularize; - -public: - void init(QMainWindow* mainWindow, 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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << 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 Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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(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 // parallel version - (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 "Polyhedron_demo_point_set_wlop_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_point_set_wlop_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ - - - WLOPRegularizationAndSimplificationDialog - - - - 0 - 0 - 292 - 109 - - - - WLOP simplification and regularization - - - - - - Retained percentage - - - - - - - % - - - 2 - - - 0.100000000000000 - - - 100.000000000000000 - - - 0.100000000000000 - - - 50.000000000000000 - - - - - - - Neighborhood radius - - - - - - - * average spacing - - - 2 - - - 0.100000000000000 - - - 10.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - WLOPRegularizationAndSimplificationDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - WLOPRegularizationAndSimplificationDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_poisson_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,130 +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 -#include -#include -#include -#include -#include - -#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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - 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->item(scene->mainSelectionIndex())); - return item && item->has_normals(); - } - - QList actions() const { - return QList() << actionPoissonReconstruction; - } - -public Q_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->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(); - } -} - -#include "Polyhedron_demo_poisson_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_poisson_plugin_impl.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -//---------------------------------------------------------- -// Poisson reconstruction method: -// Reconstructs a surface mesh from a point set and returns it as a polyhedron. -//---------------------------------------------------------- - - -// CGAL -#include // must be included before kernel -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CGAL_EIGEN3_ENABLED -#include -#endif - -#include - -#include "Kernel_type.h" -#include "Polyhedron_type.h" -#include "Scene_points_with_normal_item.h" - - -// Poisson implicit function -typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; - -// Surface mesher -typedef CGAL::Surface_mesh_default_triangulation_3 STr; -typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; -typedef CGAL::Implicit_surface_3 Surface_3; - -// AABB tree -typedef CGAL::AABB_face_graph_triangle_primitive Primitive; -typedef CGAL::AABB_traits AABB_traits; -typedef CGAL::AABB_tree 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.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::EigenType> > solver; - ok = function.compute_implicit_function(solver, use_two_passes); - } - if(solver_name=="Eigen - built-in CG") - { - CGAL::Eigen_solver_traits::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 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=("< - - PoissonDialog - - - - 0 - 0 - 390 - 312 - - - - Poisson reconstruction - - - - - - Min triangle angle: - - - - - - - ° - - - 1.000000000000000 - - - 30.000000000000000 - - - 20.000000000000000 - - - - - - - Max triangle size: - - - - - - - * average spacing - - - 0 - - - 1.000000000000000 - - - 1000.000000000000000 - - - 1.000000000000000 - - - 100.000000000000000 - - - - - - - Approximation error: - - - - - - - * average spacing - - - 6 - - - 0.010000000000000 - - - 100.000000000000000 - - - 0.010000000000000 - - - 0.250000000000000 - - - - - - - Solver: - - - - - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Uses two passes - - - - - - - - - buttonBox - accepted() - PoissonDialog - accept() - - - 177 - 123 - - - 53 - 125 - - - - - buttonBox - rejected() - PoissonDialog - reject() - - - 257 - 119 - - - 257 - 143 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_polyhedron_slicer_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,343 +0,0 @@ -#include -#include - -#include "Messages_interface.h" -#include "Scene_plane_item.h" -#include "Scene_polyhedron_item.h" -#include "Scene_polylines_item.h" -#include "Scene.h" - -#include "Polyhedron_demo_plugin_helper.h" -#include "ui_Polyhedron_slicer_widget.h" - -#include -#include -#include - -#include "Polyhedron_type.h" - -#include -#include -#include -#include -#include - -#include -#include - -typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel; - -class Polyhedron_demo_polyhedron_slicer_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - bool applicable(QAction*) const { return qobject_cast(scene->item(scene->mainSelectionIndex())); } - void print_message(QString message) { messages->information(message);} - - using Polyhedron_demo_plugin_helper::init; - void init(QMainWindow* mainWindow, Scene_interface* scene_interface, Messages_interface* m); - QList 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(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& planes, - const std::vector& plane_positions, - std::list >& polylines); - -}; // end Polyhedron_demo_polyhedron_slicer_plugin - -void Polyhedron_demo_polyhedron_slicer_plugin::init(QMainWindow* mainWindow, - Scene_interface* scene_interface, - Messages_interface* m) -{ - mw = mainWindow; - scene = scene_interface; - messages = m; - plane_item = NULL; - - actionSlicerWidget = new QAction(tr("Polyhedron Slicer"), mw); - 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 Polyhedron_demo_polyhedron_slicer_plugin::actions() const { - return QList() << 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 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)) - { connect(scene_casted, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), this, SLOT(item_about_to_be_destroyed(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(); - 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 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 planes; - std::vector 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 > 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 >::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->invalidate_buffers(); - } - } -} - -void Polyhedron_demo_polyhedron_slicer_plugin::item_about_to_be_destroyed(Scene_item* scene_item) { - if(plane_item == NULL) { return; }// which means this plugin erased plane_item - Scene_plane_item* destroyed_plane = qobject_cast(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); - 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& planes, - const std::vector& plane_positions, - std::list >& polylines) -{ - CGAL::Polygon_mesh_slicer slicer(poly); - std::vector::const_iterator plane_position_it = plane_positions.begin(); - for(std::vector::const_iterator plane_it = planes.begin(); plane_it != planes.end(); ++plane_it, ++plane_position_it) - slicer(*plane_it, std::front_inserter(polylines)); - -} - -#include "Polyhedron_demo_polyhedron_slicer_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_polyhedron_stitching_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -#include -#include -#include -#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 - -#include -#include -#include - -template -struct Is_border { - const G& g; - Is_border(const G& g) - : g(g) - {} - - template - bool operator()(const Descriptor& d) const { - return is_border(d,g); - } - - bool operator()(typename boost::graph_traits::vertex_descriptor d) const { - return is_border(d,g) != boost::none; - } - -}; - - - -class Polyhedron_demo_polyhedron_stitching_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - QAction* actionDetectBorders; - QAction* actionStitchBorders; -public: - QList actions() const { return QList() << 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->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::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->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, Is_border > BorderGraph; - - Is_border ib(*pMesh); - BorderGraph bg(*pMesh,ib,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); - new_item->invalidate_buffers(); - } - } - } -} - -void Polyhedron_demo_polyhedron_stitching_plugin::on_actionStitchBorders_triggered() -{ - Q_FOREACH(int index, scene->selectionIndices()) - { - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - - if(item) - { - Polyhedron* pMesh = item->polyhedron(); - CGAL::Polygon_mesh_processing::stitch_borders(*pMesh); - item->invalidate_buffers(); - scene->itemChanged(item); - } - } -} - -#include "Polyhedron_demo_polyhedron_stitching_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -#include "Scene_polylines_item.h" - -#include "Polyhedron_demo_io_plugin_interface.h" -#include -#include -#include - -class Polyhedron_demo_polylines_io_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_io_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0") - - -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 > 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& 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->invalidate_buffers(); - return item; -} - -bool Polyhedron_demo_polylines_io_plugin::canSave(const Scene_item* item) -{ - return qobject_cast(item) != 0; -} - -bool Polyhedron_demo_polylines_io_plugin::save(const Scene_item* item, QFileInfo fileinfo) -{ - const Scene_polylines_item* poly_item = - qobject_cast(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 "Polyhedron_demo_polylines_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_remeshing_plugin_cgal_code.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,368 +0,0 @@ -#include -#include - -#include "Polyhedron_type.h" -#include "Scene_item.h" -#include -#include "Scene_polyhedron_item.h" -#include "Scene_polygon_soup_item.h" - -#include - -#include "C2t3_type.h" -#include "Scene_c2t3_item.h" - -#include -#include -#include - -#include -#include - -#include - -#include -#include - -#include -#include - -#include - -#include "Scene_item.h" - -#include -#include -#include -#include -#include -#include -#include - -template -class Surface_mesh_modified_criteria_3 -{ -public: - typedef Tr Triangulation; - typedef typename Tr::Geom_traits::FT FT; - - typedef typename CGAL::array 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 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 uniform_size_criterion; - // bound on radii of surface Delaunay balls - - CGAL::Surface_mesher::Aspect_ratio_criterion aspect_ratio_criterion; - // lower bound on minimum angle in degrees - -}; // end class Surface_mesh_default_criteria_3 - - -// -// Types for meshing -// -typedef CGAL::Simple_cartesian Simple_cartesian_kernel; -// input surface -// typedef CGAL::Mesh_3::Robust_intersection_traits_3 IGT; -typedef CGAL::AABB_polyhedral_oracle 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 -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 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 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::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(0, c2t3, input, facets_criteria); - ; - break; - case 1: - mesher = new Mesher(0, c2t3, input, facets_criteria); - break; - default: - mesher = new Mesher(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 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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_remeshing_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include "Scene_polyhedron_item.h" -#include -#include - -// 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) - 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; - actionRemeshing = this->getActionFromMainWindow(mw, "actionRemeshing"); - if(actionRemeshing) { - connect(actionRemeshing, SIGNAL(triggered()), - this, SLOT(remesh())); - } - } - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << actionRemeshing; - } -public Q_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->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(); - } -} - -#include "Polyhedron_demo_remeshing_plugin.moc" - -#endif // CGAL_POLYHEDRON_DEMO_USE_SURFACE_MESHER diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#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 - -class Polyhedron_demo_scale_space_reconstruction_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - - 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->item(scene->mainSelectionIndex())); - } - - QList actions() const { - return QList() << actionScaleSpaceReconstruction; - } - -public Q_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->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 Reconstructor; - Reconstructor 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; - - std::vector pts; - typedef Point_set::iterator Point_iterator; - for(Point_iterator it = pts_item->point_set()->begin(), - end = pts_item->point_set()->end(); it!=end; ++it) - { - pts.push_back (*it); - } - - std::vector pts_smoothed; - typedef Reconstructor::Point_iterator SS_point_iterator; - - for(SS_point_iterator it = reconstruct.points_begin(), - end = reconstruct.points_end(); it!=end; ++it) - { - pts_smoothed.push_back (*it); - } - - 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 ); - - std::map map_i2i; - - unsigned int current_index = 0; - for (Reconstructor::Triple_iterator it=reconstruct.shell_begin( sh ), - end=reconstruct.shell_end( sh );it!=end;++it) - { - for (unsigned int ind = 0; ind < 3; ++ ind) - if (map_i2i.insert (std::make_pair ((*it)[ind], current_index)).second) - { - new_item->new_vertex (pts[(*it)[ind]].x (), - pts[(*it)[ind]].y (), - pts[(*it)[ind]].z ()); - ++ current_index; - } - - new_item->new_triangle( map_i2i[(*it)[0]], - map_i2i[(*it)[1]], - map_i2i[(*it)[2]] ); - } - - 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 ); - - std::map map_i2i_smoothed; - - unsigned int current_index_smoothed = 0; - for (Reconstructor::Triple_iterator it=reconstruct.shell_begin( sh ), - end=reconstruct.shell_end( sh );it!=end;++it) - { - for (unsigned int ind = 0; ind < 3; ++ ind) - if (map_i2i_smoothed.insert (std::make_pair ((*it)[ind], current_index_smoothed)).second) - { - new_item_smoothed->new_vertex (pts_smoothed[(*it)[ind]].x (), - pts_smoothed[(*it)[ind]].y (), - pts_smoothed[(*it)[ind]].z ()); - ++ current_index_smoothed; - } - - new_item_smoothed->new_triangle( map_i2i_smoothed[(*it)[0]], - map_i2i_smoothed[(*it)[1]], - map_i2i_smoothed[(*it)[2]] ); - } - - 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(); - } -} - -#include "Polyhedron_demo_scale_space_reconstruction_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_scale_space_reconstruction_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ - - - ScaleSpaceOptionsDialog - - - - 0 - 0 - 476 - 272 - - - - Scale-Space Surface Reconstruction - - - - - - Also generate the smoothed version - - - true - - - - - - - Iterations - - - - - - - Size of sample to estimate neighborhood - - - - - - - Average neighborhood size - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - 1000000 - - - 200 - - - - - - - 1 - - - 1000000 - - - 4 - - - - - - - 0 - - - 100000 - - - 30 - - - - - - - - - buttonBox - accepted() - ScaleSpaceOptionsDialog - accept() - - - 177 - 123 - - - 53 - 125 - - - - - buttonBox - rejected() - ScaleSpaceOptionsDialog - reject() - - - 257 - 119 - - - 257 - 143 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_selection_io_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#include "Scene_polyhedron_selection_item.h" -#include "Polyhedron_demo_io_plugin_interface.h" -#include - -class Polyhedron_demo_selection_io_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; } - 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(scene_item); - } - bool save(const Scene_item* scene_item, QFileInfo fileinfo) { - const Scene_polyhedron_selection_item* item = qobject_cast(scene_item); - if(item == NULL) { return false; } - - return item->save(fileinfo.filePath().toStdString()); - } -}; - -#include -//Q_EXPORT_PLUGIN2(Polyhedron_demo_selection_io_plugin, Polyhedron_demo_selection_io_plugin) -#include "Polyhedron_demo_selection_io_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_selection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,399 +0,0 @@ -#include -#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 "Scene_interface.h" -#include "Polyhedron_demo_plugin_helper.h" -#include "ui_Selection_widget.h" - -#include -#include -#include - -#include - -#include -#include - -struct Is_terminal -{ - template - bool operator ()(VertexDescriptor , const Graph& ) - { - return false; // degree(vd,g) != 2; is a bad test in case of parallel edges - } -}; - - -template -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::vertex_descriptor vd) - { - item->polylines.back().push_back(points_pmap[vd]); - } - void end_polyline(){} -}; - -class Polyhedron_demo_selection_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -public: - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())) - || qobject_cast(scene->item(scene->mainSelectionIndex())); - } - void print_message(QString message) { messages->information(message); } - QList actions() const { return QList() << 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.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.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(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 Q_SLOTS: - void selection_action() { - dock_widget->show(); - dock_widget->raise(); - if(scene->numberOfEntries() < 2) { - Scene_polyhedron_item* poly_item = get_selected_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(scene); - if (scene_ptr) - connect(new_item,SIGNAL(simplicesSelected(Scene_item*)), scene_ptr, SLOT(setSelectedItem(Scene_item*))); - scene->setSelectedItem(item_id); - } - } - // Select all - void on_Select_all_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_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(); - 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(); - if(!selection_item) { - print_message("Error: there is no selected polyhedron selection item!"); - return; - } - - boost::optional 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(); - if(!selection_item) { - print_message("Error: there is no selected polyhedron selection item!"); - return; - } - boost::optional 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(); - 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(scene); - if (scene_ptr) - connect(new_item,SIGNAL(simplicesSelected(Scene_item*)), scene_ptr, SLOT(setSelectedItem(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(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(); - 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(); - 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 p2vd; - std::map::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 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(); - 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(); - 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(); - 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->invalidate_buffers(); // 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_Dilate_erode_button_clicked() { - Scene_polyhedron_selection_item* selection_item = get_selected_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->item(item_id)); - if(!selection_item) { return; } - - Scene_polyhedron_item* poly_item = get_selected_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(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_item); - if(poly_item) { - std::pair 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_item); - if(selection_item) { - Scene_polyhedron_item* poly_item = selection_item->polyhedron_item(); - std::pair 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 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 -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_self_intersection_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,89 +0,0 @@ -#include -#include -#include -#include "opengl_tools.h" -#include "Kernel_type.h" -#include "Polyhedron_type.h" -#include "Scene_polyhedron_item.h" -#include "Scene_polyhedron_selection_item.h" - -#include "Polyhedron_demo_plugin_helper.h" -#include "Polyhedron_demo_plugin_interface.h" - -#include -#include -#include - -#include -#include - -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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - // used by Polyhedron_demo_plugin_helper - QStringList actionsNames() const { - return QStringList() << "actionSelfIntersection"; - } - - bool applicable(QAction*) const { - return qobject_cast(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() -{ - Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(scene->item(index)); - - if(item) - { - Polyhedron* pMesh = item->polyhedron(); - - // compute self-intersections - - typedef Polyhedron::Facet_handle Facet_handle; - std::vector > 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 >::iterator fb = facets.begin(); - fb != facets.end(); ++fb) { - selection_item->selected_facets.insert(fb->first); - selection_item->selected_facets.insert(fb->second); - } - selection_item->invalidate_buffers(); - selection_item->setName(tr("%1 (selection) (intersecting triangles)").arg(item->name())); - scene->addItem(selection_item); - item->setRenderingMode(Wireframe); - 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 "Polyhedron_demo_self_intersection_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_shortest_path_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_shortest_path_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_shortest_path_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_shortest_path_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,303 +0,0 @@ -#include "Polyhedron_demo_plugin_helper.h" -#include "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 -#include -#include -#include -#include -#include -#include -#include -//#include -#include -#include -#include - -class Polyhedron_demo_shortest_path_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") -private: - - typedef boost::property_map::type VertexIndexMap; - typedef boost::property_map::type HalfedgeIndexMap; - typedef boost::property_map::type FaceIndexMap; - typedef boost::property_map::type VertexPointMap; - - typedef CGAL::Surface_mesh_shortest_path_traits Surface_mesh_shortest_path_traits; - typedef CGAL::Surface_mesh_shortest_path Surface_mesh_shortest_path; - - struct ShortestPathsPointsVisitor - { - typedef std::vector 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 Shortest_paths_map; - -public: - - QList actions() const - { - return QList() << actionMakeShortestPaths; - } - - bool applicable(QAction*) const - { - return qobject_cast(scene->item(scene->mainSelectionIndex())); - } - - using Polyhedron_demo_plugin_helper::init; - void init(QMainWindow* mainWindow, 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); - - connect(actionMakeShortestPaths, SIGNAL(triggered()), this, SLOT(on_actionMakeShortestPaths_triggered())); - - Scene* trueScene = dynamic_cast(scene_interface); - // This is for later - if(trueScene) { - connect(trueScene, SIGNAL(itemAboutToBeDestroyed(Scene_item*)), this, SLOT(item_about_to_be_destroyed(Scene_item*))); - connect(trueScene, SIGNAL(newItem(int)), this, SLOT(new_item(int))); - } - } - -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(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(Scene_item* sceneItem) -{ - // if polyhedron item - Scene_polyhedron_item* polyhedronItem = qobject_cast(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(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->item(itemIndex)); - - if (!item) - { - return; - } - - if(item->polyhedron_item() == NULL) - { - Scene_polyhedron_item* polyhedronItem = get_selected_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(); - 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 "Polyhedron_demo_shortest_path_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include -#include - -#include - -class Polyhedron_demo_stl_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(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; - 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(), 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 > points; - std::vector > 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.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 "Polyhedron_demo_stl_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_subdivision_methods_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ -#include -#include - -#include "Polyhedron_demo_plugin_helper.h" -#include "Polyhedron_demo_plugin_interface.h" - -#include "Scene_polyhedron_item.h" -#include "Polyhedron_type.h" -#include - -class Polyhedron_demo_subdivision_methods_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(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"; - } - - bool applicable(QAction*) const { - return qobject_cast(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() -{ - Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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->invalidate_buffers(); - 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->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->invalidate_buffers(); - 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->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->invalidate_buffers(); - scene->itemChanged(item); -} - -#include "Polyhedron_demo_subdivision_methods_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ -#include -#include -#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 -#include -#include -#include -#include -#include -#include - -class Polyhedron_demo_transform_polyhedron_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - - Polyhedron_demo_transform_polyhedron_plugin():started(false){} - - QList actions() const { - return QList() << actionTransformPolyhedron; - } - - bool applicable(QAction*) const { - return qobject_cast(scene->item(scene->mainSelectionIndex())) || - qobject_cast(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 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(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 { - typedef Polyhedron::HalfedgeDS HDS; - - CGAL::Aff_transformation_3 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 "Polyhedron_demo_transform_polyhedron_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_triangulate_facets_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ -#include -#include -#include -#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 - -class Polyhedron_demo_triangulate_facets_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - 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, - 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 actions() const { - return QList() << actionTriangulateFacets - << actionUnTriangulateFacets; - } - - bool applicable(QAction*) const { - Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) { - Scene_polyhedron_item* item = qobject_cast(scene->item(index)); - if(!item) return false; - } - return true; - } - - -public Q_SLOTS: - void untriangulate() { - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_polyhedron_item* item = - qobject_cast(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->invalidate_buffers(); - 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->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->invalidate_buffers(); - 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 "Polyhedron_demo_triangulate_facets_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_trivial_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,197 +0,0 @@ -#include - -#include "Scene_item.h" -#include "Scene_interface.h" -#include - -#include "Viewer_interface.h" -#include -#include - -class Q_DECL_EXPORT Scene_bbox_item : public Scene_item -{ - Q_OBJECT -public: - Scene_bbox_item(const 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; } - Bbox bbox() const { return Bbox(); } - - Scene_bbox_item* clone() const { - return 0; - } - - QString toolTip() const { - const Bbox& bb = scene->bbox(); - return QString("

Scene bounding box

" - "

x range: (%1, %2)
" - "y range: (%3, %4)
" - "z range: (%5, %6)

") - .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(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(positions_lines.size()/3)); - vaos[0]->release(); - program->release(); - - } - - void invalidate_buffers() - { - compute_elements(); - are_buffers_filled = false; - } - -private: - - std::vector positions_lines; - mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(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(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() - { - 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 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) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - -public: - void init(QMainWindow* mainWindow, Scene_interface* scene_interface); - QList actions() const { - return QList() << actionBbox; - } - - bool applicable(QAction*) const { - return true; - } -public Q_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->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 "Polyhedron_demo_trivial_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,166 +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 -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "ui_Polyhedron_demo_vcm_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_vcm_normal_estimation_plugin : - public QObject, - public Polyhedron_demo_plugin_helper -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0") - QAction* actionVCMNormalEstimation; - -public: - void init(QMainWindow* mainWindow, Scene_interface* scene_interface) { - - actionVCMNormalEstimation = new QAction(tr("VCM normal estimation"), mainWindow); - actionVCMNormalEstimation->setObjectName("actionVCMNormalEstimation"); - - Polyhedron_demo_plugin_helper::init(mainWindow, scene_interface); - } - - QList actions() const { - return QList() << actionVCMNormalEstimation; - } - - bool applicable(QAction*) const { -#if CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN - return false; -#else - return qobject_cast(scene->item(scene->mainSelectionIndex())); -#endif - } - -public Q_SLOTS: - void on_actionVCMNormalEstimation_triggered(); - -}; // end Polyhedron_demo_vcm_normal_estimation_plugin - -class Point_set_demo_normal_estimation_dialog : public QDialog, private Ui::VCMNormalEstimationDialog -{ - Q_OBJECT - public: - Point_set_demo_normal_estimation_dialog(QWidget* /*parent*/ = 0) - { - setupUi(this); - } - - float offsetRadius() const { return m_inputOffsetRadius->value(); } - float convolveRadius() const { return m_inputConvolveRadius->value(); } - unsigned int convolveNeighbors() const { return m_inputConvolveNeighbors->value(); } - bool convolveUsingRadius() const { return m_inputUseConvRad->isChecked(); } -}; - -void Polyhedron_demo_vcm_normal_estimation_plugin::on_actionVCMNormalEstimation_triggered() -{ -#if !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN - const Scene_interface::Item_id index = scene->mainSelectionIndex(); - - Scene_points_with_normal_item* item = - qobject_cast(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(); - - //*************************************** - // VCM normal estimation - //*************************************** - - CGAL::Timer task_timer; task_timer.start(); - - // Estimates normals direction. - if (dialog.convolveUsingRadius()) - { - std::cerr << "Estimates Normals Direction using VCM (R=" - << dialog.offsetRadius() << " and r=" << dialog.convolveRadius() << ")...\n"; - - CGAL::vcm_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), - dialog.offsetRadius(), dialog.convolveRadius()); - } - else - { - std::cerr << "Estimates Normals Direction using VCM (R=" - << dialog.offsetRadius() << " and k=" << dialog.convolveNeighbors() << ")...\n"; - - CGAL::vcm_estimate_normals(points->begin(), points->end(), - CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type()), - dialog.offsetRadius(), dialog.convolveNeighbors()); - } - // Mark all normals as unoriented - first_unoriented_point = points->begin(); - - std::size_t memory = CGAL::Memory_sizer().virtual_size(); - task_timer.stop(); - std::cerr << "Estimates normal direction: " << task_timer.time() << " seconds, " - << (memory>>20) << " Mb allocated" - << std::endl; - - //*************************************** - // normal orientation - //*************************************** - - unsigned int neighbors = 18; - task_timer.reset(); - task_timer.start(); - std::cerr << "Orient normals with a Minimum Spanning Tree (k=" << 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()), - neighbors); - - std::size_t nb_unoriented_normals = std::distance(first_unoriented_point, points->end()); - 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; - - // Updates scene - item->invalidate_buffers(); - scene->itemChanged(index); - - QApplication::restoreOverrideCursor(); - } -#endif // !CGAL_DISABLE_NORMAL_ESTIMATION_PLUGIN -} - -#include "Polyhedron_demo_vcm_normal_estimation_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.ui cgal-4.8/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_vcm_normal_estimation_plugin.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,149 +0,0 @@ - - - VCMNormalEstimationDialog - - - - 0 - 0 - 462 - 401 - - - - Normal estimation - - - - - - - - Offset Radius: - - - - - - - 3 - - - 0.050000000000000 - - - 0.100000000000000 - - - - - - - - - - - Convolution radius: - - - - - - - 3 - - - 0.050000000000000 - - - - - - - - - - - Convolution Neighbors: - - - - - - - neighbors - - - 40 - - - - - - - - - Use Convolution Radius - - - true - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - label - buttonBox - m_inputOffsetRadius - m_inputConvolveRadius - label_2 - label_3 - m_inputConvolveNeighbors - label_2 - m_inputUseConvRad - - - - - buttonBox - accepted() - VCMNormalEstimationDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - VCMNormalEstimationDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp cgal-4.8/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp --- cgal-4.7/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +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 - -class Polyhedron_demo_xyz_plugin : - public QObject, - public Polyhedron_demo_io_plugin_interface -{ - Q_OBJECT - Q_INTERFACES(Polyhedron_demo_io_plugin_interface) - Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.0") - -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(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(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 "Polyhedron_demo_xyz_plugin.moc" diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_slicer_widget.ui cgal-4.8/demo/Polyhedron/Polyhedron_slicer_widget.ui --- cgal-4.7/demo/Polyhedron/Polyhedron_slicer_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_slicer_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ - - - Polyhedron_slicer - - - - 0 - 0 - 289 - 208 - - - - Polyhedron Slicer - - - - - - - - - - - - Base 2 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Base 1 - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Center - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Update Plane - - - - - - - - - - - Distance with planes - - - - - - - - - - - - - - New polyline item for each polyline - - - - - - - Generate - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_type_fwd.h cgal-4.8/demo/Polyhedron/Polyhedron_type_fwd.h --- cgal-4.7/demo/Polyhedron/Polyhedron_type_fwd.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_type_fwd.h 2016-04-04 19:00:12.000000000 +0000 @@ -53,8 +53,10 @@ #endif // USE_FORWARD_DECL // surface mesh +typedef int Patch_id; + typedef CGAL::Polyhedron_3, + Polyhedron_demo_items, // CGAL::Polyhedron_items_3, CGAL::HalfedgeDS_default, std::allocator > Polyhedron; diff -Nru cgal-4.7/demo/Polyhedron/Polyhedron_type.h cgal-4.8/demo/Polyhedron/Polyhedron_type.h --- cgal-4.7/demo/Polyhedron/Polyhedron_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Polyhedron_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,7 @@ return nb_of_feature_edges != 0; } - void add_incident_patch(const Patch_id i) { + void add_incident_patch(const Patch_id& i) { indices.insert(i); } @@ -107,6 +108,19 @@ ///@} }; +template +inline std::pair +patch_id_default_value(std::pair) +{ + return std::pair(1, 0); +} + +template +inline Integral patch_id_default_value(Integral) +{ + return Integral(1); +} + template class Polyhedron_demo_face : public CGAL::HalfedgeDS_face_base @@ -119,14 +133,14 @@ public: typedef Patch_id_ Patch_id; - Polyhedron_demo_face() - : patch_id_(1), mID(-1) {} + Polyhedron_demo_face() + : patch_id_(patch_id_default_value(Patch_id())), mID(-1) {} - int patch_id() const { + const Patch_id& patch_id() const { return patch_id_; } - void set_patch_id(const int i) { + void set_patch_id(const Patch_id& i) { patch_id_ = i; } @@ -181,6 +195,8 @@ #include "Polyhedron_type_fwd.h" // surface mesh -typedef CGAL::Polyhedron_3 > Polyhedron; +typedef Polyhedron_demo_items Polyhedron_items; +typedef CGAL::Polyhedron_3 Polyhedron; + #endif // POLYHEDRON_TYPE_H diff -Nru cgal-4.7/demo/Polyhedron/Remeshing_dialog.ui cgal-4.8/demo/Polyhedron/Remeshing_dialog.ui --- cgal-4.7/demo/Polyhedron/Remeshing_dialog.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Remeshing_dialog.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,174 +0,0 @@ - - Remeshing_dialog - - - - 0 - 0 - 389 - 173 - - - - Meshing criteria - - - - - - - - &Angle: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - angle - - - - - - - 1.000000000000000 - - - 30.000000000000000 - - - 25.000000000000000 - - - - - - - &Size: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - sizing - - - - - - - 4 - - - - - - - Approximation &error: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - approx - - - - - - - - - - - Non manifold - - - - - Manifold - - - - - Manifold with boundaries - - - - - - - - &Topological criterion: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - tags - - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - buttonBox - accepted() - Remeshing_dialog - accept() - - - 384 - 191 - - - 157 - 195 - - - - - buttonBox - rejected() - Remeshing_dialog - reject() - - - 384 - 191 - - - 286 - 195 - - - - - Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/back.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/back.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/bot.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/bot.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/down.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/down.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/front.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/front.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/left.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/left.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/right.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/right.png differ diff -Nru cgal-4.7/demo/Polyhedron/resources/shader_c3t3_edges.f cgal-4.8/demo/Polyhedron/resources/shader_c3t3_edges.f --- cgal-4.7/demo/Polyhedron/resources/shader_c3t3_edges.f 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_c3t3_edges.f 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_c3t3_edges.v cgal-4.8/demo/Polyhedron/resources/shader_c3t3_edges.v --- cgal-4.7/demo/Polyhedron/resources/shader_c3t3_edges.v 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_c3t3_edges.v 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_c3t3.f cgal-4.8/demo/Polyhedron/resources/shader_c3t3.f --- cgal-4.7/demo/Polyhedron/resources/shader_c3t3.f 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_c3t3.f 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_c3t3.v cgal-4.8/demo/Polyhedron/resources/shader_c3t3.v --- cgal-4.7/demo/Polyhedron/resources/shader_c3t3.v 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_c3t3.v 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_no_light_no_selection.f cgal-4.8/demo/Polyhedron/resources/shader_no_light_no_selection.f --- cgal-4.7/demo/Polyhedron/resources/shader_no_light_no_selection.f 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_no_light_no_selection.f 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,6 @@ +#version 120 +varying highp vec4 color; +void main(void) +{ + gl_FragColor = color; +} diff -Nru cgal-4.7/demo/Polyhedron/resources/shader_plane_two_faces.f cgal-4.8/demo/Polyhedron/resources/shader_plane_two_faces.f --- cgal-4.7/demo/Polyhedron/resources/shader_plane_two_faces.f 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_plane_two_faces.f 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_with_light.f cgal-4.8/demo/Polyhedron/resources/shader_with_light.f --- cgal-4.7/demo/Polyhedron/resources/shader_with_light.f 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_with_light.f 2016-04-04 19:00:12.000000000 +0000 @@ -8,7 +8,8 @@ uniform highp vec4 light_amb; uniform highp float spec_power ; uniform int is_two_side; -void main(void) { +uniform bool is_selected; +void main(void) { highp vec3 L = light_pos.xyz - fP.xyz; highp vec3 V = -fP.xyz; highp vec3 N; @@ -25,5 +26,11 @@ 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; -gl_FragColor = vec4((color*light_amb).xyz + diffuse.xyz + specular.xyz,1); -} + 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 -Nru cgal-4.7/demo/Polyhedron/resources/shader_with_light.v cgal-4.8/demo/Polyhedron/resources/shader_with_light.v --- cgal-4.7/demo/Polyhedron/resources/shader_with_light.v 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_with_light.v 2016-04-04 19:00:12.000000000 +0000 @@ -9,7 +9,7 @@ varying highp vec4 color; void main(void) { - color = vec4(colors, 1.0); + color = vec4(colors, 1.0); fP = mv_matrix * vertex; fN = mat3(mv_matrix)* normals; gl_Position = mvp_matrix * vertex; diff -Nru cgal-4.7/demo/Polyhedron/resources/shader_without_light.f cgal-4.8/demo/Polyhedron/resources/shader_without_light.f --- cgal-4.7/demo/Polyhedron/resources/shader_without_light.f 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/resources/shader_without_light.f 2016-04-04 19:00:12.000000000 +0000 @@ -1,6 +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; } Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/top.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/top.png differ Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/demo/Polyhedron/resources/up.png and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/demo/Polyhedron/resources/up.png differ diff -Nru cgal-4.7/demo/Polyhedron/Scene_c2t3_item.h cgal-4.8/demo/Polyhedron/Scene_c2t3_item.h --- cgal-4.7/demo/Polyhedron/Scene_c2t3_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_c2t3_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -4,12 +4,12 @@ #include "Scene_c2t3_item_config.h" #include "C2t3_type.h" #include -#include "Scene_item.h" +#include #include #include #include -class SCENE_C2T3_ITEM_EXPORT Scene_c2t3_item : public Scene_item +class SCENE_C2T3_ITEM_EXPORT Scene_c2t3_item : public CGAL::Three::Scene_item { Q_OBJECT public: @@ -34,9 +34,9 @@ return c2t3().triangulation().number_of_vertices() == 0; } - Bbox bbox() const { + void compute_bbox() const { if(isEmpty()) - return Bbox(); + _bbox = Bbox(); else { bool first = true; CGAL::Bbox_3 result; @@ -52,7 +52,7 @@ result = result + vit->point().bbox(); } } - return Bbox(result.xmin(), result.ymin(), result.zmin(), + _bbox = Bbox(result.xmin(), result.ymin(), result.zmin(), result.xmax(), result.ymax(), result.zmax()); } } diff -Nru cgal-4.7/demo/Polyhedron/Scene_c3t3_item_config.h cgal-4.8/demo/Polyhedron/Scene_c3t3_item_config.h --- cgal-4.7/demo/Polyhedron/Scene_c3t3_item_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_c3t3_item_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Scene_c3t3_item.cpp cgal-4.8/demo/Polyhedron/Scene_c3t3_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_c3t3_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_c3t3_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,1280 @@ +#include "config.h" +#include "create_sphere.h" +#include "Scene_c3t3_item.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +struct Scene_c3t3_item_priv { + Scene_c3t3_item_priv() : c3t3() {} + Scene_c3t3_item_priv(const C3t3& c3t3_) : c3t3(c3t3_) {} + + C3t3 c3t3; + QVector 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"<addShader(vertex_shader)) + { + std::cerr<<"adding vertex shader FAILED"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3.f" )) + { + std::cerr<<"adding fragment shader FAILED"<link()) + { + //std::cerr<<"linking Program FAILED"<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(*this).build_histogram(); + return histogram_; + } +} + +template +std::vector +create_histogram(const C3t3& c3t3, double& min_value, double& max_value) +{ + typedef typename C3t3::Triangulation::Point Point_3; + + std::vector 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(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(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(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(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(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(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 histo_data = create_histogram(c3t3(), min_value, max_value); + + // Get maximum value (to normalize) + int max_size = 0; + for (std::vector::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::iterator it = histo_data.begin(), end = histo_data.end(); + it != end; ++it, i += cell_width) + { + int line_height = static_cast(std::ceil(static_cast(drawing_height)* + static_cast(*it) / static_cast(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(histo_data.size())*cell_width, + drawing_height + top_margin)); + + + // draw min value and max value + const int min_tr_width = static_cast(2 * (std::floor(min_value)*cell_width + left_margin)); + const int max_tr_width = static_cast( + 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 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("

3D complex in a 3D triangulation

" + "

Number of vertices: %1
" + "Number of surface facets: %2
" + "Number of volume tetrahedra: %3

") + .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(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(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(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(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(s_vertex.size()/3), + static_cast(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(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(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(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(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(ws_vertex.size()/3), + static_cast(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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(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 incident_vertices; + d->c3t3.triangulation().incident_vertices(vit, std::back_inserter(incident_vertices)); + bool red = vit->is_special(); + for(std::vector::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((bbox.xmax+bbox.xmin)/2.); + const float ycenter = static_cast((bbox.ymax+bbox.ymin)/2.); + const float zcenter = static_cast((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 -Nru cgal-4.7/demo/Polyhedron/Scene_c3t3_item.h cgal-4.8/demo/Polyhedron/Scene_c3t3_item.h --- cgal-4.7/demo/Polyhedron/Scene_c3t3_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_c3t3_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include + +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()() << "\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 Primitive; + typedef CGAL::AABB_traits Traits; + typedef CGAL::AABB_tree 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 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 positions_lines; + mutable std::vector positions_grid; + mutable std::vector positions_poly; + mutable std::vector normals; + mutable std::vector f_colors; + mutable std::vector s_normals; + mutable std::vector s_colors; + mutable std::vector s_vertex; + mutable std::vector ws_vertex; + mutable std::vector s_radius; + mutable std::vector 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 -Nru cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item_config.h cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item_config.h --- cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item_config.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item_config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -#ifndef SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H -#define SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H - -#ifdef scene_combinatorial_map_item_EXPORTS -# define SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Q_DECL_EXPORT -#else -# define SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Q_DECL_IMPORT -#endif - -#endif // SCENE_COMBINATORIAL_MAP_ITEM_CONFIG_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item.cpp cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,520 +0,0 @@ -#include "Scene_combinatorial_map_item.h" -#include "Scene_polyhedron_item.h" -#include "Scene_interface.h" -#include "Viewer_interface.h" - -#include -#include -#include -#include -#include -#include -#include - -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; 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; - invalidate_buffers(); - Q_EMIT itemChanged(); - - if (exportSelectedVolume!=NULL && ( volume_to_display==1 || volume_to_display==0 ) ) - exportSelectedVolume->setEnabled(!exportSelectedVolume->isEnabled()); -} - - -template -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 Volume_import_modifier; - - std::vector 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 - 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 - 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 - 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 - bool operator() (Dart_handle d){ - return d->template attribute<3>()->info().inside.size()==1 && - static_cast(*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 - bool operator() (Dart_handle d){ - return d->template attribute<3>()->info().inside.size()==1 && - static_cast(*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; - 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); - 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(Viewer_interface *viewer) const -{ - //vao for the edges - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), - static_cast(positions_lines.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[0].release(); - nb_lines = positions_lines.size(); - positions_lines.resize(0); - std::vector(positions_lines).swap(positions_lines); - vaos[0]->release(); - program->release(); - } - //vao for the points - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - - vaos[1]->bind(); - buffers[1].bind(); - buffers[1].allocate(positions_points.data(), - static_cast(positions_points.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[1].release(); - vaos[1]->release(); - nb_points = positions_points.size(); - positions_points.resize(0); - std::vector(positions_points).swap(positions_points); - program->release(); - } - //vao for the facets - { - program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer); - program->bind(); - - vaos[2]->bind(); - buffers[2].bind(); - buffers[2].allocate(positions_facets.data(), - static_cast(positions_facets.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[2].release(); - - buffers[3].bind(); - buffers[3].allocate(normals.data(), - static_cast(normals.size()*sizeof(double))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_DOUBLE,0,3); - buffers[3].release(); - nb_facets = positions_facets.size(); - positions_facets.resize(0); - std::vector(positions_facets).swap(positions_facets); - normals.resize(0); - std::vector(normals).swap(normals); - vaos[2]->release(); - program->release(); - } - are_buffers_filled = true; - - -} - -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 cells(5); - for (unsigned int i=0; i<=4; ++i) - cells[i]=i; - std::vector res = combinatorial_map().count_cells(cells); - if (volume_to_display==0) - return QObject::tr("

Combinatorial_map_3 %1 (mode: %8, color: %9)

" - "

Number of darts: %2
" - "Number of vertices: %3
" - "Number of edges: %4
" - "Number of facets: %5
" - "Number of volumes: %6
" - "Number of connected components: %7

") - .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("

Combinatorial_map_3 %1 (mode: %8, color: %9)

" - "

Number of darts: %2
" - "Number of vertices: %3
" - "Number of edges: %4
" - "Number of facets: %5
" - "Number of volumes: %6
" - "Number of connected components: %7
" - "Currently Displaying facets of volume: %10

") - .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(Viewer_interface* viewer) const -{ - if(!are_buffers_filled) - { - compute_elements(); - initialize_buffers(viewer); - } - vaos[2]->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(nb_facets/3)); - vaos[2]->release(); - program->release(); - -} - void Scene_combinatorial_map_item::draw_edges(Viewer_interface* viewer) const -{ - if(!are_buffers_filled) - { - compute_elements(); - 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(nb_lines/3)); - vaos[0]->release(); - program->release(); - -} - void Scene_combinatorial_map_item::draw_points(Viewer_interface* viewer) const -{ - if(!are_buffers_filled) - { - compute_elements(); - initialize_buffers(viewer); - } - vaos[1]->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(nb_points/3)); - vaos[1]->release(); - program->release(); - -} diff -Nru cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item.h cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item.h --- cgal-4.7/demo/Polyhedron/Scene_combinatorial_map_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_combinatorial_map_item.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ -#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H -#define SCENE_COMBINATORIAL_MAP_ITEM_H - -//========= -#include -#include "Scene_combinatorial_map_item_config.h" -#include -#include -#include -#include -#include "Polyhedron_type.h" -#include "Scene_item.h" -typedef CGAL::internal_IOP::Item_with_points_and_volume_info Items; -typedef CGAL::Combinatorial_map<3,Items> Combinatorial_map_3; -//========= - -class QMenu; -class QAction; -class Scene_interface; -class Scene_polyhedron_item; -class Viewer_interface; - -class SCENE_COMBINATORIAL_MAP_ITEM_EXPORT Scene_combinatorial_map_item - : public Scene_item -{ - 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*); - //drawing of the scene - virtual void draw_edges(Viewer_interface* viewer) const; - virtual void draw_points(Viewer_interface*) const; - virtual void draw(Viewer_interface*) 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 void export_as_polyhedron(Predicate,const QString&) const; - - - mutable std::vector positions_lines; - mutable std::vector positions_points; - mutable std::vector positions_facets; - mutable std::vector normals; - mutable std::size_t nb_lines; - mutable std::size_t nb_points; - mutable std::size_t nb_facets; - - mutable QOpenGLShaderProgram *program; - - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - - using 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 -Nru cgal-4.7/demo/Polyhedron/Scene.cpp cgal-4.8/demo/Polyhedron/Scene.cpp --- cgal-4.7/demo/Polyhedron/Scene.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -4,7 +4,7 @@ #include "config.h" #include "Scene.h" -#include "Scene_item.h" +#include #include #include @@ -18,9 +18,7 @@ #include #include #include - - - +#include GlSplat::SplatRenderer* Scene::ms_splatting = 0; int Scene::ms_splattingCounter = 0; @@ -31,7 +29,7 @@ } Scene::Scene(QObject* parent) - : QAbstractListModel(parent), + : QStandardItemModel(parent), selected_item(-1), item_A(-1), item_B(-1) @@ -45,31 +43,63 @@ if(ms_splatting==0) ms_splatting = new GlSplat::SplatRenderer(); ms_splattingCounter++; - + picked = false; + gl_init = false; } Scene::Item_id -Scene::addItem(Scene_item* item) +Scene::addItem(CGAL::Three::Scene_item* item) { - + CGAL::Three::Scene_group_item* group = + qobject_cast(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(renderingModeChanged()), + connect(item, SIGNAL(redraw()), this, SLOT(callDraw())); - if(bbox_before + item->bbox() != bbox_before) -{ Q_EMIT updated_bbox(); } - QAbstractListModel::beginResetModel(); + if(item->isFinite() + && !item->isEmpty() + && bbox_before + item->bbox() != bbox_before + ) + { + Q_EMIT updated_bbox(); + } + QList list; + for(int i=0; i<5; i++) + { + list<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(); - QAbstractListModel::endResetModel(); Item_id id = m_entries.size() - 1; - Q_EMIT newItem(id); + 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(m_entries.at(mainSelectionIndex())); + if(selected_group) + { + selected_group->addChild(item); + group_added(); + } + } + } return id; } -Scene_item* -Scene::replaceItem(Scene::Item_id index, Scene_item* item, bool emit_item_about_to_be_destroyed) +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; @@ -89,61 +119,92 @@ } Q_EMIT updated(); itemChanged(index); - // QAbstractListModel::reset(); + Q_EMIT restoreCollapsedState(); + group_added(); return item; } -int -Scene::erase(int index) +Scene::Item_id +Scene::erase(Scene::Item_id index) { + clear(); + index_map.clear(); if(index < 0 || index >= m_entries.size()) return -1; - Scene_item* item = m_entries[index]; + CGAL::Three::Scene_item* item = m_entries[index]; + CGAL::Three::Scene_group_item* group = + qobject_cast(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.removeAt(index); - - selected_item = -1; - - QAbstractListModel::beginResetModel(); - Q_EMIT updated(); - QAbstractListModel::endResetModel(); - + 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; + return index; if(!m_entries.isEmpty()) - return 0; + return 0; return -1; + } int Scene::erase(QList indices) { - QList 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); - } - + QList 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(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; - QAbstractListModel::beginResetModel(); + Q_FOREACH(Scene_item* item, m_entries) + { + organize_items(item, invisibleRootItem(), 0); + } + QStandardItemModel::beginResetModel(); Q_EMIT updated(); - QAbstractListModel::endResetModel(); - + QStandardItemModel::endResetModel(); + Q_EMIT restoreCollapsedState(); + int index = max_index + 1 - indices.size(); if(index >= m_entries.size()) { index = m_entries.size() - 1; @@ -156,9 +217,19 @@ } +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(Scene_item* item_ptr, m_entries) + Q_FOREACH(CGAL::Three::Scene_item* item_ptr, m_entries) { delete item_ptr; } @@ -168,14 +239,14 @@ delete ms_splatting; } -Scene_item* +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(Scene_item* scene_item) const +Scene::item_id(CGAL::Three::Scene_item* scene_item) const { return m_entries.indexOf(scene_item); } @@ -194,8 +265,8 @@ if(index < 0 || index >= m_entries.size()) return -1; - const Scene_item* item = m_entries[index]; - Scene_item* new_item = item->clone(); + 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()); @@ -225,53 +296,56 @@ glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight); glLightfv(GL_LIGHT0, GL_POSITION, position); + gl_init = true; } -bool +bool Scene::keyPressEvent(QKeyEvent* e){ bool res=false; for (QList::iterator it=selected_items_list.begin(),endit=selected_items_list.end(); it!=endit;++it) { - Scene_item* item=m_entries[*it]; + CGAL::Three::Scene_item* item=m_entries[*it]; res |= item->keyPressEvent(e); } return res; } -void +void Scene::draw() { draw_aux(false, 0); } void -Scene::draw(Viewer_interface* viewer) +Scene::draw(CGAL::Three::Viewer_interface* viewer) { draw_aux(false, viewer); } -void +void Scene::drawWithNames() { draw_aux(true, 0); } void -Scene::drawWithNames(Viewer_interface* viewer) +Scene::drawWithNames(CGAL::Three::Viewer_interface* viewer) { draw_aux(true, viewer); } void -Scene::draw_aux(bool with_names, Viewer_interface* viewer) +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); } - Scene_item& item = *m_entries[index]; + CGAL::Three::Scene_item& item = *m_entries[index]; if(item.visible()) { if(item.renderingMode() == Flat || item.renderingMode() == FlatPlusEdges || item.renderingMode() == Gouraud) @@ -280,7 +354,7 @@ viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); viewer->glPointSize(2.f); viewer->glLineWidth(1.0f); - if(index == selected_item) + if(index == selected_item || selected_items_list.contains(index)) { item.selection_changed(true); } @@ -294,8 +368,6 @@ viewer->glShadeModel(GL_SMOOTH); else viewer->glShadeModel(GL_FLAT); - - item.contextual_changed(); if(viewer) item.draw(viewer); else @@ -313,7 +385,7 @@ if(with_names) { viewer->glPushName(index); } - Scene_item& item = *m_entries[index]; + CGAL::Three::Scene_item& item = *m_entries[index]; if(item.visible()) { if(item.renderingMode() == FlatPlusEdges || item.renderingMode() == Wireframe) @@ -322,7 +394,7 @@ viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); viewer->glPointSize(2.f); viewer->glLineWidth(1.0f); - if(index == selected_item) + if(index == selected_item || selected_items_list.contains(index)) { item.selection_changed(true); } @@ -344,7 +416,7 @@ viewer->glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); viewer->glPointSize(2.f); viewer->glLineWidth(1.0f); - if(index == selected_item) + if(index == selected_item || selected_items_list.contains(index)) { item.selection_changed(true); @@ -361,7 +433,6 @@ } } } - item.contextual_changed(); if(with_names) { viewer->glPopName(); } @@ -374,7 +445,7 @@ if(with_names) { viewer->glPushName(index); } - Scene_item& item = *m_entries[index]; + CGAL::Three::Scene_item& item = *m_entries[index]; if(item.visible()) { if(item.renderingMode() == Points || item.renderingMode() == PointsPlusNormals) @@ -390,7 +461,6 @@ item.draw_points(); } } - item.contextual_changed(); if(with_names) { viewer->glPopName(); } @@ -403,7 +473,7 @@ ms_splatting->beginVisibilityPass(); for(int index = 0; index < m_entries.size(); ++index) { - Scene_item& item = *m_entries[index]; + CGAL::Three::Scene_item& item = *m_entries[index]; if(item.visible() && item.renderingMode() == Splatting) { @@ -418,7 +488,7 @@ } ms_splatting->beginAttributePass(); for(int index = 0; index < m_entries.size(); ++index) - { Scene_item& item = *m_entries[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()); @@ -431,62 +501,54 @@ ms_splatting->finalize(); } -} - -// workaround for Qt-4.2 (see above) -#undef lighter -int -Scene::rowCount(const QModelIndex & parent) const -{ - if (parent.isValid()) - return 0; + //scrolls the sceneView to the selected item's line. + if(picked) + Q_EMIT(itemPicked(index_map.key(mainSelectionIndex()))); + if(with_names) + picked = true; else - return m_entries.size(); -} + picked = false; -int -Scene::columnCount(const QModelIndex & parent) const -{ - if (parent.isValid()) - return 0; - else - return NumberOfColumns; } -QVariant +// workaround for Qt-4.2 (see above) +#undef lighter +QVariant Scene::data(const QModelIndex &index, int role) const { if (!index.isValid()) + { return QVariant(); + } - if(index.row() < 0 || index.row() >= m_entries.size()) + int id = index_map[index]; + if(id < 0 || id >= m_entries.size()) return QVariant(); - if(role == ::Qt::ToolTipRole) { - return m_entries[index.row()]->toolTip(); + return m_entries[id]->toolTip(); } switch(index.column()) { case ColorColumn: if(role == ::Qt::DisplayRole || role == ::Qt::EditRole) - return m_entries.value(index.row())->color(); + return m_entries.value(id)->color(); else if(role == ::Qt::DecorationRole) - return m_entries.value(index.row())->color(); + return m_entries.value(id)->color(); break; case NameColumn: if(role == ::Qt::DisplayRole || role == ::Qt::EditRole) - return m_entries.value(index.row())->name(); + return m_entries.value(id)->name(); if(role == ::Qt::FontRole) - return m_entries.value(index.row())->font(); + return m_entries.value(id)->font(); break; case RenderingModeColumn: if(role == ::Qt::DisplayRole) { - return m_entries.value(index.row())->renderingModeName(); + return m_entries.value(id)->renderingModeName(); } else if(role == ::Qt::EditRole) { - return static_cast(m_entries.value(index.row())->renderingMode()); + return static_cast(m_entries.value(id)->renderingMode()); } else if(role == ::Qt::TextAlignmentRole) { return ::Qt::AlignCenter; @@ -494,9 +556,9 @@ break; case ABColumn: if(role == ::Qt::DisplayRole) { - if(index.row() == item_A) + if(id == item_A) return "A"; - if(index.row() == item_B) + if(id == item_B) return "B"; } else if(role == ::Qt::TextAlignmentRole) { @@ -505,7 +567,7 @@ break; case VisibleColumn: if(role == ::Qt::DisplayRole || role == ::Qt::EditRole) - return m_entries.value(index.row())->visible(); + return m_entries.value(id)->visible(); break; default: return QVariant(); @@ -513,7 +575,7 @@ return QVariant(); } -QVariant +QVariant Scene::headerData ( int section, ::Qt::Orientation orientation, int role ) const { if(orientation == ::Qt::Horizontal) { @@ -548,32 +610,36 @@ } } } - return QAbstractListModel::headerData(section, orientation, role); + return QStandardItemModel::headerData(section, orientation, role); } -Qt::ItemFlags +Qt::ItemFlags Scene::flags ( const QModelIndex & index ) const { if (index.isValid() && index.column() == NameColumn) { - return QAbstractListModel::flags(index) | ::Qt::ItemIsEditable; + return QStandardItemModel::flags(index) | ::Qt::ItemIsEditable; } else { - return QAbstractListModel::flags(index); + return QStandardItemModel::flags(index); } } -bool -Scene::setData(const QModelIndex &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()) + int id = index_map[index]; + if(id < 0 || id >= m_entries.size()){ return false; + } + + CGAL::Three::Scene_item* item = m_entries[id]; - Scene_item* item = m_entries[index.row()]; if(!item) return false; switch(index.column()) { @@ -598,13 +664,14 @@ rendering_mode = static_cast( (rendering_mode+1) % NumberOfRenderingMode ); } item->setRenderingMode(rendering_mode); - Q_EMIT dataChanged(index, index); + 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, index); + Q_EMIT dataChanged(index, createIndex(m_entries.size()-1,VisibleColumn+1)); return true; default: return false; @@ -612,6 +679,124 @@ return false; } +bool Scene::dropMimeData(const QMimeData * /*data*/, + Qt::DropAction /*action*/, + int /*row*/, + int /*column*/, + const QModelIndex &parent) +{ + //gets the moving items + QList items; + QList 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(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(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; } @@ -630,19 +815,19 @@ QItemSelection Scene::createSelection(int i) { - return QItemSelection(this->createIndex(i, 0), - this->createIndex(i, LastColumn)); + return QItemSelection(index_map.keys(i).at(0), + index_map.keys(i).at(4)); } QItemSelection Scene::createSelectionAll() { - return QItemSelection(this->createIndex(0, 0), - this->createIndex(m_entries.size() - 1 , LastColumn)); + return QItemSelection(index_map.keys(0).at(0), + index_map.keys(m_entries.size() - 1).at(4)); } void Scene::itemChanged() { - Scene_item* item = qobject_cast(sender()); + CGAL::Three::Scene_item* item = qobject_cast(sender()); if(item) itemChanged(item); } @@ -654,9 +839,10 @@ Q_EMIT dataChanged(this->createIndex(i, 0), this->createIndex(i, LastColumn)); + // Q_EMIT restoreCollapsedState(); } -void Scene::itemChanged(Scene_item* /* item */) +void Scene::itemChanged(CGAL::Three::Scene_item* /* item */) { Q_EMIT dataChanged(this->createIndex(0, 0), this->createIndex(m_entries.size() - 1, LastColumn)); @@ -670,6 +856,7 @@ Q_ASSERT(proxyModel); Scene *scene = dynamic_cast(proxyModel->sourceModel()); Q_ASSERT(scene); + int id = scene->index_map[proxyModel->mapToSource(index)]; switch(index.column()) { case Scene::VisibleColumn: if (event->type() == QEvent::MouseButtonPress) { @@ -678,7 +865,7 @@ 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() ); + model->setData(index, !model->data(index).toBool()); } } return false; //so that the selection can change @@ -721,19 +908,19 @@ break; case Scene::ABColumn: if (event->type() == QEvent::MouseButtonPress) { - if(index.row() == scene->item_B) { - scene->item_A = index.row(); + if(id == scene->item_B) { + scene->item_A = id; scene->item_B = -1; } - else if(index.row() == scene->item_A) { - scene->item_B = index.row(); + else if(id == scene->item_A) { + scene->item_B = id; scene->item_A = -1; } else if(scene->item_A == -1) { - scene->item_A = index.row(); + scene->item_A = id; } else { - scene->item_B = index.row(); + scene->item_B = id; } scene->dataChanged(scene->createIndex(0, Scene::ABColumn), scene->createIndex(scene->rowCount() - 1, Scene::ABColumn)); @@ -748,31 +935,35 @@ 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(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)); + if(test.row()>=0 && test.row()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 } @@ -794,7 +985,7 @@ double dir_y, double dir_z) { - Scene_item* item = this->item(selected_item); + CGAL::Three::Scene_item* item = this->item(selected_item); if(item) item->select(orig_x, orig_y, orig_z, @@ -829,55 +1020,226 @@ Scene::Bbox Scene::bbox() const { if(m_entries.empty()) - return Bbox(); + return Bbox(0,0,0,0,0,0); bool bbox_initialized = false; - Bbox bbox; - Q_FOREACH(Scene_item* item, m_entries) + 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 Scene::group_entries() const +{ + return m_group_entries; +} + +QList 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 list; + for(int i=0; i<5; i++) + { + list<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(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(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(item(getIdFromModelIndex(id))); + if(group) + { + group->setExpanded(false); + } +} + +int Scene::getIdFromModelIndex(QModelIndex modelId)const +{ + return index_map.value(modelId); +} + +QList 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 indices; + QList blacklist; + Q_FOREACH(int id, selectionIndices()){ + CGAL::Three::Scene_group_item* group = + qobject_cast(item(id)); + if(group) + Q_FOREACH(CGAL::Three::Scene_item *item, group->getChildren()) + blacklist<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 -Scene_item* -findItem(const Scene_interface* scene_interface, +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(scene_interface); if(!scene) return 0; - Q_FOREACH(Scene_item* item, scene->entries()) { - Scene_item* ptr = qobject_cast(metaobj.cast(item)); + Q_FOREACH(CGAL::Three::Scene_item* item, scene->entries()) { + CGAL::Three::Scene_item* ptr = qobject_cast(metaobj.cast(item)); if(ptr && ((ptr->*fn)() == name)) return ptr; } return 0; } Q_DECL_EXPORT -QList -findItems(const Scene_interface* scene_interface, +QList +findItems(const CGAL::Three::Scene_interface* scene_interface, + const QMetaObject&, QString name, Scene_item_name_fn_ptr fn) { const Scene* scene = dynamic_cast(scene_interface); - QList list; + QList list; if(!scene) return list; - Q_FOREACH(Scene_item* item, scene->entries()) { - Scene_item* ptr = qobject_cast(item); + Q_FOREACH(CGAL::Three::Scene_item* item, scene->entries()) { + CGAL::Three::Scene_item* ptr = qobject_cast(item); if(ptr && ((ptr->*fn)() == name)) { list << ptr; } diff -Nru cgal-4.7/demo/Polyhedron/Scene_draw_interface.h cgal-4.8/demo/Polyhedron/Scene_draw_interface.h --- cgal-4.7/demo/Polyhedron/Scene_draw_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_draw_interface.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Polyhedron/Scene_edit_polyhedron_item.cpp cgal-4.8/demo/Polyhedron/Scene_edit_polyhedron_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_edit_polyhedron_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_edit_polyhedron_item.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,792 +0,0 @@ -#include "opengl_tools.h" -#include "create_sphere.h" -#include "Scene_edit_polyhedron_item.h" -#include -#include -#include -#include -Scene_edit_polyhedron_item::Scene_edit_polyhedron_item -(Scene_polyhedron_item* poly_item, - Ui::DeformMesh* ui_widget, - QMainWindow* mw) - : Scene_item(19,8), - 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) -{ - 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&)), this, - SLOT(selected(const std::set&))); - - poly_item->set_color_vector_read_only(true); // to prevent recomputation of color vector in invalidate_buffers() - 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 = - 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(); - } - 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(fb->halfedge()->vertex()->id()); - tris[counter*3+1] = static_cast(fb->halfedge()->next()->vertex()->id()); - tris[counter*3+2] = static_cast(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(eb->vertex()->id()); - edges[counter*2+1] = static_cast(eb->opposite()->vertex()->id()); - } - //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(); - - //the spheres : - create_Sphere(length_of_axis/15.0); - invalidate_buffers(); -} - -Scene_edit_polyhedron_item::~Scene_edit_polyhedron_item() -{ - setVisible(false); - while(is_there_any_ctrl_vertices_group()) - { - delete_ctrl_vertices_group(false); - } - if (own_poly_item) delete poly_item; - -} -///////////////////////////// -/// For the Shader gestion/// -void Scene_edit_polyhedron_item::initialize_buffers(Viewer_interface *viewer =0) const -{ - //vao for the facets - { - program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer); - program->bind(); - - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions.data(), - static_cast(positions.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[0].release(); - - buffers[1].bind(); - buffers[1].allocate(normals.data(), - static_cast(normals.size()*sizeof(double))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_DOUBLE,0,3); - buffers[1].release(); - vaos[0]->release(); - program->release(); - } - //vao for the ROI points - { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[1]->bind(); - buffers[2].bind(); - buffers[2].allocate(ROI_points.data(), - static_cast(ROI_points.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[2].release(); - - buffers[3].bind(); - buffers[3].allocate(ROI_color.data(), - static_cast(ROI_color.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[3].release(); - vaos[1]->release(); - - program->release(); - } - - //vao for the edges - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[2]->bind(); - buffers[4].bind(); - buffers[4].allocate(positions.data(), - static_cast(positions.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[4].release(); - - vaos[2]->release(); - program->release(); - } - //vao for the ROI spheres - { - program = getShaderProgram(PROGRAM_INSTANCED, viewer); - program->bind(); - vaos[3]->bind(); - buffers[5].bind(); - buffers[5].allocate(pos_sphere.data(), - static_cast(pos_sphere.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[5].release(); - - buffers[6].bind(); - buffers[6].allocate(normals_sphere.data(), - static_cast(normals_sphere.size()*sizeof(double))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_DOUBLE,0,3); - buffers[6].release(); - - buffers[7].bind(); - buffers[7].allocate(ROI_color.data(), - static_cast(ROI_color.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[7].release(); - - buffers[8].bind(); - buffers[8].allocate(ROI_points.data(), - static_cast(ROI_points.size()*sizeof(double))); - program->enableAttributeArray("center"); - program->setAttributeBuffer("center",GL_DOUBLE,0,3); - buffers[8].release(); - - if(viewer->extension_is_found) - { - viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1); - viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1); - } - vaos[3]->release(); - ROI_color.resize(0); - std::vector(ROI_color).swap(ROI_color); - nb_ROI = ROI_points.size(); - ROI_points.resize(0); - std::vector(ROI_points).swap(ROI_points); - } - //vao for the BBOX - { - bbox_program.bind(); - vaos[4]->bind(); - buffers[9].bind(); - buffers[9].allocate(pos_bbox.data(), - static_cast(pos_bbox.size()*sizeof(double))); - bbox_program.enableAttributeArray("vertex"); - bbox_program.setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[9].release(); - - buffers[10].bind(); - buffers[10].allocate(color_bbox.data(), - static_cast(color_bbox.size()*sizeof(double))); - bbox_program.enableAttributeArray("colors"); - bbox_program.setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[10].release(); - vaos[4]->release(); - nb_bbox = pos_bbox.size(); - pos_bbox.resize(0); - std::vector(pos_bbox).swap(pos_bbox); - color_bbox.resize(0); - std::vector(color_bbox).swap(color_bbox); - bbox_program.release(); - } - //vao for the control points - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[5]->bind(); - buffers[11].bind(); - buffers[11].allocate(control_points.data(), - static_cast(control_points.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[11].release(); - - buffers[12].bind(); - buffers[12].allocate(control_color.data(), - static_cast(control_color.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[12].release(); - vaos[5]->release(); - program->release(); - } - //vao for the control spheres - { - program = getShaderProgram(PROGRAM_INSTANCED, viewer); - program->bind(); - vaos[6]->bind(); - buffers[13].bind(); - buffers[13].allocate(pos_sphere.data(), - static_cast(pos_sphere.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[13].release(); - - buffers[14].bind(); - buffers[14].allocate(normals_sphere.data(), - static_cast(normals_sphere.size()*sizeof(double))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_DOUBLE,0,3); - buffers[14].release(); - - buffers[15].bind(); - buffers[15].allocate(control_color.data(), - static_cast(control_color.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[15].release(); - - buffers[16].bind(); - buffers[16].allocate(control_points.data(), - static_cast(control_points.size()*sizeof(double))); - program->enableAttributeArray("center"); - program->setAttributeBuffer("center",GL_DOUBLE,0,3); - buffers[16].release(); - - if(viewer->extension_is_found) - { - viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1); - viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1); - } - vaos[6]->release(); - nb_sphere = pos_sphere.size(); - pos_sphere.resize(0); - std::vector(pos_sphere).swap(pos_sphere); - normals_sphere.resize(0); - std::vector(normals_sphere).swap(normals_sphere); - control_color.resize(0); - std::vector(control_color).swap(control_color); - nb_control = control_points.size(); - control_points.resize(0); - std::vector(control_points).swap(control_points); - } - //vao for the axis - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - vaos[7]->bind(); - buffers[17].bind(); - buffers[17].allocate(pos_axis.data(), - static_cast(pos_axis.size()*sizeof(double))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[17].release(); - - buffers[18].bind(); - buffers[18].allocate(color_lines.data(), - static_cast(color_lines.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[18].release(); - vaos[7]->release(); - program->release(); - nb_axis = pos_axis.size(); - pos_axis.resize(0); - std::vector(pos_axis).swap(pos_axis); - color_lines.resize(0); - std::vector(color_lines).swap(color_lines); - } - are_buffers_filled = true; -} - -void Scene_edit_polyhedron_item::compute_normals_and_vertices(void) -{ - ROI_points.resize(0); - control_points.resize(0); - control_color.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; iframe == 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::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; - -} - -///////////////////////////////////////////////////////// -/////////// 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(); -} - -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()) { - invalidate_buffers(); - 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(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(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) { Q_EMIT itemChanged(); } - } - - return false; -} - -#include "opengl_tools.h" -void Scene_edit_polyhedron_item::draw_edges(Viewer_interface* viewer) const { - if(!are_buffers_filled) - initialize_buffers(viewer); - vaos[2]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); - program->bind(); - program->setAttributeValue("colors", QColor(0,0,0)); - viewer->glDrawElements(GL_LINES, (GLsizei) edges.size(), GL_UNSIGNED_INT, edges.data()); - program->release(); - vaos[2]->release(); - - if(rendering_mode == Wireframe) { - draw_ROI_and_control_vertices(viewer); - } -} -void Scene_edit_polyhedron_item::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(); - QColor color = this->color(); - program->setAttributeValue("colors", color); - viewer->glDrawElements(GL_TRIANGLES, (GLsizei) tris.size(), GL_UNSIGNED_INT, tris.data()); - program->release(); - vaos[0]->release(); - draw_edges(viewer); - draw_ROI_and_control_vertices(viewer); - - -} - -void Scene_edit_polyhedron_item::draw_ROI_and_control_vertices(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[1]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); - program->bind(); - viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_ROI/3)); - program->release(); - vaos[1]->release(); - } - else{ - vaos[3]->bind(); - program = getShaderProgram(PROGRAM_INSTANCED); - attrib_buffers(viewer,PROGRAM_INSTANCED); - program->bind(); - viewer->glDrawArraysInstanced(GL_TRIANGLES, 0, - static_cast(nb_sphere/3), - static_cast(nb_ROI/3)); - program->release(); - vaos[3]->release(); - } - } - - if(!ui_widget->ShowAsSphereCheckBox->isChecked() || !viewer->extension_is_found) { - vaos[5]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); - program->bind(); - viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_control/3)); - program->release(); - vaos[5]->release(); - } - else{ - vaos[6]->bind(); - program = getShaderProgram(PROGRAM_INSTANCED); - attrib_buffers(viewer,PROGRAM_INSTANCED); - program->bind(); - viewer->glDrawArraysInstanced(GL_TRIANGLES, 0, - static_cast(nb_sphere/3), - static_cast(nb_control/3)); - program->release(); - vaos[6]->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[7]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program->bind(); - program->setUniformValue("f_matrix", f_mat); - viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_axis/3)); - program->release(); - vaos[7]->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); - viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_bbox/3)); - bbox_program.release(); - vaos[4]->release(); - } - } - } - - } - - -void Scene_edit_polyhedron_item::compute_bbox(const 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::invalidate_buffers() -{ - compute_normals_and_vertices(); - update_normals(); - 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; - 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("

Polyhedron %1 (mode: %5, color: %6)

" - "

Number of vertices: %2
" - "Number of edges: %3
" - "Number of facets: %4

") - .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; -} - -void Scene_edit_polyhedron_item::create_Sphere(double R) -{ - create_flat_sphere(R, pos_sphere, normals_sphere); -} - -//#include "Scene_edit_polyhedron_item.moc" diff -Nru cgal-4.7/demo/Polyhedron/Scene_edit_polyhedron_item.h cgal-4.8/demo/Polyhedron/Scene_edit_polyhedron_item.h --- cgal-4.7/demo/Polyhedron/Scene_edit_polyhedron_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_edit_polyhedron_item.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,701 +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 -#include -#include - -#include -#include - -#include -#include -#include - -#include "ui_Deform_mesh.h" -#include -#include -#include -#include -#include - - -typedef Polyhedron::Vertex_handle Vertex_handle; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::in_edge_iterator in_edge_iterator; -typedef boost::graph_traits::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* positions) : positions(positions) {} - std::vector* positions; -}; - - -inline -Array_based_vertex_point_map::value_type -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 - 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 Deform_mesh; - - -typedef Deform_mesh::Point Point; - -/// For storing associated data with a group of control vertices -class Control_vertices_data -{ -public: - std::vector 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 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::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::iterator hb = ctrl_vertices_group.begin(); - for(std::vector::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::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::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::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(Viewer_interface*) const; - void draw_edges(Viewer_interface*) const; - void draw_bbox(const Scene_interface::Bbox&) const; - void draw_ROI_and_control_vertices(Viewer_interface *viewer) 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); - - -public Q_SLOTS: - void invalidate_buffers(); - void selected(const std::set& m) - { - bool any_changes = false; - for(std::set::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) { invalidate_buffers(); 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 -// members -private: - Ui::DeformMesh* ui_widget; - Scene_polyhedron_item* poly_item; - // For drawing - mutable std::vector positions; - mutable std::vector tris; - mutable std::vector edges; - mutable std::vector color_lines; - mutable std::vector color_bbox; - mutable std::vector ROI_points; - mutable std::vector control_points; - mutable std::vector ROI_color; - mutable std::vector control_color; - mutable std::vector normals; - mutable std::vector pos_bbox; - mutable std::vector pos_axis; - mutable std::vector pos_sphere; - mutable std::vector normals_sphere; - 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; - - - - mutable QOpenGLBuffer *in_bu; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_normals_and_vertices(void); - void compute_bbox(const Scene_interface::Bbox&); - void create_Sphere(double); - - - - - Deform_mesh deform_mesh; - typedef std::list 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(); - - invalidate_buffers(); - 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::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::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 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 get_minimum_isolated_component() { - Travel_isolated_components::Minimum_visitor visitor; - Travel_isolated_components().travel - (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 select_isolated_components(std::size_t threshold) { - typedef boost::function_output_iterator Output_iterator; - Output_iterator out(&deform_mesh); - - Travel_isolated_components::Selection_visitor visitor(threshold, out); - Travel_isolated_components().travel - (vertices(*polyhedron()).first, vertices(*polyhedron()).second, - polyhedron()->size_of_vertices(), Is_selected(deform_mesh), visitor); - - if(visitor.any_inserted) { invalidate_buffers(); 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; } - - 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 = - 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(); - - } - } -}; // end class Scene_edit_polyhedron_item - -#endif // SCENE_EDIT_POLYHEDRON_ITEM_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_find_items.h cgal-4.8/demo/Polyhedron/Scene_find_items.h --- cgal-4.7/demo/Polyhedron/Scene_find_items.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_find_items.h 2016-04-04 19:00:12.000000000 +0000 @@ -3,7 +3,7 @@ #include #include -#include "Scene_item.h" // required, to have &Scene_item::name +#include // required, to have &Scene_item::name #include "Scene_config.h" class Scene_interface; @@ -11,24 +11,24 @@ namespace scene { namespace details { -typedef QString (Scene_item ::*Scene_item_name_fn_ptr)() const; +typedef QString (CGAL::Three::Scene_item ::*Scene_item_name_fn_ptr)() const; // Declaration only (defined in Scene.cpp) SCENE_EXPORT -Scene_item* -findItem(const Scene_interface* scene_interface, +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 -findItems(const Scene_interface* scene_interface, +QList +findItems(const CGAL::Three::Scene_interface* scene_interface, const QMetaObject& metaobj, QString name, Scene_item_name_fn_ptr fn); // fwd declaration template -T findItem(const Scene_interface* scene, QString name, +T findItem(const CGAL::Three::Scene_interface* scene, QString name, Scene_item_name_fn_ptr fn) { return @@ -38,14 +38,14 @@ } template -QList findItems(const Scene_interface* scene, QString name, +QList findItems(const CGAL::Three::Scene_interface* scene, QString name, Scene_item_name_fn_ptr fn) { - QList void_list = + QList void_list = findItems(scene, reinterpret_cast(0)->staticMetaObject, name, fn); QList list; - Q_FOREACH(Scene_item* ptr, void_list) { + Q_FOREACH(CGAL::Three::Scene_item* ptr, void_list) { list << qobject_cast(ptr); } return list; @@ -60,25 +60,25 @@ accepted. */ template -T findItem(const Scene_interface* scene, +T findItem(const CGAL::Three::Scene_interface* scene, QString item_name = QString()) -{ return details::findItem(scene, item_name, &Scene_item::name); } +{ return details::findItem(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 -QList findItems(const Scene_interface* scene, +QList findItems(const CGAL::Three::Scene_interface* scene, QString item_name = QString()) -{ return details::findItems(scene, item_name, &Scene_item::name); } +{ return details::findItems(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 -T findItemByObjectName(const Scene_interface* scene, +T findItemByObjectName(const CGAL::Three::Scene_interface* scene, QString obj_name = QString()) { return details::findItem(scene, obj_name, &QObject::objectName); } @@ -87,7 +87,7 @@ names are accepted. */ template -QList findItemsByObjectName(const Scene_interface* scene, +QList findItemsByObjectName(const CGAL::Three::Scene_interface* scene, QString obj_name = QString()) { return details::findItems(scene, obj_name, &QObject::objectName); } diff -Nru cgal-4.7/demo/Polyhedron/Scene_group_item.cpp cgal-4.8/demo/Polyhedron/Scene_group_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_group_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_group_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,116 @@ + +#include +#include + +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( "

Number of children: %1
").arg(children.size()); + str+="

"; + 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(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 -Nru cgal-4.7/demo/Polyhedron/Scene.h cgal-4.8/demo/Polyhedron/Scene.h --- cgal-4.7/demo/Polyhedron/Scene.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,33 +1,36 @@ +//! \file Scene.h #ifndef SCENE_H #define SCENE_H #include "config.h" #include "Scene_config.h" - -#include "Scene_interface.h" -#include "Scene_draw_interface.h" +#include +#include +#include #include -#include +#include #include #include #include +#include #include #include #include #include - +#include #include #include #include - +#include class QEvent; class QMouseEvent; namespace GlSplat { class SplatRenderer; } +namespace CGAL { namespace Three{ class Viewer_interface;}} -class Viewer_interface; class SCENE_EXPORT Scene : - public QAbstractListModel, public Scene_interface, public Scene_draw_interface + public QStandardItemModel, public CGAL::Three::Scene_interface, public CGAL::Three::Scene_draw_interface + { Q_OBJECT Q_PROPERTY(int numberOfEntries READ numberOfEntries) @@ -35,6 +38,8 @@ friend class SceneDelegate; public: + QList getModelIndexFromId(int id) const; + int getIdFromModelIndex(QModelIndex modelId) const; enum Columns { NameColumn = 0, ColorColumn, RenderingModeColumn, @@ -42,54 +47,88 @@ 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); - // 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). + //!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); + + /*! 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; - const QList& entries() const { return m_entries; } - Q_INVOKABLE Scene_item* item(int) const ; - Item_id item_id(Scene_item*) const; + //! @returns the list of items. + const QList& 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. ///@{ - Scene_item* selectedItem() const; - QList selectedItems() const; - QList selectionA() const; - QList selectionB() const; + CGAL::Three::Scene_item* selectedItem() const; + QList selectedItems() const; + QList selectionA() const; + QList selectionB() const; ///@} + //!@returns the currently selected item's index. int mainSelectionIndex() const; + //!@returns the list of currently selected items indices. QList selectionIndices() const; + //!@returns the index of the Item_A int selectionAindex() const; + //!@returns the index of the Item_B int selectionBindex() const; - // initializeGL() is called by Viewer::initializeGL() + /*! Is called by Viewer::initializeGL(). Allows all the initialization + * of OpenGL code that needs a context. + */ void initializeGL(); - // draw() is called by Viewer::draw() + /*! Is called by Viewer::draw(). Is deprecated and does nothing.*/ void draw(); + /*! Is deprecated and does nothing.*/ void drawWithNames(); - void draw(Viewer_interface*); - void drawWithNames(Viewer_interface*); - + /*! 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); - // Get scene bounding box + //!@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(); @@ -99,39 +138,68 @@ 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; + + // 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 group_entries() const ; + QList 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: - // Notify the scene that an item was modified - void itemChanged(); // slots called by items themself + //!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); - void itemChanged(Scene_item*); - + /*! 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); - }; + } - void setSelectedItem(Scene_item* item_to_select) + //! 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(Scene_item* item, m_entries) + Q_FOREACH(CGAL::Three::Scene_item* item, m_entries) { if (item==item_to_select) { @@ -140,45 +208,87 @@ } ++i; } - }; - - void setSelectedItemsList(QList l ) + } + //! Sets the target list of indices as the selected indices. + QList setSelectedItemsList(QList l ) { + Q_FOREACH(int i,l) + { + CGAL::Three::Scene_group_item* group = + qobject_cast(item(i)); + if(group) + { + QList list; + Q_FOREACH(CGAL::Three::Scene_item* child, group->getChildren()) + list<update();} private: - void draw_aux(bool with_names, Viewer_interface*); - typedef QList Entries; + /*! 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 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 m_group_entries; + //!List of indices of the currently selected items. QList 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 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: @@ -188,17 +298,28 @@ 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 -Nru cgal-4.7/demo/Polyhedron/Scene_implicit_function_item.cpp cgal-4.8/demo/Polyhedron/Scene_implicit_function_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_implicit_function_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_implicit_function_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -6,7 +6,7 @@ #include #include "Color_ramp.h" -#include +#include #include @@ -16,7 +16,7 @@ return !CGAL::Is_valid()( d ); } -void Scene_implicit_function_item::initialize_buffers(Viewer_interface *viewer = 0) const +void Scene_implicit_function_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const { if(GLuint(-1) == textureId) { viewer->glGenTextures(1, &textureId); @@ -26,61 +26,59 @@ { program = getShaderProgram(PROGRAM_WITH_TEXTURE, viewer); program->bind(); - vaos[0]->bind(); + vaos[Plane]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_tex_quad.data(), + buffers[Quad_vertices].bind(); + buffers[Quad_vertices].allocate(positions_tex_quad.data(), static_cast(positions_tex_quad.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[0].release(); + buffers[Quad_vertices].release(); - buffers[1].bind(); - buffers[1].allocate(texture_map.data(), + buffers[TexMap].bind(); + buffers[TexMap].allocate(texture_map.data(), static_cast(texture_map.size()*sizeof(float))); program->enableAttributeArray("v_texCoord"); program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2); - buffers[1].release(); - program->setAttributeValue("normal", QVector3D(0,0,0)); + buffers[TexMap].release(); + program->setAttributeValue("normal", QVector3D(0.f,0.f,0.f)); program->release(); - vaos[0]->release(); + vaos[Plane]->release(); } //vao fot the bbox { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[1]->bind(); + vaos[BBox]->bind(); - buffers[2].bind(); - buffers[2].allocate(positions_cube.data(), + buffers[Cube_vertices].bind(); + buffers[Cube_vertices].allocate(positions_cube.data(), static_cast(positions_cube.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[2].release(); + buffers[Cube_vertices].release(); - program->setAttributeValue("colors", QVector3D(0,0,0)); program->release(); - vaos[1]->release(); + vaos[BBox]->release(); } //vao fot the grid { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[2]->bind(); + vaos[Grid]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_grid.data(), + buffers[Grid_vertices].bind(); + buffers[Grid_vertices].allocate(positions_grid.data(), static_cast(positions_grid.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[3].release(); - program->setAttributeValue("colors", QVector3D(0.6f, 0.6f, 0.6f)); + buffers[Grid_vertices].release(); program->release(); - vaos[2]->release(); + vaos[Grid]->release(); } @@ -341,7 +339,7 @@ Scene_implicit_function_item:: Scene_implicit_function_item(Implicit_function_interface* f) - :Scene_item(4,3) + :CGAL::Three::Scene_item(4,3) , function_(f) , frame_(new ManipulatedFrame()) , need_update_(true) @@ -355,9 +353,8 @@ 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; @@ -367,7 +364,7 @@ frame_->setOrientation(1., 0, 0, 0); connect(frame_, SIGNAL(modified()), this, SLOT(plane_was_moved())); - invalidate_buffers(); + invalidateOpenGLBuffers(); } @@ -379,14 +376,14 @@ } -Scene_implicit_function_item::Bbox -Scene_implicit_function_item::bbox() const +void +Scene_implicit_function_item::compute_bbox() const { - return function_->bbox(); + _bbox = function_->bbox(); } void -Scene_implicit_function_item::draw(Viewer_interface* viewer) const +Scene_implicit_function_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) initialize_buffers(viewer); @@ -397,7 +394,7 @@ need_update_ = false; } } - vaos[0]->bind(); + vaos[Plane]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); attrib_buffers(viewer, PROGRAM_WITH_TEXTURE); @@ -411,37 +408,39 @@ program = getShaderProgram(PROGRAM_WITH_TEXTURE); program->bind(); program->setUniformValue("f_matrix", f_mat); - program->setUniformValue("light_amb", QVector4D(1.0,1.0,1.0,1.0)); - program->setUniformValue("light_diff", QVector4D(0,0,0,1)); - program->setAttributeValue("color_facets", QVector3D(1.0,1.0,1.0)); + 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(positions_tex_quad.size()/3)); - vaos[0]->release(); + vaos[Plane]->release(); program->release(); } void -Scene_implicit_function_item::draw_edges(Viewer_interface* viewer) const +Scene_implicit_function_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) initialize_buffers(viewer); // draw_aux(viewer, true); - vaos[1]->bind(); + 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(positions_cube.size()/3)); - vaos[1]->release(); - vaos[2]->bind(); + 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] = GLfloat(d_mat[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(positions_grid.size()/3)); - vaos[2]->release(); + vaos[Grid]->release(); program->release(); } @@ -537,7 +536,7 @@ } // Update - const_cast(this)->invalidate_buffers(); + const_cast(this)->invalidateOpenGLBuffers(); } @@ -575,22 +574,20 @@ } void -Scene_implicit_function_item::invalidate_buffers() +Scene_implicit_function_item::invalidateOpenGLBuffers() { - Scene_item::invalidate_buffers(); + Scene_item::invalidateOpenGLBuffers(); + compute_bbox(); compute_vertices_and_texmap(); are_buffers_filled = false; } -void Scene_implicit_function_item::contextual_changed() -{ - if(!frame_->isManipulated()) { - if(need_update_) { - compute_function_grid(); - compute_vertices_and_texmap(); - need_update_ = 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 -Nru cgal-4.7/demo/Polyhedron/Scene_implicit_function_item.h cgal-4.8/demo/Polyhedron/Scene_implicit_function_item.h --- cgal-4.7/demo/Polyhedron/Scene_implicit_function_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_implicit_function_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,8 +1,8 @@ #ifndef SCENE_IMPLICIT_FUNCTION_ITEM_H #define SCENE_IMPLICIT_FUNCTION_ITEM_H -#include -#include +#include +#include #include "Scene_implicit_function_item_config.h" #include "implicit_functions/Implicit_function_interface.h" #include "Color_ramp.h" @@ -38,7 +38,7 @@ }; class SCENE_IMPLICIT_FUNCTION_ITEM_EXPORT Scene_implicit_function_item - : public Scene_item + : public CGAL::Three::Scene_item { Q_OBJECT @@ -52,7 +52,7 @@ bool isFinite() const { return true; } bool isEmpty() const { return false; } - Bbox bbox() const; + void compute_bbox() const; Scene_implicit_function_item* clone() const { return NULL; } @@ -65,15 +65,15 @@ // actually draw() is also overloaded to detect when the cut plane is moved virtual void draw()const {} - virtual void draw(Viewer_interface*) const; - virtual void draw_edges(Viewer_interface*) const; + virtual void draw(CGAL::Three::Viewer_interface*) const; + virtual void draw_edges(CGAL::Three::Viewer_interface*) const; virtual QString toolTip() const; - virtual void contextual_changed(); - virtual void invalidate_buffers(); + 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; @@ -93,6 +93,20 @@ 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 positions_cube; std::vector positions_grid; std::vector positions_tex_quad; @@ -107,8 +121,8 @@ GLuint vao; GLuint buffer[4]; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; + 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); }; diff -Nru cgal-4.7/demo/Polyhedron/Scene_item_config.h cgal-4.8/demo/Polyhedron/Scene_item_config.h --- cgal-4.7/demo/Polyhedron/Scene_item_config.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_item_config.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#ifndef SCENE_ITEM_CONFIG_H -#define SCENE_ITEM_CONFIG_H - -#include - -#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 -Nru cgal-4.7/demo/Polyhedron/Scene_item.cpp cgal-4.8/demo/Polyhedron/Scene_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,24 +1,24 @@ -#include "Scene_item.h" -#include "Scene_interface.h" +#include +#include #include #include #include -#include "Viewer_interface.h" -const QColor Scene_item::defaultColor = QColor(100, 100, 255); +#include +const QColor CGAL::Three::Scene_item::defaultColor = QColor(100, 100, 255); -Scene_item::~Scene_item() { - delete defaultContextMenu; - for(int i=0; idestroy(); - } +CGAL::Three::Scene_item::~Scene_item() { + delete defaultContextMenu; + for(int i=0; isetTitle(name()); @@ -92,7 +92,7 @@ { if(!supportsRenderingMode(RenderingMode(mode))) continue; QString mName = modeName(RenderingMode(mode)); - defaultContextMenu->addAction(tr("Set %1 mode") + defaultContextMenu->addAction(tr("Set %1 Mode") .arg(mName), this, slotName(RenderingMode(mode))); @@ -101,12 +101,12 @@ return defaultContextMenu; } -void Scene_item::invalidate_buffers() {} +void CGAL::Three::Scene_item::invalidateOpenGLBuffers() {} -void Scene_item::selection_changed(bool) {} +void CGAL::Three::Scene_item::selection_changed(bool) {} -void Scene_item::select(double /*orig_x*/, +void CGAL::Three::Scene_item::select(double /*orig_x*/, double /*orig_y*/, double /*orig_z*/, double /*dir_x*/, @@ -116,276 +116,50 @@ } // set-up the uniform attributes of the shader programs. -void Scene_item::attrib_buffers(Viewer_interface* viewer, int program_name) const +void CGAL::Three::Scene_item::attrib_buffers(CGAL::Three::Viewer_interface* viewer, + 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]; - 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]); - for (int i=0; i<16; ++i) - pick_mat.data()[i] = viewer->pickMatrix_[i]; - - mvp_mat = pick_mat * mvp_mat; - - viewer->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); - QColor temp = this->color(); - switch(program_name) - { - case PROGRAM_WITH_LIGHT: - shader_programs[PROGRAM_WITH_LIGHT]->bind(); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("mv_matrix", mv_mat); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("light_pos", position); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("light_diff",diffuse); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("light_spec", specular); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("light_amb", ambient); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("spec_power", 51.8f); - shader_programs[PROGRAM_WITH_LIGHT]->setUniformValue("is_two_side", is_both_sides); - shader_programs[PROGRAM_WITH_LIGHT]->release(); - break; - case PROGRAM_WITHOUT_LIGHT: - shader_programs[PROGRAM_WITHOUT_LIGHT]->bind(); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("mv_matrix", mv_mat); - - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("light_pos", position); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("light_diff", diffuse); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("light_spec", specular); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("light_amb", ambient); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("spec_power", 51.8f); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("is_two_side", is_both_sides); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setAttributeValue("normals", 0.0,0.0,0.0); - shader_programs[PROGRAM_WITHOUT_LIGHT]->setUniformValue("f_matrix",f_mat); - - - shader_programs[PROGRAM_WITHOUT_LIGHT]->release(); - break; - case PROGRAM_WITH_TEXTURE: - if(is_selected) - { - - shader_programs[PROGRAM_WITH_TEXTURE]->setAttributeValue("color_facets", temp.lighter(120).redF(),temp.lighter(120).greenF(), temp.lighter(120).blueF()); - } - else - { - shader_programs[PROGRAM_WITH_TEXTURE]->setAttributeValue("color_facets", temp.redF(),temp.greenF(), temp.blueF()); - } - - shader_programs[PROGRAM_WITH_TEXTURE]->bind(); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("mv_matrix", mv_mat); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("light_pos", position); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("light_diff",diffuse); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("light_spec", specular); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("light_amb", ambient); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("spec_power", 51.8f); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("s_texture",0); - shader_programs[PROGRAM_WITH_TEXTURE]->setUniformValue("f_matrix",f_mat); - - - shader_programs[PROGRAM_WITH_TEXTURE]->release(); - break; - case PROGRAM_WITH_TEXTURED_EDGES: - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->bind(); - if(is_selected) - { - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->setUniformValue("color_lines",QVector3D(0.0,0.0,0.0)); - } - else - { - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->setUniformValue("color_lines", QVector3D(temp.lighter(50).redF(), temp.lighter(50).greenF(), temp.lighter(50).blueF())); - - } - - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->setUniformValue("s_texture",0); - shader_programs[PROGRAM_WITH_TEXTURED_EDGES]->release(); - break; - case PROGRAM_INSTANCED: - - shader_programs[PROGRAM_INSTANCED]->bind(); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("mv_matrix", mv_mat); - - shader_programs[PROGRAM_INSTANCED]->setUniformValue("light_pos", position); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("light_diff",diffuse); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("light_spec", specular); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("light_amb", ambient); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("spec_power", 51.8f); - shader_programs[PROGRAM_INSTANCED]->setUniformValue("is_two_side", is_both_sides); - shader_programs[PROGRAM_INSTANCED]->release(); - - break; - case PROGRAM_INSTANCED_WIRE: - shader_programs[PROGRAM_INSTANCED_WIRE]->bind(); - shader_programs[PROGRAM_INSTANCED_WIRE]->setUniformValue("mvp_matrix", mvp_mat); - shader_programs[PROGRAM_INSTANCED_WIRE]->release(); - break; + 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* Scene_item::getShaderProgram(int name, Viewer_interface * viewer) const +QOpenGLShaderProgram* CGAL::Three::Scene_item::getShaderProgram(int name, CGAL::Three::Viewer_interface * viewer) const { - switch(name) - { - case PROGRAM_WITH_LIGHT: - if(shader_programs[PROGRAM_WITH_LIGHT]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f")) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_WITH_LIGHT] = program; - return program; - } - break; - case PROGRAM_WITHOUT_LIGHT: - if( shader_programs[PROGRAM_WITHOUT_LIGHT]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f")) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_WITHOUT_LIGHT] = program; - return program; - } - break; - case PROGRAM_WITH_TEXTURE: - if( shader_programs[PROGRAM_WITH_TEXTURE]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_texture.f")) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_WITH_TEXTURE] = program; - return program; - } - break; - case PROGRAM_WITH_TEXTURED_EDGES: - if( shader_programs[PROGRAM_WITH_TEXTURED_EDGES]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_textured_edges.f" )) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_WITH_TEXTURED_EDGES] = program; - return program; - - } - break; - case PROGRAM_INSTANCED: - if( shader_programs[PROGRAM_INSTANCED]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f" )) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_INSTANCED] = program; - return program; - - } - break; - case PROGRAM_INSTANCED_WIRE: - if( shader_programs[PROGRAM_INSTANCED_WIRE]) - { - return 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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f" )) - { - std::cerr<<"adding fragment shader FAILED"<link(); - shader_programs[PROGRAM_INSTANCED_WIRE] = program; - return program; + if(viewer == 0) + viewer = dynamic_cast(*QGLViewer::QGLViewerPool().begin()); + return viewer->getShaderProgram(name); +} - } - break; - default: - std::cerr<<"ERROR : Program not found."< -#include -#include -#include -#include -#include -#include -#include -#define PROGRAM_WITH_LIGHT 0 -#define PROGRAM_WITHOUT_LIGHT 1 -#define PROGRAM_WITH_TEXTURE 2 -#define PROGRAM_WITH_TEXTURED_EDGES 3 -#define PROGRAM_INSTANCED 4 -#define PROGRAM_INSTANCED_WIRE 5 - - -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), - are_buffers_filled(false), - rendering_mode(FlatPlusEdges), - defaultContextMenu(0), - buffersSize(20), - vaosSize(10) - { - - nbVaos = 0; - for(int i=0; icreate(); - } - - for(int i=0; icreate(); - } - - for(int i=0; i buffers; - //not allowed to use vectors of VAO for some reason - //mutable QOpenGLVertexArrayObject vaos[10]; - QMap vaos; - int nbVaos; - void addVaos(int i) - { - QOpenGLVertexArrayObject* n_vao = new QOpenGLVertexArrayObject(); - vaos[i] = n_vao; - nbVaos ++; - } - - - mutable QMap shader_programs; - QOpenGLShaderProgram* getShaderProgram(int , Viewer_interface *viewer = 0) const; - - int vertexLoc; - int normalLoc; - int colorLoc; - - virtual void initialize_buffers(){} - virtual void compute_elements(){} - virtual void attrib_buffers(Viewer_interface*, int program_name) const; - - - -}; // end class Scene_item - - -#include -Q_DECLARE_METATYPE(Scene_item*) - -#endif // SCENE_ITEM_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_nef_polyhedron_item.cpp cgal-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_nef_polyhedron_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -48,7 +48,7 @@ GLdouble coords[3]; }; Scene_nef_polyhedron_item::Scene_nef_polyhedron_item() - : Scene_item(7,3), + : Scene_item(NbOfVbos,NbOfVaos), nef_poly(new Nef_polyhedron) { is_selected = true; @@ -58,7 +58,7 @@ } Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(Nef_polyhedron* const p) - : Scene_item(7,3), + : Scene_item(NbOfVbos,NbOfVaos), nef_poly(p) { is_selected = true; @@ -68,7 +68,7 @@ } Scene_nef_polyhedron_item::Scene_nef_polyhedron_item(const Nef_polyhedron& p) - : Scene_item(7,3), + : Scene_item(NbOfVbos,NbOfVaos), nef_poly(new Nef_polyhedron(p)) { is_selected = true; @@ -82,37 +82,30 @@ delete nef_poly; } -void Scene_nef_polyhedron_item::initialize_buffers(Viewer_interface *viewer) const +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[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_facets.data(), + vaos[Facets]->bind(); + buffers[Facets_vertices].bind(); + buffers[Facets_vertices].allocate(positions_facets.data(), static_cast(positions_facets.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[0].release(); + buffers[Facets_vertices].release(); - buffers[1].bind(); - buffers[1].allocate(normals.data(), + buffers[Facets_normals].bind(); + buffers[Facets_normals].allocate(normals.data(), static_cast(normals.size()*sizeof(double))); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_DOUBLE,0,3); - buffers[1].release(); + buffers[Facets_normals].release(); - buffers[2].bind(); - buffers[2].allocate(color_facets.data(), - static_cast(color_facets.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[2].release(); - vaos[0]->release(); nb_facets = positions_facets.size(); positions_facets.resize(0); std::vector(positions_facets).swap(positions_facets); @@ -120,8 +113,6 @@ normals.resize(0); std::vector(normals).swap(normals); - color_facets.resize(0); - std::vector(color_facets).swap(color_facets); program->release(); } @@ -130,30 +121,19 @@ program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[1]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_lines.data(), + vaos[Edges]->bind(); + buffers[Edges_vertices].bind(); + buffers[Edges_vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[3].release(); + buffers[Edges_vertices].release(); - - buffers[4].bind(); - buffers[4].allocate(color_lines.data(), - static_cast(color_lines.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[4].release(); - nb_lines = positions_lines.size(); positions_lines.resize(0); std::vector(positions_lines).swap(positions_lines); - - color_lines.resize(0); - std::vector(color_lines).swap(color_lines); - vaos[1]->release(); + vaos[Edges]->release(); program->release(); } //vao for the points @@ -161,43 +141,28 @@ program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[2]->bind(); - buffers[5].bind(); - buffers[5].allocate(positions_points.data(), + vaos[Points]->bind(); + buffers[Points_vertices].bind(); + buffers[Points_vertices].allocate(positions_points.data(), static_cast(positions_points.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[5].release(); - + buffers[Points_vertices].release(); - - buffers[6].bind(); - buffers[6].allocate(color_points.data(), - static_cast(color_points.size()*sizeof(double))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_DOUBLE,0,3); - buffers[6].release(); - - vaos[2]->release(); + vaos[Points]->release(); nb_points = positions_points.size(); positions_points.resize(0); std::vector(positions_points).swap(positions_points); - - color_points.resize(0); - std::vector(color_points).swap(color_points); program->release(); } are_buffers_filled = true; } -void Scene_nef_polyhedron_item::compute_normals_and_vertices(void) +void Scene_nef_polyhedron_item::compute_normals_and_vertices(void) const { int count = 0; positions_facets.resize(0); positions_points.resize(0); - color_lines.resize(0); - color_facets.resize(0); - color_points.resize(0); normals.resize(0); positions_lines.resize(0); //The Facets @@ -314,36 +279,6 @@ normals.push_back(normal[1]); normals.push_back(normal[2]); - if(is_selected) - { - color_facets.push_back(this->color().lighter(120).redF()); - color_facets.push_back(this->color().lighter(120).greenF()); - color_facets.push_back(this->color().lighter(120).blueF()); - - color_facets.push_back(this->color().lighter(120).redF()); - color_facets.push_back(this->color().lighter(120).greenF()); - color_facets.push_back(this->color().lighter(120).blueF()); - - color_facets.push_back(this->color().lighter(120).redF()); - color_facets.push_back(this->color().lighter(120).greenF()); - color_facets.push_back(this->color().lighter(120).blueF()); - } - else - { - color_facets.push_back(this->color().redF()); - color_facets.push_back(this->color().greenF()); - color_facets.push_back(this->color().blueF()); - - color_facets.push_back(this->color().redF()); - color_facets.push_back(this->color().greenF()); - color_facets.push_back(this->color().blueF()); - - color_facets.push_back(this->color().redF()); - color_facets.push_back(this->color().greenF()); - color_facets.push_back(this->color().blueF()); - - } - } } } @@ -372,26 +307,7 @@ positions_lines.push_back(CGAL::to_double(b.y())); positions_lines.push_back(CGAL::to_double(b.z())); - if(is_selected) - { - 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()); - } - else - { - color_lines.push_back(0.0); - color_lines.push_back(0.0); - color_lines.push_back(0.0); - - color_lines.push_back(0.0); - color_lines.push_back(0.0); - color_lines.push_back(0.0); - } + } } //The points @@ -436,7 +352,7 @@ // Polyhedron poly; // in >> poly; // *nef_poly = Nef_polyhedron(poly); - invalidate_buffers(); + invalidateOpenGLBuffers(); return (bool) in; } @@ -451,7 +367,7 @@ Scene_nef_polyhedron_item::load(std::istream& in) { in >> *nef_poly; - invalidate_buffers(); + invalidateOpenGLBuffers(); return (bool) in; } @@ -483,18 +399,22 @@ .arg(nef_poly->number_of_volumes()); } -void Scene_nef_polyhedron_item::draw(Viewer_interface* viewer) const +void Scene_nef_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) + { + compute_normals_and_vertices(); initialize_buffers(viewer); - vaos[0]->bind(); + } + 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(nb_facets/3)); - vaos[0]->release(); + vaos[Facets]->release(); program->release(); GLfloat point_size; viewer->glGetFloatv(GL_POINT_SIZE, &point_size); @@ -504,17 +424,20 @@ viewer->glPointSize(point_size); } -void Scene_nef_polyhedron_item::draw_edges(Viewer_interface* viewer) const +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[1]->bind(); + vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); attrib_buffers(viewer ,PROGRAM_WITHOUT_LIGHT); program->bind(); viewer->glDrawArrays(GL_LINES,0,static_cast(nb_lines/3)); - vaos[1]->release(); + vaos[Edges]->release(); program->release(); if(renderingMode() == PointsPlusNormals) { @@ -526,16 +449,20 @@ viewer->glPointSize(point_size); } } -void Scene_nef_polyhedron_item::draw_points(Viewer_interface* viewer) const +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[2]->bind(); + } + 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(nb_points/3)); - vaos[2]->release(); + vaos[Points]->release(); program->release(); } @@ -551,17 +478,20 @@ return (nef_poly == 0) || nef_poly->is_empty(); } -Scene_nef_polyhedron_item::Bbox -Scene_nef_polyhedron_item::bbox() const { +void +Scene_nef_polyhedron_item::compute_bbox() const { if(isEmpty()) - return Bbox(); + { + _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(); } - return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), + _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); } @@ -725,18 +655,17 @@ from_exact(P, *poly); Scene_polyhedron_item *spoly = new Scene_polyhedron_item(poly); convex_parts.push_back(spoly); - spoly->invalidate_buffers(); + spoly->invalidateOpenGLBuffers(); } } } void Scene_nef_polyhedron_item:: -invalidate_buffers() +invalidateOpenGLBuffers() { - // init(); - Base::invalidate_buffers(); - compute_normals_and_vertices(); + compute_bbox(); + Base::invalidateOpenGLBuffers(); are_buffers_filled = false; } void @@ -744,9 +673,6 @@ { if(p_is_selected != is_selected) - { is_selected = p_is_selected; - invalidate_buffers(); - } } diff -Nru cgal-4.7/demo/Polyhedron/Scene_nef_polyhedron_item.h cgal-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.h --- cgal-4.7/demo/Polyhedron/Scene_nef_polyhedron_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_nef_polyhedron_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef SCENE_NEF_POLYHEDRON_ITEM_H #define SCENE_NEF_POLYHEDRON_ITEM_H -#include "Scene_item.h" +#include #include "Scene_nef_polyhedron_item_config.h" #include "Nef_type_fwd.h" #include @@ -8,7 +8,7 @@ class Scene_polyhedron_item; class SCENE_NEF_POLYHEDRON_ITEM_EXPORT Scene_nef_polyhedron_item - : public Scene_item + : public CGAL::Three::Scene_item { Q_OBJECT public: @@ -26,22 +26,22 @@ QFont font() const; QString toolTip() const; - virtual void invalidate_buffers(); + 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(Viewer_interface*) const; + virtual void draw(CGAL::Three::Viewer_interface*) const; virtual void draw_edges() const {} - virtual void draw_edges(Viewer_interface* viewer) const; - virtual void draw_points(Viewer_interface*) 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; - Bbox bbox() const; + void compute_bbox() const; Nef_polyhedron* nef_polyhedron(); const Nef_polyhedron* nef_polyhedron() const; @@ -74,6 +74,19 @@ 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 positions_lines; mutable std::vector positions_facets; @@ -88,9 +101,9 @@ mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_normals_and_vertices(void); + 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(); diff -Nru cgal-4.7/demo/Polyhedron/Scene_plane_item.cpp cgal-4.8/demo/Polyhedron/Scene_plane_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_plane_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_plane_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -2,29 +2,29 @@ -void Scene_plane_item::initialize_buffers(Viewer_interface *viewer) const +void Scene_plane_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer) const { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[0]->bind(); + vaos[Facets]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_quad.data(), + buffers[Facets_vertices].bind(); + buffers[Facets_vertices].allocate(positions_quad.data(), static_cast(positions_quad.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[0].release(); - vaos[0]->release(); + buffers[Facets_vertices].release(); + vaos[Facets]->release(); - vaos[1]->bind(); - buffers[1].bind(); - buffers[1].allocate(positions_lines.data(), + vaos[Edges]->bind(); + buffers[Edges_vertices].bind(); + buffers[Edges_vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[1].release(); - vaos[1]->release(); + buffers[Edges_vertices].release(); + vaos[Edges]->release(); program->release(); are_buffers_filled = true; @@ -91,11 +91,11 @@ } } -void Scene_plane_item::draw(Viewer_interface* viewer)const +void Scene_plane_item::draw(CGAL::Three::Viewer_interface* viewer)const { if(!are_buffers_filled) initialize_buffers(viewer); - vaos[0]->bind(); + vaos[Facets]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); QMatrix4x4 f_matrix; @@ -104,17 +104,18 @@ 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(positions_quad.size()/3)); program->release(); - vaos[0]->release(); + vaos[Facets]->release(); } -void Scene_plane_item::draw_edges(Viewer_interface* viewer)const +void Scene_plane_item::draw_edges(CGAL::Three::Viewer_interface* viewer)const { if(!are_buffers_filled) initialize_buffers(viewer); - vaos[1]->bind(); + vaos[Edges]->bind(); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); QMatrix4x4 f_matrix; @@ -125,5 +126,5 @@ program->setAttributeValue("colors",QVector3D(0,0,0)); viewer->glDrawArrays(GL_LINES, 0, static_cast(positions_lines.size()/3)); program->release(); - vaos[1]->release(); + vaos[Edges]->release(); } diff -Nru cgal-4.7/demo/Polyhedron/Scene_plane_item.h cgal-4.8/demo/Polyhedron/Scene_plane_item.h --- cgal-4.7/demo/Polyhedron/Scene_plane_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_plane_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -2,14 +2,14 @@ #define SCENE_PLANE_ITEM_H -#include "Scene_item.h" -#include "Scene_interface.h" +#include +#include #include "Scene_basic_objects_config.h" #include #include -#include +#include #include @@ -18,14 +18,14 @@ typedef Kernel_epic::Plane_3 Plane_3; class SCENE_BASIC_OBJECTS_EXPORT Scene_plane_item - : public Scene_item + : public CGAL::Three::Scene_item { Q_OBJECT public: typedef qglviewer::ManipulatedFrame ManipulatedFrame; - Scene_plane_item(const Scene_interface* scene_interface) - :Scene_item(2,2), + Scene_plane_item(const CGAL::Three::Scene_interface* scene_interface) + :CGAL::Three::Scene_item(NbOfVbos,NbOfVaos), scene(scene_interface), manipulable(false), can_clone(true), @@ -33,16 +33,17 @@ { setNormal(0., 0., 1.); //Generates an integer which will be used as ID for each buffer - invalidate_buffers(); + invalidateOpenGLBuffers(); } ~Scene_plane_item() { + frame = 0; delete frame; } bool isFinite() const { return false; } bool isEmpty() const { return false; } - Bbox bbox() const { return Bbox(); } + void compute_bbox() const { _bbox = Bbox(); } bool manipulatable() const { return manipulable; @@ -92,10 +93,10 @@ // Indicate if rendering mode is supported bool supportsRenderingMode(RenderingMode m) const { - return (m == Wireframe || m == Flat); + return (m == Wireframe || m == Flat || m == FlatPlusEdges); } - virtual void draw(Viewer_interface*) const; - virtual void draw_edges(Viewer_interface* viewer)const; + 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 = @@ -116,10 +117,11 @@ } public Q_SLOTS: - virtual void invalidate_buffers() + virtual void invalidateOpenGLBuffers() { compute_normals_and_vertices(); are_buffers_filled = false; + compute_bbox(); } void setPosition(float x, float y, float z) { @@ -131,11 +133,15 @@ } void setNormal(float x, float y, float z) { - frame->setOrientation(x, y, z, 0.f); + 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) { - frame->setOrientation((float)x, (float)y, (float)z, 0.f); + setNormal((float)x, (float)y, (float)z); } void setClonable(bool b = true) { @@ -145,20 +151,31 @@ void setManipulatable(bool b = true) { manipulable = b; } -private: - const Scene_interface* scene; +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 positions_lines; mutable std::vector positions_quad; mutable GLint sampler_location; mutable bool smooth_shading; mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface*)const; + using CGAL::Three::Scene_item::initialize_buffers; + void initialize_buffers(CGAL::Three::Viewer_interface*)const; void compute_normals_and_vertices(void); }; diff -Nru cgal-4.7/demo/Polyhedron/Scene_points_with_normal_item.cpp cgal-4.8/demo/Polyhedron/Scene_points_with_normal_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_points_with_normal_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_points_with_normal_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -2,6 +2,8 @@ #include "Polyhedron_type.h" #include +#include +#include #include #include #include @@ -9,12 +11,13 @@ #include #include -#include "Viewer_interface.h" +#include #include #include #include #include +#include #include #include @@ -23,7 +26,7 @@ Scene_points_with_normal_item::Scene_points_with_normal_item() - : Scene_item(3,3), + : Scene_item(NbOfVbos,NbOfVaos), m_points(new Point_set), m_has_normals(false) { @@ -36,7 +39,7 @@ // Copy constructor Scene_points_with_normal_item::Scene_points_with_normal_item(const Scene_points_with_normal_item& toCopy) - : Scene_item(3,3), // do not call superclass' copy constructor + :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) { @@ -53,12 +56,12 @@ nb_points = 0; nb_selected_points = 0; nb_lines = 0; - invalidate_buffers(); + invalidateOpenGLBuffers(); } // Converts polyhedron to point set Scene_points_with_normal_item::Scene_points_with_normal_item(const Polyhedron& input_mesh) - : Scene_item(6,3), + : Scene_item(NbOfVbos,NbOfVaos), m_points(new Point_set), m_has_normals(true) { @@ -76,11 +79,11 @@ } setRenderingMode(PointsPlusNormals); - is_selected = true; - nb_points = 0; - nb_selected_points = 0; - nb_lines = 0; - invalidate_buffers(); + is_selected = true; + nb_points = 0; + nb_selected_points = 0; + nb_lines = 0; + invalidateOpenGLBuffers(); } Scene_points_with_normal_item::~Scene_points_with_normal_item() @@ -91,23 +94,23 @@ -void Scene_points_with_normal_item::initialize_buffers(Viewer_interface *viewer) const +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_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), + vaos[Edges]->bind(); + buffers[Edges_vertices].bind(); + buffers[Edges_vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[0].release(); + buffers[Edges_vertices].release(); - vaos[0]->release(); + vaos[Edges]->release(); nb_lines = positions_lines.size(); positions_lines.resize(0); std::vector(positions_lines).swap(positions_lines); @@ -115,17 +118,17 @@ } //vao for the points { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); - vaos[1]->bind(); - buffers[1].bind(); - buffers[1].allocate(positions_points.data(), + vaos[ThePoints]->bind(); + buffers[Points_vertices].bind(); + buffers[Points_vertices].allocate(positions_points.data(), static_cast(positions_points.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[1].release(); - vaos[1]->release(); + buffers[Points_vertices].release(); + vaos[ThePoints]->release(); nb_points = positions_points.size(); positions_points.resize(0); std::vector(positions_points).swap(positions_points); @@ -133,18 +136,18 @@ } //vao for the selected points { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); - vaos[2]->bind(); - buffers[2].bind(); - buffers[2].allocate(positions_selected_points.data(), + vaos[Selected_points]->bind(); + buffers[Selected_points_vertices].bind(); + buffers[Selected_points_vertices].allocate(positions_selected_points.data(), static_cast(positions_selected_points.size()*sizeof(double))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_DOUBLE,0,3); - buffers[2].release(); + buffers[Selected_points_vertices].release(); - vaos[2]->release(); + vaos[Selected_points]->release(); nb_selected_points = positions_selected_points.size(); positions_selected_points.resize(0); std::vector(positions_selected_points).swap(positions_selected_points); @@ -163,93 +166,52 @@ 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 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 - if (m_points->nb_selected_points()< m_points->size()) - { - - for (Point_set_3::const_iterator it = m_points->begin(); it != m_points->end(); it++) - { - const UI_point& p = *it; - if ( ! p.is_selected() ) - { - positions_points.push_back(p.x()); - positions_points.push_back(p.y()); - positions_points.push_back(p.z()); - } - } - - } + for (Point_set_3::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 - if (m_points->nb_selected_points() > 0) - { - for (Point_set_3::const_iterator it = m_points->begin(); it != m_points->end(); it++) - { - const UI_point& p = *it; - if (p.is_selected()) - { - positions_selected_points.push_back(p.x()); - positions_selected_points.push_back(p.y()); - positions_selected_points.push_back(p.z()); - } - } - - } + for (Point_set_3::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 = m_points->region_of_interest(); + Kernel::Sphere_3 region_of_interest = points.region_of_interest(); float normal_length = (float)std::sqrt(region_of_interest.squared_radius() / 1000.); - // Stock normals of *non-selected* points - if (m_points->nb_selected_points() < m_points->size()) - { - // Stock normals - for (Point_set_3::const_iterator it = m_points->begin(); it != m_points->end(); it++) - { - const UI_point& p = *it; - const Point_set_3::Vector& n = p.normal(); - if (!p.is_selected()) - { - Point_set_3::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()); - - } - } - } - - // Stock normals of *selected* points - if (m_points->nb_selected_points() > 0) - { - for (Point_set_3::const_iterator it = m_points->begin(); it != m_points->end(); it++) - { - const UI_point& p = *it; - const Point_set_3::Vector& n = p.normal(); - if (p.is_selected()) - { - Point_set_3::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()); - - - } - } - } + for (Point_set_3::const_iterator it = points.begin(); it != points.end(); it++) + { + const UI_point& p = *it; + const Point_set_3::Vector& n = p.normal(); + Point_set_3::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()); + } } } @@ -279,44 +241,83 @@ std::cerr << "done: " << task_timer.time() << " seconds, " << (memory>>20) << " Mb allocated" << std::endl; - invalidate_buffers(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } // Invert selection void Scene_points_with_normal_item::invertSelection() { - m_points->invert_selection(); - invalidate_buffers(); + m_points->invert_selection(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } // Select everything void Scene_points_with_normal_item::selectAll() { - m_points->select(m_points->begin(), m_points->end(), true); - invalidate_buffers(); + m_points->select_all(); + invalidateOpenGLBuffers(); Q_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); - invalidate_buffers(); + m_points->unselect_all(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } //Select duplicated points void Scene_points_with_normal_item::selectDuplicates() { std::set unique_points; - for (Point_set::Point_iterator ptit=m_points->begin(); ptit!=m_points->end();++ptit ) + for (Point_set::iterator ptit=m_points->begin(); ptit!=m_points->end();++ptit ) if ( !unique_points.insert(*ptit).second ) - m_points->select(&(*ptit)); - invalidate_buffers(); + 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) { @@ -328,7 +329,7 @@ std::back_inserter(*m_points), CGAL::make_normal_of_point_with_normal_pmap(Point_set::value_type())) && !isEmpty(); - invalidate_buffers(); + invalidateOpenGLBuffers(); return ok; } @@ -368,7 +369,7 @@ } } } - invalidate_buffers(); + invalidateOpenGLBuffers(); return ok; } @@ -403,7 +404,7 @@ ( m==PointsPlusNormals || m==Splatting ) ); } -void Scene_points_with_normal_item::draw_splats(Viewer_interface* viewer) const +void Scene_points_with_normal_item::draw_splats(CGAL::Three::Viewer_interface* viewer) const { // TODO add support for selection viewer->glBegin(GL_POINTS); @@ -421,44 +422,56 @@ } -void Scene_points_with_normal_item::draw_edges(Viewer_interface* viewer) const +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[0]->bind(); - program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + 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(nb_lines/3)); - vaos[0]->release(); + viewer->glDrawArrays(GL_LINES, 0, + static_cast(((std::size_t)(ratio_displayed * nb_lines)/3))); + vaos[Edges]->release(); program->release(); } -void Scene_points_with_normal_item::draw_points(Viewer_interface* viewer) const +void Scene_points_with_normal_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) initialize_buffers(viewer); - vaos[1]->bind(); - program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + 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(nb_points/3)); - vaos[1]->release(); + viewer->glDrawArrays(GL_POINTS, 0, + static_cast(((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[2]->bind(); - program=getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + 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(nb_selected_points/3)); - vaos[2]->release(); + static_cast(((std::size_t)(ratio_displayed * nb_selected_points)/3))); + vaos[Selected_points]->release(); program->release(); viewer->glPointSize(point_size); } @@ -481,13 +494,13 @@ return m_points->empty(); } -Scene_points_with_normal_item::Bbox -Scene_points_with_normal_item::bbox() const +void +Scene_points_with_normal_item::compute_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 = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); } @@ -577,8 +590,9 @@ } } -void Scene_points_with_normal_item::invalidate_buffers() +void Scene_points_with_normal_item::invalidateOpenGLBuffers() { are_buffers_filled = false; + compute_bbox(); } diff -Nru cgal-4.7/demo/Polyhedron/Scene_points_with_normal_item.h cgal-4.8/demo/Polyhedron/Scene_points_with_normal_item.h --- cgal-4.7/demo/Polyhedron/Scene_points_with_normal_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_points_with_normal_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef POINT_SET_ITEM_H #define POINT_SET_ITEM_H -#include "Scene_item.h" +#include #include "Scene_points_with_normal_item_config.h" #include "Polyhedron_type_fwd.h" #include "Kernel_type.h" @@ -18,7 +18,7 @@ // 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 + : public CGAL::Three::Scene_item { Q_OBJECT @@ -36,6 +36,8 @@ 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); @@ -44,15 +46,15 @@ // Function for displaying meta-data of the item virtual QString toolTip() const; - virtual void invalidate_buffers(); + virtual void invalidateOpenGLBuffers(); // Indicate if rendering mode is supported virtual bool supportsRenderingMode(RenderingMode m) const; - virtual void draw_edges(Viewer_interface* viewer) const; - virtual void draw_points(Viewer_interface*) const; + virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; + virtual void draw_points(CGAL::Three::Viewer_interface*) const; - virtual void draw_splats(Viewer_interface*) const; + virtual void draw_splats(CGAL::Three::Viewer_interface*) const; // Gets wrapped point set Point_set* point_set(); @@ -61,7 +63,7 @@ // Gets dimensions virtual bool isFinite() const { return true; } virtual bool isEmpty() const; - virtual Bbox bbox() const; + virtual void compute_bbox() const; virtual void setRenderingMode(RenderingMode m); @@ -91,6 +93,18 @@ 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 positions_lines; mutable std::vector positions_points; @@ -102,8 +116,8 @@ mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; + using CGAL::Three::Scene_item::initialize_buffers; + void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; void compute_normals_and_vertices() const; diff -Nru cgal-4.7/demo/Polyhedron/Scene_polygon_soup_item.cpp cgal-4.8/demo/Polyhedron/Scene_polygon_soup_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polygon_soup_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polygon_soup_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -77,32 +78,32 @@ }; // end struct Polyhedron_to_soup_writer void -Scene_polygon_soup_item::initialize_buffers(Viewer_interface* viewer) const +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[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_poly.data(), + vaos[Facets]->bind(); + buffers[Facets_vertices].bind(); + buffers[Facets_vertices].allocate(positions_poly.data(), static_cast(positions_poly.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[0].release(); + buffers[Facets_vertices].release(); - buffers[1].bind(); - buffers[1].allocate(normals.data(), + buffers[Facets_normals].bind(); + buffers[Facets_normals].allocate(normals.data(), static_cast(normals.size()*sizeof(float))); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[1].release(); + buffers[Facets_normals].release(); program->release(); - vaos[0]->release(); + vaos[Facets]->release(); nb_polys = positions_poly.size(); positions_poly.resize(0); std::vector(positions_poly).swap(positions_poly); @@ -115,16 +116,16 @@ { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[1]->bind(); + vaos[Edges]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_lines.data(), + buffers[Edges_vertices].bind(); + buffers[Edges_vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[3].release(); + buffers[Edges_vertices].release(); program->release(); - vaos[1]->release(); + vaos[Edges]->release(); nb_lines = positions_lines.size(); positions_lines.resize(0); @@ -135,14 +136,14 @@ { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[2]->bind(); - buffers[4].bind(); - buffers[4].allocate(positions_nm_lines.data(), + vaos[NM_Edges]->bind(); + buffers[NM_Edges_vertices].bind(); + buffers[NM_Edges_vertices].allocate(positions_nm_lines.data(), static_cast(positions_nm_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[4].release(); - vaos[2]->release(); + buffers[NM_Edges_vertices].release(); + vaos[NM_Edges]->release(); nb_nm_edges = positions_nm_lines.size(); positions_nm_lines.resize(0); std::vector (positions_nm_lines).swap(positions_nm_lines); @@ -367,7 +368,7 @@ Scene_polygon_soup_item::Scene_polygon_soup_item() - : Scene_item(5,3), + : Scene_item(NbOfVbos,NbOfVaos), soup(0), oriented(false) { @@ -398,14 +399,14 @@ else soup->clear(); bool result = CGAL::read_OFF(in, soup->points, soup->polygons); - Q_EMIT invalidate_buffers(); + 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->clear(); soup->points.reserve(nb_pts); soup->polygons.reserve(nb_polygons); oriented = false; @@ -427,7 +428,7 @@ CGAL::generic_print_polyhedron(std::cerr, *poly_item->polyhedron(), writer); - Q_EMIT invalidate_buffers(); + Q_EMIT invalidateOpenGLBuffers(); } void @@ -450,7 +451,7 @@ { if(std::rand() % 2 == 0) soup->inverse_orientation(i); } - invalidate_buffers(); + invalidateOpenGLBuffers(); } void Scene_polygon_soup_item::inside_out() @@ -460,7 +461,7 @@ { soup->inverse_orientation(i); } - invalidate_buffers(); + invalidateOpenGLBuffers(); } bool @@ -534,10 +535,13 @@ orient(); CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh( 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(!CGAL::Polygon_mesh_processing::is_outward_oriented(*out_polyhedron)) { + if(out_polyhedron->is_closed() && + !CGAL::Polygon_mesh_processing::is_outward_oriented(*out_polyhedron)) { out_polyhedron->inside_out(); } return true; @@ -551,7 +555,7 @@ if(!soup) return QString(); - return QObject::tr("

%1 (mode: %5, color: %6)
" + QString str = QObject::tr("

%1 (mode: %5, color: %6)
" "Polygons soup

" "

Number of vertices: %2
" "Number of polygons: %3

") @@ -560,10 +564,12 @@ .arg(soup->polygons.size()) .arg(this->renderingModeName()) .arg(this->color().name()); + str += QString("
Number of isolated vertices : %1
").arg(getNbIsolatedvertices()); + return str; } void -Scene_polygon_soup_item::draw(Viewer_interface* viewer) const { +Scene_polygon_soup_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { compute_normals_and_vertices(); @@ -572,7 +578,7 @@ 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[0]->bind(); + vaos[Facets]->bind(); attrib_buffers(viewer,PROGRAM_WITH_LIGHT); //fills the arraw of colors with the current color @@ -586,18 +592,18 @@ viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_polys/4)); // Clean-up program->release(); - vaos[0]->release(); + vaos[Facets]->release(); } void -Scene_polygon_soup_item::draw_points(Viewer_interface* viewer) const { +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[1]->bind(); + vaos[Edges]->bind(); attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); @@ -607,18 +613,18 @@ viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_lines/4)); // Clean-up program->release(); - vaos[1]->release(); + vaos[Edges]->release(); } void -Scene_polygon_soup_item::draw_edges(Viewer_interface* viewer) const { +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[1]->bind(); + vaos[Edges]->bind(); attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); @@ -629,10 +635,10 @@ viewer->glDrawArrays(GL_LINES, 0,static_cast( nb_lines/4)); // Clean-up program->release(); - vaos[1]->release(); + vaos[Edges]->release(); if(displayNonManifoldEdges()) { - vaos[2]->bind(); + vaos[NM_Edges]->bind(); attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); @@ -643,7 +649,7 @@ viewer->glDrawArrays(GL_LINES, 0,static_cast( nb_nm_edges/4)); // Clean-up program->release(); - vaos[2]->release(); + vaos[NM_Edges]->release(); } } @@ -654,14 +660,16 @@ return (soup == 0 || soup->points.empty()); } void -Scene_polygon_soup_item::invalidate_buffers() +Scene_polygon_soup_item::invalidateOpenGLBuffers() { are_buffers_filled = false; + compute_bbox(); } -Scene_polygon_soup_item::Bbox -Scene_polygon_soup_item::bbox() const { +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(); @@ -669,7 +677,7 @@ ++it) { bbox = bbox + it->bbox(); } - return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), + _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); } diff -Nru cgal-4.7/demo/Polyhedron/Scene_polygon_soup_item.h cgal-4.8/demo/Polyhedron/Scene_polygon_soup_item.h --- cgal-4.7/demo/Polyhedron/Scene_polygon_soup_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polygon_soup_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,7 +1,7 @@ #ifndef SCENE_POLYGON_SOUP_ITEM_H #define SCENE_POLYGON_SOUP_ITEM_H #include "Scene_polygon_soup_item_config.h" -#include "Scene_item.h" +#include #include "Viewer.h" #include "Polyhedron_type.h" @@ -97,7 +97,7 @@ class Scene_polyhedron_item; class SCENE_POLYGON_SOUP_ITEM_EXPORT Scene_polygon_soup_item - : public Scene_item + : public CGAL::Three::Scene_item { typedef Kernel::Point_3 Point_3; @@ -132,7 +132,7 @@ //soup->fill_edges(); oriented = false; - Q_EMIT invalidate_buffers(); + Q_EMIT invalidateOpenGLBuffers(); } bool save(std::ostream& out) const; @@ -143,13 +143,13 @@ 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(Viewer_interface*) const; - virtual void draw_points(Viewer_interface*) const; - virtual void draw_edges(Viewer_interface* viewer) const; - void invalidate_buffers(); + 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; - Bbox bbox() 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); @@ -169,6 +169,21 @@ 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 positions_poly; mutable std::vector positions_lines; mutable std::vector normals; @@ -176,8 +191,8 @@ mutable std::size_t nb_nm_edges; mutable std::size_t nb_polys; mutable std::size_t nb_lines; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; + 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; diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_item.cpp cgal-4.8/demo/Polyhedron/Scene_polyhedron_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -7,23 +7,36 @@ #include #include - - #include #include #include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include #include #include #include +#include + +#include #include +#include +#include +#include + +namespace PMP = CGAL::Polygon_mesh_processing; -#include typedef CGAL::AABB_face_graph_triangle_primitive Primitive; typedef CGAL::AABB_traits AABB_traits; @@ -66,6 +79,15 @@ } } +template +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 P_traits; @@ -87,40 +109,23 @@ typedef CGAL::Constrained_triangulation_plus_2 CDT; //Make sure all the facets are triangles -void -Scene_polyhedron_item::is_Triangulated() const -{ - typedef Polyhedron::Halfedge_around_facet_circulator HF_circulator; - Facet_iterator f = poly->facets_begin(); - int nb_points_per_facet =0; - - for(f = poly->facets_begin(); - f != poly->facets_end(); - f++) - { - HF_circulator he = f->facet_begin(); - HF_circulator end = he; - CGAL_For_all(he,end) - { - nb_points_per_facet++; - } - if(nb_points_per_facet !=3) - { - is_Triangle = false; - break; - } - - nb_points_per_facet = 0; - } -} +template void -Scene_polyhedron_item::triangulate_facet(Facet_iterator fit) const +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 = - CGAL::Polygon_mesh_processing::compute_face_normal(fit,*poly); + 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); @@ -129,9 +134,12 @@ he_circ_end(he_circ); // Iterates on the vector of facet handles + typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + boost::container::flat_map 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; } @@ -142,7 +150,6 @@ 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(), @@ -166,9 +173,9 @@ } } } - //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(); @@ -177,297 +184,168 @@ if(ffit->info().is_external) continue; - positions_facets.push_back(ffit->vertex(0)->point().x()); - positions_facets.push_back(ffit->vertex(0)->point().y()); - positions_facets.push_back(ffit->vertex(0)->point().z()); - positions_facets.push_back(1.0); + 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; - positions_facets.push_back(ffit->vertex(1)->point().x()); - positions_facets.push_back(ffit->vertex(1)->point().y()); - positions_facets.push_back(ffit->vertex(1)->point().z()); + push_back_xyz(ffit->vertex(0)->point(), positions_facets); positions_facets.push_back(1.0); - positions_facets.push_back(ffit->vertex(2)->point().x()); - positions_facets.push_back(ffit->vertex(2)->point().y()); - positions_facets.push_back(ffit->vertex(2)->point().z()); + 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); - typedef Kernel::Vector_3 Vector; - Vector n = CGAL::Polygon_mesh_processing::compute_face_normal(fit, *poly); - normals_flat.push_back(n.x()); - normals_flat.push_back(n.y()); - normals_flat.push_back(n.z()); - - normals_flat.push_back(n.x()); - normals_flat.push_back(n.y()); - normals_flat.push_back(n.z()); - - normals_flat.push_back(n.x()); - normals_flat.push_back(n.y()); - normals_flat.push_back(n.z()); - - normals_gouraud.push_back(n.x()); - normals_gouraud.push_back(n.y()); - normals_gouraud.push_back(n.z()); - - normals_gouraud.push_back(n.x()); - normals_gouraud.push_back(n.y()); - normals_gouraud.push_back(n.z()); - - normals_gouraud.push_back(n.x()); - normals_gouraud.push_back(n.y()); - normals_gouraud.push_back(n.z()); - - } -} - -void -Scene_polyhedron_item::triangulate_facet_color(Facet_iterator fit) const -{ - Traits::Vector_3 normal = - CGAL::Polygon_mesh_processing::compute_face_normal(fit, *poly); - - 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 - CDT::Vertex_handle previous, first; - do { - 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(CDT::All_faces_iterator - afit = cdt.all_faces_begin(), - end = cdt.all_faces_end(); - afit != end; ++afit) - { - afit->info().is_external = false; - } - //check if the facet is external or internal - std::queue 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 vector - for(CDT::Finite_faces_iterator - ffit = cdt.finite_faces_begin(), - end = cdt.finite_faces_end(); - ffit != end; ++ffit) - { - if(ffit->info().is_external) - continue; - //Add Colors - for(int i = 0; i<3; ++i) - { - const int this_patch_id = fit->patch_id(); + push_back_xyz(normal, normals_flat); + push_back_xyz(normal, normals_flat); + push_back_xyz(normal, normals_flat); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).redF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).greenF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).blueF()); - - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).redF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).greenF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).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()); - - 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()); + 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 #include #include -#include void -Scene_polyhedron_item::initialize_buffers(Viewer_interface* viewer) const +Scene_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface* viewer) const { - //vao containing the data for the unselected facets + //vao containing the data for the facets { program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer); program->bind(); //flat - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_facets.data(), + vaos[Facets]->bind(); + buffers[Facets_vertices].bind(); + buffers[Facets_vertices].allocate(positions_facets.data(), static_cast(positions_facets.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[0].release(); + buffers[Facets_vertices].release(); - buffers[1].bind(); - buffers[1].allocate(normals_flat.data(), + buffers[Facets_normals_flat].bind(); + buffers[Facets_normals_flat].allocate(normals_flat.data(), static_cast(normals_flat.size()*sizeof(float))); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[1].release(); - - buffers[2].bind(); - buffers[2].allocate(color_facets.data(), - static_cast(color_facets.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[2].release(); - vaos[0]->release(); + buffers[Facets_normals_flat].release(); + if(!is_monochrome) + { + buffers[Facets_color].bind(); + buffers[Facets_color].allocate(color_facets.data(), + static_cast(color_facets.size()*sizeof(float))); + program->enableAttributeArray("colors"); + program->setAttributeBuffer("colors",GL_FLOAT,0,3); + buffers[Facets_color].release(); + } + vaos[Facets]->release(); //gouraud - vaos[4]->bind(); - buffers[0].bind(); + vaos[Gouraud_Facets]->bind(); + buffers[Facets_vertices].bind(); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[0].release(); + buffers[Facets_vertices].release(); - buffers[10].bind(); - buffers[10].allocate(normals_gouraud.data(), + buffers[Facets_normals_gouraud].bind(); + buffers[Facets_normals_gouraud].allocate(normals_gouraud.data(), static_cast(normals_gouraud.size()*sizeof(float))); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[10].release(); - - buffers[2].bind(); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[2].release(); - vaos[4]->release(); + 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 unselected lines + //vao containing the data for the lines { program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); program->bind(); - vaos[1]->bind(); + vaos[Edges]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_lines.data(), + buffers[Edges_vertices].bind(); + buffers[Edges_vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[3].release(); + buffers[Edges_vertices].release(); - buffers[4].bind(); - buffers[4].allocate(color_lines.data(), + buffers[Edges_color].bind(); + buffers[Edges_color].allocate(color_lines.data(), static_cast(color_lines.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[4].release(); + if(!is_monochrome) + { + program->enableAttributeArray("colors"); + program->setAttributeBuffer("colors",GL_FLOAT,0,3); + buffers[Edges_color].release(); + } + else + { + program->disableAttributeArray("colors"); + } program->release(); - vaos[1]->release(); + vaos[Edges]->release(); } - //vao containing the data for the selected facets - { - - program = getShaderProgram(PROGRAM_WITH_LIGHT, viewer); - program->bind(); - - //flat - vaos[2]->bind(); - buffers[5].bind(); - buffers[5].allocate(positions_facets.data(), - static_cast(positions_facets.size()*sizeof(float))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[5].release(); - - buffers[6].bind(); - buffers[6].allocate(normals_flat.data(), - static_cast(normals_flat.size()*sizeof(float))); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[6].release(); - - - buffers[7].bind(); - buffers[7].allocate(color_facets_selected.data(), - static_cast(color_facets_selected.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[7].release(); - vaos[2]->release(); - - //gouraud - vaos[5]->bind(); - buffers[5].bind(); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[5].release(); - - buffers[10].bind(); - program->enableAttributeArray("normals"); - program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[10].release(); - - - buffers[7].bind(); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[7].release(); - vaos[5]->release(); - - program->release(); - } - //vao containing the data for the selected lines - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - vaos[3]->bind(); - program->bind(); - buffers[8].bind(); - buffers[8].allocate(positions_lines.data(), - static_cast(positions_lines.size()*sizeof(float))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[8].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(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(); - buffers[9].bind(); - buffers[9].allocate(color_lines_selected.data(), - static_cast(color_lines_selected.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[9].release(); - program->release(); + vaos[Feature_edges]->release(); - vaos[3]->release(); - } + } + nb_f_lines = positions_feature_lines.size(); + positions_feature_lines.resize(0); + std::vector(positions_feature_lines).swap(positions_feature_lines); nb_lines = positions_lines.size(); positions_lines.resize(0); std::vector(positions_lines).swap(positions_lines); @@ -476,10 +354,6 @@ std::vector(positions_facets).swap(positions_facets); - color_lines_selected.resize(0); - std::vector(color_lines_selected).swap(color_lines_selected); - color_facets_selected.resize(0); - std::vector(color_facets_selected).swap(color_facets_selected); color_lines.resize(0); std::vector(color_lines).swap(color_lines); color_facets.resize(0); @@ -492,13 +366,15 @@ } void -Scene_polyhedron_item::compute_normals_and_vertices(void) const +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; @@ -506,203 +382,183 @@ typedef Kernel::Vector_3 Vector; typedef Polyhedron::Facet_iterator Facet_iterator; typedef Polyhedron::Halfedge_around_facet_circulator HF_circulator; + typedef boost::graph_traits::face_descriptor face_descriptor; + typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + boost::container::flat_map face_normals_map; + boost::associative_property_map< boost::container::flat_map > + nf_pmap(face_normals_map); + boost::container::flat_map vertex_normals_map; + boost::associative_property_map< boost::container::flat_map > + 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::null_face()) + continue; - if(!is_Triangle) - triangulate_facet(f); - else - { - HF_circulator he = f->facet_begin(); - HF_circulator end = he; - CGAL_For_all(he,end) + 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 + // If Flat shading:1 normal per polygon added once per vertex + push_back_xyz(n, normals_flat); - Vector n = CGAL::Polygon_mesh_processing::compute_face_normal(f, *poly); - normals_flat.push_back(n.x()); - normals_flat.push_back(n.y()); - normals_flat.push_back(n.z()); - - - //// If Gouraud shading: 1 normal per vertex - - n = CGAL::Polygon_mesh_processing::compute_vertex_normal(he->vertex(), *poly); - normals_gouraud.push_back(n.x()); - normals_gouraud.push_back(n.y()); - normals_gouraud.push_back(n.z()); - - //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); - } + //// 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()); + } } - } - //Lines - typedef Kernel::Point_3 Point; - typedef Polyhedron::Edge_iterator Edge_iterator; + if (colors_only) + continue; - 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(); - 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); + Vector nf = get(nf_pmap, f); - } - } - 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(); + //1st half-quad + Point p0 = f->halfedge()->vertex()->point(); + Point p1 = f->halfedge()->next()->vertex()->point(); + Point p2 = f->halfedge()->next()->next()->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); + push_back_xyz(p0, positions_facets); + positions_facets.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); + 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); - //set the colors - compute_colors(); -} + nv = get(nv_pmap, f->halfedge()->next()->vertex()); + push_back_xyz(nv, normals_gouraud); -void -Scene_polyhedron_item::compute_colors() const -{ - color_lines.resize(0); - color_facets.resize(0); - color_lines_selected.resize(0); - color_facets_selected.resize(0); - //Facets - typedef Polyhedron::Facet_iterator Facet_iterator; - typedef Polyhedron::Halfedge_around_facet_circulator HF_circulator; + 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); - // int patch_id = -1; - // Facet_iterator f = poly->facets_begin(); + push_back_xyz(p1, positions_facets); + positions_facets.push_back(1.0); - for(Facet_iterator f = poly->facets_begin(); - f != poly->facets_end(); - f++) - { - if(!is_Triangle) - triangulate_facet_color(f); - else - { - HF_circulator he = f->facet_begin(); - HF_circulator end = he; - CGAL_For_all(he,end) - { + push_back_xyz(p2, positions_facets); + positions_facets.push_back(1.0); - const int this_patch_id = f->patch_id(); + push_back_xyz(nf, normals_flat); + push_back_xyz(nf, normals_flat); + push_back_xyz(nf, normals_flat); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).redF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).greenF()); - color_facets_selected.push_back(colors_[this_patch_id].lighter(120).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()); + 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; - if(!show_only_feature_edges_m) { - for(he = poly->edges_begin(); - he != poly->edges_end(); - 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(he->is_feature_edge()) continue; - - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - - 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_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); } } - for(he = poly->edges_begin(); - he != poly->edges_end(); - he++) - { - if(!he->is_feature_edge()) continue; - color_lines.push_back(1.0); - color_lines.push_back(0.0); - color_lines.push_back(0.0); - - color_lines.push_back(1.0); - color_lines.push_back(0.0); - color_lines.push_back(0.0); - - color_lines_selected.push_back(1.0); - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - - color_lines_selected.push_back(1.0); - color_lines_selected.push_back(0.0); - color_lines_selected.push_back(0.0); - } } Scene_polyhedron_item::Scene_polyhedron_item() - : Scene_item(11,6), - is_Triangle(true), + : 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) @@ -711,15 +567,15 @@ 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(11,6), - is_Triangle(true), + : 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) @@ -728,25 +584,28 @@ is_selected = true; nb_facets = 0; nb_lines = 0; + nb_f_lines = 0; init(); - invalidate_buffers(); + invalidateOpenGLBuffers(); } Scene_polyhedron_item::Scene_polyhedron_item(const Polyhedron& p) - : Scene_item(11,6), - is_Triangle(true), + : 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; - invalidate_buffers(); + nb_f_lines = 0; + invalidateOpenGLBuffers(); } Scene_polyhedron_item::~Scene_polyhedron_item() @@ -761,54 +620,36 @@ 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()); - } + typedef Polyhedron::Facet_iterator Facet_iterator; - colors_.resize(0); - compute_color_map(this->color(), max + 1, - std::back_inserter(colors_)); - } - - volume=-std::numeric_limits::infinity(); - area=-std::numeric_limits::infinity(); - if (poly->is_pure_triangle()) + if ( !plugin_has_set_color_vector_m ) { - // compute the volume if the polyhedron is closed - if (poly->is_closed()) + // 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) { - volume=0; - Polyhedron::Vertex::Point p(0,0,0); - Q_FOREACH(Polyhedron::Face_handle fh, faces(*poly)) - { - volume+=CGAL::volume( p, - fh->halfedge()->vertex()->point(), - fh->halfedge()->next()->vertex()->point(), - fh->halfedge()->prev()->vertex()->point() ); - } + max = (std::max)(max, fit->patch_id()); } - // compute the surface area - area=0; - Q_FOREACH(Polyhedron::Face_handle fh, faces(*poly)) - { - area+=std::sqrt( CGAL::squared_area( - fh->halfedge()->vertex()->point(), - fh->halfedge()->next()->vertex()->point(), - fh->halfedge()->prev()->vertex()->point() ) - ); - } + 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::infinity(); + area = -std::numeric_limits::infinity(); + self_intersect = false; + +} Scene_polyhedron_item* Scene_polyhedron_item::clone() const { @@ -824,7 +665,49 @@ if ( in && !isEmpty() ) { - invalidate_buffers(); + 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 points; + std::vector > 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 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; @@ -856,60 +739,76 @@ .arg(poly->size_of_facets()) .arg(this->renderingModeName()) .arg(this->color().name()); - if (volume!=-std::numeric_limits::infinity()) - str+=QObject::tr("
Volume: %1").arg(volume); - if (area!=-std::numeric_limits::infinity()) - str+=QObject::tr("
Area: %1").arg(area); - str+="

"; - + str += QString("
Number of isolated vertices : %1
").arg(getNbIsolatedvertices()); return str; } QMenu* Scene_polyhedron_item::contextMenu() { - const char* prop_name = "Menu modified by Scene_polyhedron_item."; + const char* prop_name = "Menu modified by Scene_polyhedron_item."; - QMenu* menu = Scene_item::contextMenu(); + 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); + } - // 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->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("actionPickFacets"); - if(action) action->setChecked(facet_picking_m); - action = menu->findChild("actionEraseNextFacet"); - if(action) action->setChecked(erase_next_picked_facet_m); - return menu; + QAction* action = menu->findChild("actionShowOnlyFeatureEdges"); + if(action) action->setChecked(show_only_feature_edges_m); + action = menu->findChild("actionShowFeatureEdges"); + if(action) action->setChecked(show_feature_edges_m); + action = menu->findChild("actionPickFacets"); + if(action) action->setChecked(facet_picking_m); + action = menu->findChild("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(); } @@ -924,83 +823,99 @@ erase_next_picked_facet_m = b; } -void Scene_polyhedron_item::draw(Viewer_interface* viewer) const { +void Scene_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - is_Triangulated(); compute_normals_and_vertices(); initialize_buffers(viewer); + compute_bbox(); } - - if(!is_selected && renderingMode() == Flat) - vaos[0]->bind(); - else if(!is_selected && renderingMode() == Gouraud) - { - vaos[4]->bind(); - } - else if (is_selected && renderingMode() == Gouraud) - { - vaos[5]->bind(); - } + if(renderingMode() == Flat || renderingMode() == FlatPlusEdges) + vaos[Facets]->bind(); else { - vaos[2]->bind(); + 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(nb_facets/4)); program->release(); - if(!is_selected && renderingMode() == Flat) - vaos[0]->release(); - else if(!is_selected && renderingMode() == Gouraud) - vaos[4]->release(); - else if (is_selected && renderingMode() == Gouraud) - vaos[5]->release(); + if(renderingMode() == Flat || renderingMode() == FlatPlusEdges) + vaos[Facets]->release(); else - vaos[2]->release(); + vaos[Gouraud_Facets]->release(); } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list -void Scene_polyhedron_item::draw_edges(Viewer_interface* viewer) const { - if(!are_buffers_filled) +void Scene_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const +{ + if (!are_buffers_filled) { - is_Triangulated(); compute_normals_and_vertices(); initialize_buffers(viewer); + compute_bbox(); } - if(!is_selected) + if(!show_only_feature_edges_m) { - vaos[1]->bind(); + 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(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 { - vaos[3]->bind(); + if(!is_selected) + program->setAttributeValue("colors", this->color().lighter(50)); + else + program->setAttributeValue("colors",QColor(0,0,0)); } - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - program->bind(); - //draw the edges - viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_lines/4)); + viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_f_lines/4)); program->release(); - if(!is_selected) - vaos[1]->release(); - else - vaos[3]->release(); -} + vaos[Feature_edges]->release(); + } void -Scene_polyhedron_item::draw_points(Viewer_interface* viewer) const { +Scene_polyhedron_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) { - is_Triangulated(); compute_normals_and_vertices(); initialize_buffers(viewer); + compute_bbox(); } - vaos[1]->bind(); + vaos[Edges]->bind(); attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); program->bind(); @@ -1008,7 +923,7 @@ viewer->glDrawArrays(GL_POINTS, 0, static_cast(nb_lines/4)); // Clean-up program->release(); - vaos[1]->release(); + vaos[Edges]->release(); } Polyhedron* @@ -1021,8 +936,7 @@ return (poly == 0) || poly->empty(); } -Scene_polyhedron_item::Bbox -Scene_polyhedron_item::bbox() const { +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(); @@ -1030,45 +944,30 @@ ++it) { bbox = bbox + it->bbox(); } - return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), + _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); } void Scene_polyhedron_item:: -invalidate_buffers() +invalidateOpenGLBuffers() { Q_EMIT item_is_about_to_be_changed(); delete_aabb_tree(this); init(); - Base::invalidate_buffers(); - is_Triangulated(); - compute_normals_and_vertices(); + Base::invalidateOpenGLBuffers(); are_buffers_filled = false; + invalidate_stats(); } -void -Scene_polyhedron_item:: -contextual_changed() -{ - prev_shading = cur_shading; - cur_shading = renderingMode(); - if(prev_shading != cur_shading) - if(cur_shading == Flat || cur_shading == FlatPlusEdges ||cur_shading == Gouraud) - { - //Change the normals - // invalidate_buffers(); - } -} void Scene_polyhedron_item::selection_changed(bool p_is_selected) { if(p_is_selected != is_selected) { is_selected = p_is_selected; - //are_buffers_filled = false; } } @@ -1103,17 +1002,13 @@ 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 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(&closest->first); - for(Intersections::iterator it = boost::next(intersections.begin()), end = intersections.end(); @@ -1149,7 +1044,6 @@ 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, @@ -1159,7 +1053,7 @@ nearest_v = v; } } - + //bottleneck Q_EMIT selected_vertex((void*)(&*nearest_v)); } @@ -1192,7 +1086,7 @@ polyhedron()->erase_facet(selected_fh->halfedge()); polyhedron()->normalize_border(); //set_erase_next_picked_facet(false); - invalidate_buffers(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } } @@ -1233,5 +1127,152 @@ { 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::face_descriptor face_descriptor; + int i = 0; + BOOST_FOREACH(face_descriptor f, faces(*poly)){ + f->id() = i++; + } + boost::vector_property_map::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::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::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("Properties"),9)); + data.categories.append(std::pair(QString("Edges"),6)); + data.categories.append(std::pair(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 -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -3,7 +3,7 @@ Scene_polyhedron_item_decorator::Scene_polyhedron_item_decorator (Scene_polyhedron_item* poly_item, bool delete_item) - :Scene_item(), poly_item(poly_item), delete_poly_item(delete_item) + :CGAL::Three::Scene_item(), poly_item(poly_item), delete_poly_item(delete_item) { } Scene_polyhedron_item_decorator::~Scene_polyhedron_item_decorator() @@ -55,18 +55,19 @@ return poly_item->isEmpty(); } -Scene_polyhedron_item_decorator::Bbox -Scene_polyhedron_item_decorator::bbox() const { - return poly_item->bbox(); +void +Scene_polyhedron_item_decorator::compute_bbox() const { + _bbox = poly_item->bbox(); } void Scene_polyhedron_item_decorator:: -invalidate_buffers() +invalidateOpenGLBuffers() { - poly_item->invalidate_buffers(); - Scene_item::invalidate_buffers(); + poly_item->invalidateOpenGLBuffers(); + Scene_item::invalidateOpenGLBuffers(); + compute_bbox(); } void diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_decorator.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_decorator.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_decorator.h 2016-04-04 19:00:12.000000000 +0000 @@ -5,7 +5,7 @@ // 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 { + : public CGAL::Three::Scene_item { Q_OBJECT public: /// Create an Scene_polyhedron_item_decorator from a Scene_polyhedron_item. @@ -43,13 +43,13 @@ // Get dimensions bool isFinite() const { return true; } bool isEmpty() const; - Bbox bbox() 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 invalidate_buffers(); + void invalidateOpenGLBuffers(); void select(double orig_x, double orig_y, double orig_z, diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_item.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_item.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -2,7 +2,7 @@ #define SCENE_POLYHEDRON_ITEM_H #include "Scene_polyhedron_item_config.h" -#include "Scene_item.h" //<- modif ? +#include //<- modif ? #include "Polyhedron_type_fwd.h" #include "Polyhedron_type.h" #include "Viewer.h" @@ -20,10 +20,32 @@ class QMenu; // This class represents a polyhedron in the OpenGL scene -class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item - : public Scene_item{ +class SCENE_POLYHEDRON_ITEM_EXPORT Scene_polyhedron_item + : public CGAL::Three::Scene_item{ Q_OBJECT -public: +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); @@ -34,8 +56,8 @@ // IO bool load(std::istream& in); + bool load_obj(std::istream& in); bool save(std::ostream& out) const; - mutable bool is_Triangle; // Function for displaying meta-data of the item virtual QString toolTip() const; @@ -47,10 +69,10 @@ 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(Viewer_interface*) const; + virtual void draw(CGAL::Three::Viewer_interface*) const; virtual void draw_edges() const {} - virtual void draw_edges(Viewer_interface* viewer) const; - virtual void draw_points(Viewer_interface*) 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(); @@ -59,15 +81,19 @@ // Get dimensions bool isFinite() const { return true; } bool isEmpty() const; - Bbox bbox() const; + void compute_bbox() const; std::vector& 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 invalidate_buffers(); - virtual void contextual_changed(); + 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); @@ -89,11 +115,12 @@ void selected_facet(void*); void selected_edge(void*); void selected_halfedge(void*); - void item_is_about_to_be_changed(); // emitted in invalidate_buffers() + void item_is_about_to_be_changed(); // emitted in invalidateOpenGLBuffers() private: // Initialization void init(); + void invalidate_stats(); private: Polyhedron* poly; @@ -103,34 +130,55 @@ typedef std::vector Color_vector; typedef Polyhedron::Facet_iterator Facet_iterator; - Color_vector colors_; + 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 positions_lines; + mutable std::vector positions_feature_lines; mutable std::vector positions_facets; mutable std::vector normals_flat; mutable std::vector normals_gouraud; mutable std::vector color_lines; mutable std::vector color_facets; - mutable std::vector color_lines_selected; - mutable std::vector color_facets_selected; mutable std::size_t nb_facets; mutable std::size_t nb_lines; + mutable std::size_t nb_f_lines; mutable QOpenGLShaderProgram *program; - - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer = 0) const; - void compute_normals_and_vertices(void) const; - void compute_colors() const; - void triangulate_facet(Facet_iterator ) const; - void triangulate_facet_color(Facet_iterator ) const; - void is_Triangulated() const; + 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 + void triangulate_facet(Facet_iterator, + const FaceNormalPmap&, const VertexNormalPmap&, + const bool colors_only) const; double volume, area; }; // end class Scene_polyhedron_item diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h 2016-04-04 19:00:12.000000000 +0000 @@ -20,7 +20,8 @@ { Q_OBJECT public: - struct Active_handle { enum Type{ VERTEX = 0, FACET = 1, EDGE = 2 }; }; + struct Active_handle { + enum Type{ VERTEX = 0, FACET = 1, EDGE = 2 , CONNECTED_COMPONENT = 3}; }; typedef boost::graph_traits::edge_descriptor edge_descriptor; @@ -47,7 +48,7 @@ init(poly_item, mw, aht, k_ring); } - void init(Scene_polyhedron_item* poly_item, QMainWindow* mw, Active_handle::Type aht, int 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; @@ -57,8 +58,11 @@ QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin(); viewer->installEventFilter(this); - mw->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*))); @@ -75,8 +79,9 @@ void facet_has_been_selected(void* void_ptr) { is_active=true; - if(active_handle_type != Active_handle::FACET) { return; } - process_selection( static_cast(void_ptr)->halfedge()->facet() ); + if (active_handle_type == Active_handle::FACET + || active_handle_type == Active_handle::CONNECTED_COMPONENT) + process_selection(static_cast(void_ptr)->halfedge()->facet()); } void edge_has_been_selected(void* void_ptr) { @@ -89,6 +94,7 @@ void selected(const std::set&); void selected(const std::set&); void selected(const std::set&); + void toogle_insert(const bool); void endSelection(); protected: @@ -123,7 +129,7 @@ std::set selection; selection.insert(clicked); if (k>0) - CGAL::dilate_vertex_selection(CGAL::make_array(clicked), + CGAL::expand_vertex_selection(CGAL::make_array(clicked), *poly_item->polyhedron(), k, Is_selected_from_set(selection), @@ -138,7 +144,7 @@ std::set selection; selection.insert(clicked); if (k>0) - CGAL::dilate_face_selection(CGAL::make_array(clicked), + CGAL::expand_face_selection(CGAL::make_array(clicked), *poly_item->polyhedron(), k, Is_selected_from_set(selection), @@ -152,13 +158,13 @@ { std::set selection; selection.insert(clicked); + if (k>0) - CGAL::dilate_edge_selection(CGAL::make_array(clicked), + CGAL::expand_edge_selection(CGAL::make_array(clicked), *poly_item->polyhedron(), k, Is_selected_from_set(selection), CGAL::Emptyset_iterator()); - return selection; } @@ -167,12 +173,24 @@ { // This filter is both filtering events from 'viewer' and 'main window' // key events - if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { + if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { QKeyEvent *keyEvent = static_cast(event); Qt::KeyboardModifiers modifiers = keyEvent->modifiers(); state.shift_pressing = modifiers.testFlag(Qt::ShiftModifier); } + + if(event->type() == QEvent::KeyPress + && state.shift_pressing + && static_cast(event)->key()==Qt::Key_D) + { + Q_EMIT toogle_insert(false); + } + else if(event->type() == QEvent::KeyRelease + && static_cast(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(event); @@ -185,12 +203,19 @@ 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 && - (state.shift_pressing && state.left_button_pressing) ) - { // paint with mouse move event + if( (event->type() == QEvent::MouseMove + || (event->type() == QEvent::MouseButtonPress + && static_cast(event)->button() == Qt::LeftButton)) + && (state.shift_pressing && state.left_button_pressing) ) + { + // paint with mouse move event QMouseEvent* mouse_event = static_cast(event); QGLViewer* viewer = *QGLViewer::QGLViewerPool().begin(); qglviewer::Camera* camera = viewer->camera(); diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_selection_item.cpp cgal-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_selection_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,7 +1,8 @@ #include "Scene_polyhedron_selection_item.h" +#include -void Scene_polyhedron_selection_item::initialize_buffers(Viewer_interface *viewer)const +void Scene_polyhedron_selection_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer)const { //vao containing the data for the unselected facets { @@ -31,7 +32,7 @@ } //vao containing the data for the unselected lines { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); vaos[1]->bind(); @@ -49,7 +50,7 @@ } //vao containing the data for the points { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); vaos[2]->bind(); @@ -83,7 +84,7 @@ are_buffers_filled = true; } -void Scene_polyhedron_selection_item::compute_elements() +void Scene_polyhedron_selection_item::compute_elements()const { positions_facets.clear(); positions_lines.clear(); @@ -160,11 +161,14 @@ } } -void Scene_polyhedron_selection_item::draw(Viewer_interface* viewer) const +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; @@ -177,7 +181,7 @@ program = getShaderProgram(PROGRAM_WITH_LIGHT); attrib_buffers(viewer,PROGRAM_WITH_LIGHT); program->bind(); - program->setAttributeValue("colors",facet_color); + program->setAttributeValue("colors",this->color()); viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/3)); program->release(); vaos[0]->release(); @@ -187,14 +191,20 @@ } -void Scene_polyhedron_selection_item::draw_edges(Viewer_interface* viewer) const +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_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + 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(nb_lines/3)); program->release(); @@ -202,12 +212,17 @@ viewer->glLineWidth(1.f); } -void Scene_polyhedron_selection_item::draw_points(Viewer_interface* viewer) const +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_WITHOUT_LIGHT); - attrib_buffers(viewer,PROGRAM_WITHOUT_LIGHT); + 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(nb_points/3)); diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_selection_item.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_selection_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_selection_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -9,10 +9,10 @@ #include "Polyhedron_type.h" #include -#include #include #include #include +#include "Polyhedron_demo_detect_sharp_edges.h" #include #include @@ -20,6 +20,7 @@ #include #include +#include namespace PMP = CGAL::Polygon_mesh_processing; @@ -44,26 +45,26 @@ template static OutputIterator - erode_selection( + reduce_selection( const VertexRange& selection, HalfedgeGraph& graph, unsigned int k, IsVertexSelectedPMap is_selected, OutputIterator out) { - return erode_vertex_selection(selection, graph, k, is_selected, out); + return reduce_vertex_selection(selection, graph, k, is_selected, out); } template static OutputIterator - dilate_selection( + expand_selection( const VertexRange& selection, HalfedgeGraph& graph, unsigned int k, IsVertexSelectedPMap is_selected, OutputIterator out) { - return dilate_vertex_selection(selection, graph, k, is_selected, out); + return expand_vertex_selection(selection, graph, k, is_selected, out); } SelectionItem* item; @@ -86,26 +87,26 @@ template static OutputIterator - erode_selection( + reduce_selection( const FaceRange& selection, HalfedgeGraph& graph, unsigned int k, IsFaceSelectedPMap is_selected, OutputIterator out) { - return erode_face_selection(selection, graph, k, is_selected, out); + return reduce_face_selection(selection, graph, k, is_selected, out); } template static OutputIterator - dilate_selection( + expand_selection( const FaceRange& selection, HalfedgeGraph& graph, unsigned int k, IsFaceSelectedPMap is_selected, OutputIterator out) { - return dilate_face_selection(selection, graph, k, is_selected, out); + return expand_face_selection(selection, graph, k, is_selected, out); } SelectionItem* item; @@ -128,26 +129,26 @@ template static OutputIterator - erode_selection( + reduce_selection( const EdgeRange& selection, HalfedgeGraph& graph, unsigned int k, IsEdgeSelectedPMap is_selected, OutputIterator out) { - return erode_edge_selection(selection, graph, k, is_selected, out); + return reduce_edge_selection(selection, graph, k, is_selected, out); } template static OutputIterator - dilate_selection( + expand_selection( const EdgeRange& selection, HalfedgeGraph& graph, unsigned int k, IsEdgeSelectedPMap is_selected, OutputIterator out) { - return dilate_edge_selection(selection, graph, k, is_selected, out); + return expand_edge_selection(selection, graph, k, is_selected, out); } SelectionItem* item; @@ -173,7 +174,6 @@ Scene_polyhedron_selection_item() : Scene_polyhedron_item_decorator(NULL, false) { - nbVaos = 0; for(int i=0; i<3; i++) { addVaos(i); @@ -187,15 +187,16 @@ 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) { - nbVaos = 0; nb_facets = 0; nb_points = 0; nb_lines = 0; + for(int i=0; i<3; i++) { addVaos(i); @@ -207,7 +208,8 @@ buffers[i].create(); } init(poly_item, mw); - invalidate_buffers(); + this->setColor(facet_color); + invalidateOpenGLBuffers(); } ~Scene_polyhedron_selection_item() @@ -226,7 +228,7 @@ connect(&k_ring_selector, SIGNAL(selected(const std::set&)), this, SLOT(selected(const std::set&))); 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(); @@ -254,19 +256,34 @@ typedef boost::unordered_set Selection_set_facet; typedef boost::unordered_set Selection_set_edge; + Polyhedron* polyhedron() + { + return this->poly_item->polyhedron(); + } using Scene_polyhedron_item_decorator::draw; - virtual void draw(Viewer_interface*) const; + virtual void draw(CGAL::Three::Viewer_interface*) const; virtual void draw_edges() const { } - virtual void draw_edges(Viewer_interface*) const; - virtual void draw_points(Viewer_interface*) 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(); } - Bbox bbox() const + void selection_changed(bool b) + { + QGLViewer* v = *QGLViewer::QGLViewerPool().begin(); + CGAL::Three::Viewer_interface* viewer = dynamic_cast(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 @@ -301,8 +318,8 @@ } } - if(!item_bbox) { return Bbox(); } - return Bbox(item_bbox->xmin(),item_bbox->ymin(),item_bbox->zmin(), + 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()); } @@ -385,9 +402,14 @@ case Active_handle::VERTEX: select_all(); break; case Active_handle::FACET: + case Active_handle::CONNECTED_COMPONENT: select_all(); 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) @@ -398,7 +420,7 @@ for(typename Tr::Iterator it = tr.iterator_begin() ; it != tr.iterator_end(); ++it) { tr.container().insert(*it); } - invalidate_buffers(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } @@ -408,6 +430,7 @@ case Active_handle::VERTEX: clear(); break; case Active_handle::FACET: + case Active_handle::CONNECTED_COMPONENT: clear(); break; case Active_handle::EDGE: clear(); break; @@ -419,10 +442,16 @@ Selection_traits tr(this); tr.container().clear(); - invalidate_buffers(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } + void clear_all(){ + clear(); + clear(); + clear(); + } + boost::optional get_minimum_isolated_component() { switch(get_active_handle_type()) { case Active_handle::VERTEX: @@ -465,44 +494,48 @@ Travel_isolated_components().travel (tr.iterator_begin(), tr.iterator_end(), tr.size(), tr.container(), visitor); - if(visitor.any_inserted) { invalidate_buffers(); Q_EMIT itemChanged(); } + if(visitor.any_inserted) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } return visitor.minimum_visitor.minimum; } - void dilate_or_erode(int steps) { + void expand_or_reduce(int steps) { if (steps>0) { switch(get_active_handle_type()) { case Active_handle::VERTEX: - dilate_selection(steps); + expand_selection(steps); break; case Active_handle::FACET: - dilate_selection(steps); + case Active_handle::CONNECTED_COMPONENT: + expand_selection(steps); break; - default: - dilate_selection(steps); + case Active_handle::EDGE: + expand_selection(steps); } } else { switch(get_active_handle_type()) { case Active_handle::VERTEX: - erode_selection(-steps); + reduce_selection(-steps); break; case Active_handle::FACET: - erode_selection(-steps); + case Active_handle::CONNECTED_COMPONENT: + reduce_selection(-steps); break; - default: - erode_selection(-steps); + case Active_handle::EDGE: + reduce_selection(-steps); } } } template struct Is_selected_property_map{ - std::vector& is_selected; + std::vector* is_selected_ptr; + Is_selected_property_map() + : is_selected_ptr(NULL) {} Is_selected_property_map(std::vector& is_selected) - : is_selected( is_selected) {} + : is_selected_ptr( &is_selected) {} template std::size_t id(H h){ return h->id(); } @@ -510,12 +543,38 @@ friend bool get(Is_selected_property_map map, Handle h) { - return map.is_selected[map.id(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) { - map.is_selected[map.id(h)]=b; + CGAL_assertion(map.is_selected_ptr!=NULL); + (*map.is_selected_ptr)[map.id(h)]=b; + } + }; + + template + 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); } }; @@ -538,8 +597,8 @@ }; template - void dilate_selection(unsigned int steps) { - + void expand_selection(unsigned int steps) + { typedef Selection_traits Tr; Tr tr(this); @@ -549,7 +608,7 @@ BOOST_FOREACH(Handle h,tr.container()) mark[tr.id(h)]=true; - Tr::dilate_selection( + Tr::expand_selection( tr.container(), *this->poly_item->polyhedron(), steps, @@ -563,11 +622,11 @@ any_change |= tr.container().insert(*it).second; } } - if(any_change) { invalidate_buffers(); Q_EMIT itemChanged(); } + if(any_change) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } } template - void erode_selection(unsigned int steps) { + void reduce_selection(unsigned int steps) { typedef Selection_traits Tr; Tr tr(this); @@ -578,7 +637,7 @@ BOOST_FOREACH(Handle h,tr.container()) mark[tr.id(h)]=true; - Tr::erode_selection( + Tr::reduce_selection( tr.container(), *this->poly_item->polyhedron(), steps, @@ -592,7 +651,7 @@ any_change |= (tr.container().erase(*it)!=0); } } - if(any_change) { invalidate_buffers(); Q_EMIT itemChanged(); } + if(any_change) { invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } } void erase_selected_facets() { @@ -604,7 +663,7 @@ polyhedron()->erase_facet((*fb)->halfedge()); } selected_facets.clear(); - invalidate_buffers(); + invalidateOpenGLBuffers(); changed_with_poly_item(); } @@ -668,23 +727,36 @@ 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->invalidate_buffers(); + poly_item->invalidateOpenGLBuffers(); Q_EMIT poly_item->itemChanged(); Q_EMIT itemChanged(); } Q_SIGNALS: - void simplicesSelected(Scene_item*); + void simplicesSelected(CGAL::Three::Scene_item*); public Q_SLOTS: - void invalidate_buffers() { + void invalidateOpenGLBuffers() { // do not use decorator function, which calls changed on poly_item which cause deletion of AABB - // poly_item->invalidate_buffers(); - compute_elements(); + // poly_item->invalidateOpenGLBuffers(); are_buffers_filled = false; + compute_bbox(); } // slots are called by signals of polyhedron_k_ring_selector void selected(const std::set& m) @@ -701,6 +773,10 @@ void endSelection(){ Q_EMIT simplicesSelected(this); } + void toggle_insert(bool b) + { + is_insert = b; + } protected: bool eventFilter(QObject* /*target*/, QEvent * gen_event) @@ -710,7 +786,7 @@ { QWheelEvent *event = static_cast(gen_event); int steps = event->delta() / 120; - dilate_or_erode(steps); + expand_or_reduce(steps); return true; } return false; @@ -734,10 +810,10 @@ } } - template - void has_been_selected(const std::set& selection) + template + bool treat_selection(const HandleRange& selection) { - if(!visible()) { return; } + typedef typename HandleRange::value_type HandleType; Selection_traits tr(this); bool any_change = false; @@ -749,7 +825,44 @@ BOOST_FOREACH(HandleType h, selection) any_change |= (tr.container().erase(h)!=0); } - if(any_change) { invalidate_buffers(); Q_EMIT itemChanged(); } + 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::null_face(); } + Facet_handle face(edge_descriptor) + { return boost::graph_traits::null_face(); } + + template + void has_been_selected(const std::set& selection) + { + if(!visible()) { return; } + + + if (get_active_handle_type() == Active_handle::CONNECTED_COMPONENT) + { + Selection_traits tr(this); + tr.update_indices(); + std::vector mark(tr.size(), false); + BOOST_FOREACH(edge_descriptor e, selected_edges) + mark[tr.id(e)] = true; + std::vector 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(mark))); + treat_selection(selected_cc); + } + else + { + treat_selection(selection); + } } public: @@ -769,6 +882,16 @@ return Is_selected_property_map(mark); } + Is_constrained_map constrained_edges_pmap() + { + return Is_constrained_map(selected_edges); + } + + Is_constrained_map constrained_vertices_pmap() + { + return Is_constrained_map(selected_vertices); + } + protected: // members std::string file_name_holder; @@ -794,9 +917,9 @@ mutable std::size_t nb_points; mutable std::size_t nb_lines; mutable QOpenGLShaderProgram *program; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_elements(); + using CGAL::Three::Scene_item::initialize_buffers; + void initialize_buffers(CGAL::Three::Viewer_interface *viewer) const; + void compute_elements() const; }; diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp cgal-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,530 +0,0 @@ -#include "Scene_polyhedron_shortest_path_item.h" - -#include "Scene_polylines_item.h" - -#include -#include -#include -#include - -#include - -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, 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() -{ - - 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(Viewer_interface* viewer)const -{ - //vao containing the data for the selected lines - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - vaos[0]->bind(); - program->bind(); - buffers[0].bind(); - buffers[0].allocate(vertices.data(), vertices.size()*sizeof(float)); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[0].release(); - vaos[0]->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(Viewer_interface* viewer) const -{ - if (supportsRenderingMode(renderingMode())) - { - draw_points(viewer); - } -} - - -void Scene_polyhedron_shortest_path_item::draw_points(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[0]->bind(); - program->bind(); - program->setAttributeValue("colors", QColor(Qt::green)); - viewer->glDrawArrays(GL_POINTS, 0, vertices.size()/3); - program->release(); - vaos[0]->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(); - invalidate_buffers(); - Q_EMIT itemChanged(); -} - -void Scene_polyhedron_shortest_path_item::invalidate_buffers() -{ - compute_elements(); - 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 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; - } - invalidate_buffers(); - 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(event); - Qt::KeyboardModifiers modifiers = keyEvent->modifiers(); - m_shiftHeld = modifiers.testFlag(Qt::ShiftModifier); - } - - if (event->type() == QEvent::MouseButtonPress && m_shiftHeld) - { - QMouseEvent* mouseEvent = static_cast(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, 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 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, 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; -} - -Scene_polyhedron_shortest_path_item::Bbox Scene_polyhedron_shortest_path_item::bbox() const -{ - return polyhedron_item()->bbox(); -} - -QString Scene_polyhedron_shortest_path_item::toolTip() const -{ - return QString(); -} - diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_shortest_path_item.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -#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 "Scene_interface.h" -#include "Messages_interface.h" - -#include "Polyhedron_type.h" -#include "Kernel_type.h" - -#include "opengl_tools.h" -#include - -#include -#include -#include -#include -#include - -#include -#include - -#ifndef Q_MOC_RUN -#include -#endif - -#include -#include -#include - -#include - -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 Scene_interface::Bbox Bbox; - - typedef boost::property_map::type VertexPointMap; - - typedef boost::graph_traits GraphTraits; - typedef GraphTraits::face_descriptor face_descriptor; - typedef GraphTraits::face_iterator face_iterator; - - typedef CGAL::Surface_mesh_shortest_path_traits Surface_mesh_shortest_path_traits; - typedef CGAL::Surface_mesh_shortest_path Surface_mesh_shortest_path; - typedef Surface_mesh_shortest_path::Face_location Face_location; - typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; - typedef CGAL::AABB_traits AABB_face_graph_traits; - typedef CGAL::AABB_tree 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 - }; - -private: - Messages_interface* m_messages; - QMainWindow* m_mainWindow; - 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); - - std::vector vertices; - mutable QOpenGLShaderProgram *program; - - using Scene_polyhedron_item_decorator::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer = 0) const; - void compute_elements(void); - - -public: - - Scene_polyhedron_shortest_path_item(); - Scene_polyhedron_shortest_path_item(Scene_polyhedron_item* polyhedronItem, 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(Viewer_interface*) const; - // Points OpenGL drawing - virtual void draw_points(Viewer_interface*) const; - - virtual Scene_polyhedron_shortest_path_item* clone() const; - - bool deferred_load(Scene_polyhedron_item* polyhedronItem, 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, Scene_interface* sceneInterface, Messages_interface* messages, QMainWindow* mainWindow); - void deinitialize(); - - virtual bool isFinite() const; - virtual bool isEmpty() const; - virtual Bbox bbox() const; - virtual QString toolTip() const; - -protected: - bool eventFilter(QObject* /*target*/, QEvent * gen_event); - -public Q_SLOTS: - virtual void poly_item_changed(); - virtual void invalidate_buffers(); -}; - -#endif // SCENE_POLYHEDRON_SHORTEST_PATH_ITEM_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_transform_item.cpp cgal-4.8/demo/Polyhedron/Scene_polyhedron_transform_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_transform_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_transform_item.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +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*): - Scene_item(1,1), - poly_item(poly_item_), - manipulable(false), - frame(new ManipulatedFrame()), - poly(poly_item->polyhedron()), - center_(pos) - -{ - frame->setPosition(pos); - nb_lines = 0; -} - -void Scene_polyhedron_transform_item::initialize_buffers(Viewer_interface *viewer =0) const -{ - //vao for the edges - { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); - program->bind(); - - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), - static_cast(positions_lines.size()*sizeof(float))); - program->enableAttributeArray("vertex"); - program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[0].release(); - - QColor color = this->color(); - program->setAttributeValue("colors",color); - vaos[0]->release(); - program->release(); - } - nb_lines = positions_lines.size(); - positions_lines.resize(0); - std::vector(positions_lines).swap(positions_lines); - - are_buffers_filled = true; -} - -void Scene_polyhedron_transform_item::compute_elements() -{ - 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(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(); - QMatrix4x4 f_matrix; - for (int i=0; i<16; ++i){ - f_matrix.data()[i] = (float)frame->matrix()[i]; - } - program->setUniformValue("f_matrix", f_matrix); - viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_lines/3)); - vaos[0]->release(); - program->release(); - -} - -QString Scene_polyhedron_transform_item::toolTip() const { - return QObject::tr("

Affine transformation of %1

" - "

Keep Ctrl pressed and use the arcball to define an affine transformation.
" - "Press S to apply the affine transformation to a copy of %1.

") - .arg(getBase()->name()); -} -bool Scene_polyhedron_transform_item::keyPressEvent(QKeyEvent* e){ - if (e->key()==Qt::Key_S){ - Q_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()); -} - - -void Scene_polyhedron_transform_item::invalidate_buffers() -{ - compute_elements(); - are_buffers_filled = false; -} - diff -Nru cgal-4.7/demo/Polyhedron/Scene_polyhedron_transform_item.h cgal-4.8/demo/Polyhedron/Scene_polyhedron_transform_item.h --- cgal-4.7/demo/Polyhedron/Scene_polyhedron_transform_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polyhedron_transform_item.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +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 -#include -#include - -// This class represents a polyhedron in the OpenGL scene -class SCENE_POLYHEDRON_TRANSFORM_ITEM_EXPORT Scene_polyhedron_transform_item - : public 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 Scene_interface* scene_interface); - Scene_item* clone() const{return NULL;} - QString toolTip() const; - void draw_edges(Viewer_interface*) const; - Bbox 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 invalidate_buffers(); - virtual bool keyPressEvent(QKeyEvent*); - -private: - const Scene_polyhedron_item* poly_item; - bool manipulable; - qglviewer::ManipulatedFrame* frame; - const Polyhedron* poly; - qglviewer::Vec center_; - mutable QOpenGLShaderProgram *program; - mutable std::vector positions_lines; - mutable std::size_t nb_lines; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_elements(); - -Q_SIGNALS: - void stop(); - void killed(); -}; // end class Scene_polyhedron_transform_item - -#endif // SCENE_POLYHEDRON_TRANSFORM_ITEM_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_polylines_item.cpp cgal-4.8/demo/Polyhedron/Scene_polylines_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_polylines_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polylines_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -26,27 +26,28 @@ }; void -Scene_polylines_item::create_Sphere(double R) +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(Viewer_interface *viewer = 0) const +Scene_polylines_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const { + QOpenGLShaderProgram *program; //vao for the lines { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_lines.data(), + vaos[Edges]->bind(); + buffers[Edges_Vertices].bind(); + buffers[Edges_Vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[0].release(); - vaos[0]->release(); + buffers[Edges_Vertices].release(); + vaos[Edges]->release(); program->release(); } //vao for the spheres @@ -56,73 +57,60 @@ program = getShaderProgram(PROGRAM_INSTANCED, viewer); program->bind(); - vaos[1]->bind(); - buffers[1].bind(); - buffers[1].allocate(positions_spheres.data(), + vaos[Spheres]->bind(); + buffers[Spheres_Vertices].bind(); + buffers[Spheres_Vertices].allocate(positions_spheres.data(), static_cast(positions_spheres.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[1].release(); + buffers[Spheres_Vertices].release(); - buffers[2].bind(); - buffers[2].allocate(normals_spheres.data(), + buffers[Spheres_Normals].bind(); + buffers[Spheres_Normals].allocate(normals_spheres.data(), static_cast(normals_spheres.size()*sizeof(float))); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[2].release(); + buffers[Spheres_Normals].release(); - buffers[3].bind(); - buffers[3].allocate(color_spheres.data(), + buffers[Spheres_Colors].bind(); + buffers[Spheres_Colors].allocate(color_spheres.data(), static_cast(color_spheres.size()*sizeof(float))); program->enableAttributeArray("colors"); program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[3].release(); + buffers[Spheres_Colors].release(); - buffers[4].bind(); - buffers[4].allocate(positions_center.data(), + buffers[Spheres_Center].bind(); + buffers[Spheres_Center].allocate(positions_center.data(), static_cast(positions_center.size()*sizeof(float))); program->enableAttributeArray("center"); program->setAttributeBuffer("center",GL_FLOAT,0,3); - buffers[4].release(); + buffers[Spheres_Center].release(); viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1); viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1); - nb_lines = positions_lines.size(); - positions_lines.resize(0); - std::vector(positions_lines).swap(positions_lines); - nb_spheres = positions_spheres.size(); - positions_spheres.resize(0); - std::vector(positions_spheres).swap(positions_spheres); - normals_spheres.resize(0); - std::vector(normals_spheres).swap(normals_spheres); - color_spheres.resize(0); - std::vector(color_spheres).swap(color_spheres); - nb_centers = positions_center.size(); - positions_center.resize(0); - std::vector(positions_center).swap(positions_center); } else { - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT, viewer); + program = getShaderProgram(PROGRAM_NO_SELECTION, viewer); program->bind(); - vaos[1]->bind(); - buffers[1].bind(); - buffers[1].allocate(positions_center.data(), + vaos[Spheres]->bind(); + buffers[Spheres_Vertices].bind(); + buffers[Spheres_Vertices].allocate(positions_center.data(), static_cast(positions_center.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[1].release(); + buffers[Spheres_Vertices].release(); - buffers[2].bind(); - buffers[2].allocate(color_spheres.data(), + buffers[Spheres_Normals].bind(); + buffers[Spheres_Normals].allocate(color_spheres.data(), static_cast(color_spheres.size()*sizeof(float))); program->enableAttributeArray("colors"); program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[2].release(); + buffers[Spheres_Normals].release(); } - vaos[1]->release(); + vaos[Spheres]->release(); program->release(); } @@ -134,45 +122,53 @@ program = getShaderProgram(PROGRAM_INSTANCED_WIRE, viewer); program->bind(); - vaos[2]->bind(); - buffers[5].bind(); - buffers[5].allocate(positions_wire_spheres.data(), + vaos[Wired_Spheres]->bind(); + buffers[Wired_Spheres_Vertices].bind(); + buffers[Wired_Spheres_Vertices].allocate(positions_wire_spheres.data(), static_cast(positions_wire_spheres.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,3); - buffers[5].release(); - + buffers[Wired_Spheres_Vertices].release(); - buffers[3].bind(); + buffers[Spheres_Colors].bind(); program->enableAttributeArray("colors"); program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[3].release(); + buffers[Spheres_Colors].release(); - buffers[2].bind(); + buffers[Spheres_Normals].bind(); program->enableAttributeArray("normals"); program->setAttributeBuffer("normals",GL_FLOAT,0,3); - buffers[2].release(); + buffers[Spheres_Normals].release(); - buffers[6].bind(); - buffers[6].allocate(color_spheres.data(), - static_cast(color_spheres.size()*sizeof(float))); - program->enableAttributeArray("colors"); - program->setAttributeBuffer("colors",GL_FLOAT,0,3); - buffers[6].release(); - buffers[7].bind(); - buffers[7].allocate(positions_center.data(), - static_cast(positions_center.size()*sizeof(float))); + buffers[Spheres_Center].bind(); program->enableAttributeArray("center"); program->setAttributeBuffer("center",GL_FLOAT,0,3); - buffers[7].release(); + buffers[Spheres_Center].release(); viewer->glVertexAttribDivisor(program->attributeLocation("center"), 1); viewer->glVertexAttribDivisor(program->attributeLocation("colors"), 1); - vaos[2]->release(); + vaos[Wired_Spheres]->release(); program->release(); + + nb_lines = positions_lines.size(); + positions_lines.resize(0); + std::vector(positions_lines).swap(positions_lines); + nb_spheres = positions_spheres.size(); + positions_spheres.resize(0); + std::vector(positions_spheres).swap(positions_spheres); + normals_spheres.resize(0); + std::vector(normals_spheres).swap(normals_spheres); + color_spheres.resize(0); + std::vector(color_spheres).swap(color_spheres); + nb_centers = positions_center.size(); + positions_center.resize(0); + std::vector(positions_center).swap(positions_center); + nb_wire = positions_wire_spheres.size(); + positions_wire_spheres.resize(0); + std::vector(positions_wire_spheres).swap(positions_wire_spheres); } } @@ -180,7 +176,7 @@ } void -Scene_polylines_item::compute_elements() +Scene_polylines_item::compute_elements() const { positions_spheres.resize(0); positions_wire_spheres.resize(0); @@ -322,13 +318,11 @@ create_Sphere(d->spheres_drawn_radius); } - - } Scene_polylines_item::Scene_polylines_item() - :Scene_item(8,3) + :CGAL::Three::Scene_item(NbOfVbos,NbOfVaos) ,d(new Scene_polylines_item_private()) ,nbSpheres(0) { @@ -337,7 +331,7 @@ nb_wire = 0; nb_centers = 0; nb_lines = 0; - invalidate_buffers(); + invalidateOpenGLBuffers(); } @@ -352,10 +346,15 @@ return polylines.empty(); } -Scene_interface::Bbox -Scene_polylines_item::bbox() const { +void +Scene_polylines_item::compute_bbox() const { + typedef K::Iso_cuboid_3 Iso_cuboid_3; + if(isEmpty()) - return Bbox(); + { + _bbox =Bbox(); + return; + } std::list boxes; for(std::list >::const_iterator it = polylines.begin(); it != polylines.end(); @@ -371,7 +370,7 @@ CGAL::bounding_box(boxes.begin(), boxes.end()) : Iso_cuboid_3(); - return Bbox(bbox.xmin(), + _bbox = Bbox(bbox.xmin(), bbox.ymin(), bbox.zmin(), bbox.xmax(), @@ -422,84 +421,93 @@ // Shaded OpenGL drawing: only draw spheres void -Scene_polylines_item::draw(Viewer_interface* viewer) const { +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[1]->bind(); - program = getShaderProgram(PROGRAM_INSTANCED); + vaos[Spheres]->bind(); + QOpenGLShaderProgram* program = getShaderProgram(PROGRAM_INSTANCED); attrib_buffers(viewer, PROGRAM_INSTANCED); program->bind(); viewer->glDrawArraysInstanced(GL_TRIANGLES, 0, static_cast(nb_spheres/3), nbSpheres); program->release(); - vaos[1]->release(); + vaos[Spheres]->release(); } else { - vaos[1]->bind(); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); + 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(nb_centers/3)); glDisable(GL_POINT_SMOOTH); program->release(); - vaos[1]->release(); + vaos[Spheres]->release(); } } } // Wireframe OpenGL drawing void -Scene_polylines_item::draw_edges(Viewer_interface* viewer) const { +Scene_polylines_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) + { + compute_elements(); initialize_buffers(viewer); + } - vaos[0]->bind(); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); + 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(nb_lines/4)); program->release(); - vaos[0]->release(); + vaos[Edges]->release(); if(d->draw_extremities) { if(viewer->extension_is_found) { - vaos[2]->bind(); + vaos[Wired_Spheres]->bind(); attrib_buffers(viewer, PROGRAM_INSTANCED_WIRE); program = getShaderProgram(PROGRAM_INSTANCED_WIRE); program->bind(); viewer->glDrawArraysInstanced(GL_LINES, 0, static_cast(nb_wire/3), nbSpheres); program->release(); - vaos[2]->release(); + vaos[Wired_Spheres]->release(); } } } void -Scene_polylines_item::draw_points(Viewer_interface* viewer) const { +Scene_polylines_item::draw_points(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) + { + compute_elements(); initialize_buffers(viewer); + } - vaos[0]->bind(); - attrib_buffers(viewer, PROGRAM_WITHOUT_LIGHT); - program = getShaderProgram(PROGRAM_WITHOUT_LIGHT); + 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(nb_lines/4)); // Clean-up - vaos[0]->release(); + vaos[Edges]->release(); program->release(); } @@ -529,10 +537,10 @@ return menu; } -void Scene_polylines_item::invalidate_buffers() +void Scene_polylines_item::invalidateOpenGLBuffers() { - compute_elements(); are_buffers_filled = false; + compute_bbox(); } @@ -541,7 +549,7 @@ bool ok = true; double proposed_radius = d->spheres_drawn_radius; if(proposed_radius == 0) { - Scene_interface::Bbox b = bbox(); + 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, @@ -567,7 +575,7 @@ if(r >= 0) { d->spheres_drawn_radius = r; d->draw_extremities = (r > 0); - this->invalidate_buffers(); + this->invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } } @@ -669,6 +677,6 @@ metadata.append(other_metadata_variant.toStringList()); setProperty("polylines metadata", metadata); } - invalidate_buffers(); + invalidateOpenGLBuffers(); } diff -Nru cgal-4.7/demo/Polyhedron/Scene_polylines_item.h cgal-4.8/demo/Polyhedron/Scene_polylines_item.h --- cgal-4.7/demo/Polyhedron/Scene_polylines_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_polylines_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,9 +1,9 @@ #ifndef SCENE_POLYLINES_ITEM_H #define SCENE_POLYLINES_ITEM_H #include "Scene_polylines_item_config.h" -#include "Viewer_interface.h" +#include #include -#include "Scene_item.h" +#include #include #include @@ -13,7 +13,7 @@ class Scene_polylines_item_private; -class SCENE_POLYLINES_ITEM_EXPORT Scene_polylines_item : public Scene_item +class SCENE_POLYLINES_ITEM_EXPORT Scene_polylines_item : public CGAL::Three::Scene_item { Q_OBJECT public: @@ -22,14 +22,12 @@ typedef std::vector Polyline; typedef std::list 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; + void compute_bbox() const; Scene_polylines_item* clone() const; @@ -42,14 +40,14 @@ // Flat/Gouraud OpenGL drawing void draw() const {} - void draw(Viewer_interface*) const; + void draw(CGAL::Three::Viewer_interface*) const; // Wireframe OpenGL drawing void draw_edges() const{} - void draw_edges(Viewer_interface*) const; + void draw_edges(CGAL::Three::Viewer_interface*) const; void draw_points() const{} - void draw_points(Viewer_interface*) const; + void draw_points(CGAL::Three::Viewer_interface*) const; void smooth(std::vector& polyline){ @@ -74,7 +72,7 @@ } public Q_SLOTS: - virtual void invalidate_buffers(); + virtual void invalidateOpenGLBuffers(); void change_corner_radii(double); void change_corner_radii(); void split_at_sharp_angles(); @@ -84,7 +82,7 @@ void smooth(){ for (Polylines_container::iterator pit=polylines.begin(),pit_end=polylines.end();pit!=pit_end;++pit) smooth(*pit); - invalidate_buffers(); + invalidateOpenGLBuffers(); Q_EMIT itemChanged(); } public: @@ -93,6 +91,23 @@ // 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 positions_lines; mutable std::vector positions_spheres; mutable std::vector positions_wire_spheres; @@ -104,14 +119,15 @@ mutable std::size_t nb_wire; mutable std::size_t nb_centers; mutable std::size_t nb_lines; - mutable QOpenGLShaderProgram *program; mutable GLuint nbSpheres; typedef std::map Point_to_int_map; typedef Point_to_int_map::iterator iterator; - void create_Sphere(double); - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_elements(); + 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 diff -Nru cgal-4.7/demo/Polyhedron/Scene_segmented_image_item_config.h cgal-4.8/demo/Polyhedron/Scene_segmented_image_item_config.h --- cgal-4.7/demo/Polyhedron/Scene_segmented_image_item_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_segmented_image_item_config.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,10 @@ +#ifndef SCENE_SEGMENTED_IMAGE_ITEM_CONFIG_H +#define SCENE_SEGMENTED_IMAGE_ITEM_CONFIG_H + +#ifdef scene_segmented_image_item_EXPORTS +# define SCENE_SEGMENTED_IMAGE_ITEM_EXPORT Q_DECL_EXPORT +#else +# define SCENE_SEGMENTED_IMAGE_ITEM_EXPORT Q_DECL_IMPORT +#endif + +#endif // SCENE_SEGMENTED_IMAGE_ITEM_CONFIG_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_segmented_image_item.cpp cgal-4.8/demo/Polyhedron/Scene_segmented_image_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_segmented_image_item.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_segmented_image_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,862 @@ +#include "config.h" + +#include "Scene_segmented_image_item.h" +#include "Image_type.h" +#include +#include +#include +#include +#include + + + +// ----------------------------------- +// 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 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::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::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_.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 Indices; + Indices indices_; + std::vector colors_, normals_, vertices_; + std::vector 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( + 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(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(); + compile_shaders(); + initialize_buffers(); + setRenderingMode(Flat); +} + + +Scene_segmented_image_item::~Scene_segmented_image_item() +{ + for(int i=0; icreate(); + //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"<compileSourceCode(fragment_source)) + { + std::cerr<<"Compiling fragmentsource FAILED"<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("

Image %1

" + "

Word type: %2

" + "

Dimensions: %3 x %4 x %5

" + "

Spacings: ( %6 , %7 , %8 )

") + .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 nul_vec(0); + for(std::size_t i=0; isize(); 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(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(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(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(helper.quad_size())); + vao[0].release(); + + color.resize(0); + for(std::size_t i=0; idata(), static_cast(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(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(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(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 *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 -Nru cgal-4.7/demo/Polyhedron/Scene_segmented_image_item.h cgal-4.8/demo/Polyhedron/Scene_segmented_image_item.h --- cgal-4.7/demo/Polyhedron/Scene_segmented_image_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_segmented_image_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,89 @@ +#ifndef SCENE_SEGMENTED_IMAGE_ITEM_H +#define SCENE_SEGMENTED_IMAGE_ITEM_H + +#include +#include "Image_type_fwd.h" +#include "Scene_segmented_image_item_config.h" +#include + +#include +#include +#include + +#include +#include + +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 *v_box; + std::vector 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 *vertices); +public Q_SLOTS: + void changed(); +#endif // SCENE_SEGMENTED_IMAGE_GL_BUFFERS_AVAILABLE +}; + +#endif // SCENE_SEGMENTED_IMAGE_ITEM_H diff -Nru cgal-4.7/demo/Polyhedron/Scene_textured_polyhedron_item.cpp cgal-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.cpp --- cgal-4.7/demo/Polyhedron/Scene_textured_polyhedron_item.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,14 +1,15 @@ #include "Scene_textured_polyhedron_item.h" #include "Textured_polyhedron_type.h" #include +#include +#include #include -#include typedef EPIC_kernel::Point_3 Point; -void Scene_textured_polyhedron_item::initialize_buffers(Viewer_interface *viewer = 0) const +void Scene_textured_polyhedron_item::initialize_buffers(CGAL::Three::Viewer_interface *viewer = 0) const { if(GLuint(-1) == textureId) { viewer->glGenTextures(1, &textureId); @@ -17,29 +18,29 @@ { program = getShaderProgram(PROGRAM_WITH_TEXTURE, viewer); program->bind(); - vaos[0]->bind(); - buffers[0].bind(); - buffers[0].allocate(positions_facets.data(), + vaos[Facets]->bind(); + buffers[Facets_Vertices].bind(); + buffers[Facets_Vertices].allocate(positions_facets.data(), static_cast(positions_facets.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[0].release(); + buffers[Facets_Vertices].release(); - buffers[1].bind(); - buffers[1].allocate(normals.data(), + buffers[Facets_Normals].bind(); + buffers[Facets_Normals].allocate(normals.data(), static_cast(normals.size()*sizeof(float))); program->enableAttributeArray("normal"); program->setAttributeBuffer("normal",GL_FLOAT,0,3); - buffers[1].release(); + buffers[Facets_Normals].release(); - buffers[2].bind(); - buffers[2].allocate(textures_map_facets.data(), + buffers[Facets_Texmap].bind(); + buffers[Facets_Texmap].allocate(textures_map_facets.data(), static_cast(textures_map_facets.size()*sizeof(float))); program->enableAttributeArray("v_texCoord"); program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2); - buffers[2].release(); - vaos[0]->release(); + buffers[Facets_Texmap].release(); + vaos[Facets]->release(); program->release(); } @@ -47,22 +48,22 @@ { program = getShaderProgram(PROGRAM_WITH_TEXTURED_EDGES, viewer); program->bind(); - vaos[1]->bind(); - buffers[3].bind(); - buffers[3].allocate(positions_lines.data(), + vaos[Edges]->bind(); + buffers[Edges_Vertices].bind(); + buffers[Edges_Vertices].allocate(positions_lines.data(), static_cast(positions_lines.size()*sizeof(float))); program->enableAttributeArray("vertex"); program->setAttributeBuffer("vertex",GL_FLOAT,0,4); - buffers[3].release(); + buffers[Edges_Vertices].release(); - buffers[4].bind(); - buffers[4].allocate(textures_map_lines.data(), + buffers[Edges_Texmap].bind(); + buffers[Edges_Texmap].allocate(textures_map_lines.data(), static_cast(textures_map_lines.size()*sizeof(float))); program->enableAttributeArray("v_texCoord"); program->setAttributeBuffer("v_texCoord",GL_FLOAT,0,2); - buffers[4].release(); - vaos[1]->release(); + buffers[Edges_Texmap].release(); + vaos[Edges]->release(); program->release(); } @@ -102,7 +103,7 @@ } void -Scene_textured_polyhedron_item::compute_normals_and_vertices(void) +Scene_textured_polyhedron_item::compute_normals_and_vertices(void) const { positions_facets.resize(0); positions_lines.resize(0); @@ -208,36 +209,36 @@ } Scene_textured_polyhedron_item::Scene_textured_polyhedron_item() - : Scene_item(5,2),poly(new Textured_polyhedron), textureId(-1) + : 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; - invalidate_buffers(); + invalidateOpenGLBuffers(); } Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(Textured_polyhedron* const p) - : Scene_item(5,2),poly(p),textureId(-1),smooth_shading(true) + : 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; - invalidate_buffers(); + invalidateOpenGLBuffers(); } Scene_textured_polyhedron_item::Scene_textured_polyhedron_item(const Textured_polyhedron& p) - : Scene_item(5,2), poly(new Textured_polyhedron(p)),textureId(-1),smooth_shading(true) + : 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; - invalidate_buffers(); + invalidateOpenGLBuffers(); } Scene_textured_polyhedron_item::~Scene_textured_polyhedron_item() @@ -256,7 +257,7 @@ { std::cout<<"LOAD"<> *poly; - invalidate_buffers(); + invalidateOpenGLBuffers(); return in && !isEmpty(); } @@ -287,12 +288,15 @@ } // Points/Wireframe/Flat/Gouraud OpenGL drawing in a display list -void Scene_textured_polyhedron_item::draw(Viewer_interface* viewer) const { +void Scene_textured_polyhedron_item::draw(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) + { + compute_normals_and_vertices(); initialize_buffers(viewer); + } - vaos[0]->bind(); + vaos[Facets]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); attrib_buffers(viewer, PROGRAM_WITH_TEXTURE); @@ -301,13 +305,13 @@ viewer->glDrawArrays(GL_TRIANGLES, 0, static_cast(nb_facets/4)); //Clean-up program->release(); - vaos[0]->release(); + vaos[Facets]->release(); } -void Scene_textured_polyhedron_item::draw_edges(Viewer_interface* viewer) const { +void Scene_textured_polyhedron_item::draw_edges(CGAL::Three::Viewer_interface* viewer) const { if(!are_buffers_filled) initialize_buffers(viewer); - vaos[1]->bind(); + vaos[Edges]->bind(); viewer->glActiveTexture(GL_TEXTURE0); viewer->glBindTexture(GL_TEXTURE_2D, textureId); attrib_buffers(viewer, PROGRAM_WITH_TEXTURED_EDGES); @@ -317,7 +321,7 @@ viewer->glDrawArrays(GL_LINES, 0, static_cast(nb_lines/4)); //Clean-up program->release(); - vaos[1]->release(); + vaos[Edges]->release(); } Textured_polyhedron* @@ -330,8 +334,8 @@ return (poly == 0) || poly->empty(); } -Scene_textured_polyhedron_item::Bbox -Scene_textured_polyhedron_item::bbox() const { +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(); @@ -339,24 +343,14 @@ ++it) { bbox = bbox + it->bbox(); } - return Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), + _bbox = Bbox(bbox.xmin(),bbox.ymin(),bbox.zmin(), bbox.xmax(),bbox.ymax(),bbox.zmax()); } void -Scene_textured_polyhedron_item::invalidate_buffers() +Scene_textured_polyhedron_item::invalidateOpenGLBuffers() { - compute_normals_and_vertices(); - are_buffers_filled = false;} -void -Scene_textured_polyhedron_item:: -contextual_changed() -{ - prev_shading = cur_shading; - cur_shading = renderingMode(); - if(prev_shading != cur_shading) - { - invalidate_buffers(); - } + are_buffers_filled = false; + compute_bbox(); } void Scene_textured_polyhedron_item::selection_changed(bool p_is_selected) diff -Nru cgal-4.7/demo/Polyhedron/Scene_textured_polyhedron_item.h cgal-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.h --- cgal-4.7/demo/Polyhedron/Scene_textured_polyhedron_item.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Scene_textured_polyhedron_item.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,15 +1,15 @@ #ifndef SCENE_TEXTURED_POLYHEDRON_ITEM_H #define SCENE_TEXTURED_POLYHEDRON_ITEM_H #include "Scene_textured_polyhedron_item_config.h" -#include "Scene_item.h" -#include "Viewer_interface.h" +#include +#include #include "Textured_polyhedron_type_fwd.h" #include #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 { + : public CGAL::Three::Scene_item { Q_OBJECT public: Scene_textured_polyhedron_item(); @@ -28,12 +28,12 @@ virtual QString toolTip() const; // Indicate if rendering mode is supported - virtual bool supportsRenderingMode(RenderingMode m) const { return m != Splatting; } + 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(Viewer_interface*) const; + virtual void draw(CGAL::Three::Viewer_interface*) const; virtual void draw_edges() const {} - virtual void draw_edges(Viewer_interface* viewer) const; + virtual void draw_edges(CGAL::Three::Viewer_interface* viewer) const; // Get wrapped textured_polyhedron Textured_polyhedron* textured_polyhedron(); @@ -42,15 +42,29 @@ // Get dimensions bool isFinite() const { return true; } bool isEmpty() const; - Bbox bbox() const; + void compute_bbox() const; - virtual void invalidate_buffers(); - virtual void contextual_changed(); + 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 positions_lines; mutable std::vector positions_facets; mutable std::vector normals; @@ -64,9 +78,9 @@ bool smooth_shading; - using Scene_item::initialize_buffers; - void initialize_buffers(Viewer_interface *viewer) const; - void compute_normals_and_vertices(void); + 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 diff -Nru cgal-4.7/demo/Polyhedron/Selection_widget.ui cgal-4.8/demo/Polyhedron/Selection_widget.ui --- cgal-4.7/demo/Polyhedron/Selection_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Selection_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,285 +0,0 @@ - - - Selection - - - - 0 - 0 - 399 - 556 - - - - Selection - - - - - - - - - - - Selection &Type: - - - Selection_type_combo_box - - - - - - - - Vertex - - - - - Facet - - - - - Edge - - - - - - - - - - - - - - - - - - - - - - - - Insertion - - - true - - - - - - - Removal - - - - - - - - - - - - - Brush &size: - - - Brush_size_spin_box - - - - - - - - - - - - - - - - - - Select &All - - - - - - - &Clear - - - - - - - - - - - - - - - - - - - - - - - - Isolated &Component Size: - - - Threshold_size_spin_box - - - - - - - 999999999 - - - 8 - - - - - - - &Get Minimum - - - - - - - - - Select &Isolated Components Below Threshold - - - - - - - - - - - - - - - - - - Dilate or erode selection: - - - - - - - -50 - - - 50 - - - - - - - Apply - - - - - - - - - - Create Point Set Item from Selected Vertices - - - - - - - Create Polyline Item from Selected Edges - - - - - - - Create Polyhedron Item from Selected Facets - - - - - - - - - - Keep connected components of Selected Facets - - - - - - - Erase Selected Facets from Polyhedron Item - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 75 - true - - - - Create Selection Item - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Shortest_path_widget.ui cgal-4.8/demo/Polyhedron/Shortest_path_widget.ui --- cgal-4.7/demo/Polyhedron/Shortest_path_widget.ui 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Shortest_path_widget.ui 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ - - - Shortest_path - - - - 0 - 0 - 334 - 402 - - - - Shortest_path - - - - - - - Shortest_path &Type: - - - Selection_type_combo_box - - - - - - - - Insertion - - - - - Removal - - - - - Compute Path - - - - - - - - - Vertex - - - - - Edge - - - - - Face - - - - - - - - - - diff -Nru cgal-4.7/demo/Polyhedron/Statistics_on_item_dialog.ui cgal-4.8/demo/Polyhedron/Statistics_on_item_dialog.ui --- cgal-4.7/demo/Polyhedron/Statistics_on_item_dialog.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Statistics_on_item_dialog.ui 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,103 @@ + + + Statistics_on_item_dialog + + + Qt::NonModal + + + + 0 + 0 + 574 + 563 + + + + + 0 + 0 + + + + Statistics on Polyhedron + + + false + + + + + + QDialogButtonBox::Ok + + + + + + + Update + + + + + + + + + + 0 + 0 + + + + false + + + QTextEdit::NoWrap + + + true + + + + + + + + + + + okButtonBox + rejected() + Statistics_on_item_dialog + reject() + + + 257 + 119 + + + 257 + 143 + + + + + okButtonBox + accepted() + Statistics_on_item_dialog + accept() + + + 177 + 123 + + + 53 + 125 + + + + + diff -Nru cgal-4.7/demo/Polyhedron/texture.cpp cgal-4.8/demo/Polyhedron/texture.cpp --- cgal-4.7/demo/Polyhedron/texture.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/texture.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -200,7 +200,7 @@ 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; + return 1; } ////////////////////////////////////////////// @@ -684,7 +684,7 @@ 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; + return 1; } //******************************************** @@ -754,7 +754,7 @@ m_pData[m_WidthByte32*j + i*BytePerPixel+2] = (unsigned char)buffer[width*j+i]; } - return 1; + return 1; } @@ -817,20 +817,20 @@ m_pData[m_WidthByte32*j + i*3+1] = g; m_pData[m_WidthByte32*j + i*3+2] = b; } - for(unsigned j=0;j - -#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 -Nru cgal-4.7/demo/Polyhedron/Viewer.cpp cgal-4.8/demo/Polyhedron/Viewer.cpp --- cgal-4.7/demo/Polyhedron/Viewer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Viewer.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,35 +1,46 @@ #include "Viewer.h" #include -#include "Scene_draw_interface.h" +#include #include #include #include #include +#include +#include +#include + class Viewer_impl { public: - Scene_draw_interface* scene; + 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 shader_programs; +}; Viewer::Viewer(QWidget* parent, bool antialiasing) - : Viewer_interface(parent) + : 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); @@ -38,9 +49,6 @@ 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, @@ -53,6 +61,8 @@ pickMatrix_[5]=1; pickMatrix_[10]=1; pickMatrix_[15]=1; + prev_radius = sceneRadius(); + axis_are_displayed = true; } Viewer::~Viewer() @@ -60,7 +70,7 @@ delete d; } -void Viewer::setScene(Scene_draw_interface* scene) +void Viewer::setScene(CGAL::Three::Scene_draw_interface* scene) { d->scene = scene; } @@ -82,22 +92,28 @@ updateGL(); } -bool Viewer::inFastDrawing() const { - return d->inFastDrawing; + +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->inFastDrawing = false; - QGLViewer::draw(); d->draw_aux(false, this); } void Viewer::fastDraw() { - d->inFastDrawing = true; - QGLViewer::fastDraw(); d->draw_aux(false, this); } @@ -125,8 +141,93 @@ setBackgroundColor(::Qt::white); - d->scene->initializeGL(); + 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"<compileSourceCode(fragment_source)) + { + std::cerr<<"Compiling fragmentsource FAILED"< @@ -167,6 +268,10 @@ 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) ) @@ -189,7 +294,6 @@ { if(scene == 0) return; - viewer->glLineWidth(1.0f); viewer->glPointSize(2.f); viewer->glEnable(GL_POLYGON_OFFSET_FILL); @@ -246,7 +350,7 @@ dir.x, dir.y, dir.z); } } -bool Viewer_interface::readFrame(QString s, qglviewer::Frame& frame) +bool CGAL::Three::Viewer_interface::readFrame(QString s, qglviewer::Frame& frame) { QStringList list = s.split(" ", QString::SkipEmptyParts); if(list.size() != 7) @@ -275,7 +379,7 @@ return true; } -QString Viewer_interface::dumpFrame(const qglviewer::Frame& frame) { +QString CGAL::Three::Viewer_interface::dumpFrame(const qglviewer::Frame& frame) { const qglviewer::Vec pos = frame.position(); const qglviewer::Quaternion q = frame.orientation(); @@ -308,18 +412,138 @@ } } -/** - * @brief Viewer::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 sustem changed to use shaders, and these need this value. pickMatrix_ is passed to the shaders in - * Scene_item::attrib_buffers(Viewer_interface* viewer, int program_name). - * @param x - * @param y - * @param width - * @param height - * @param viewport - */ +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(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]) @@ -366,7 +590,7 @@ void Viewer::endSelection(const QPoint& point) { QGLViewer::endSelection(point); - //set dthe pick matrix to Identity + //set the pick matrix to Identity for(int i=0; i<16; i++) pickMatrix_[i]=0; pickMatrix_[0]=1; @@ -374,3 +598,567 @@ 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(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(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(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(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(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(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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_c3t3_edges.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_no_light_no_selection.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_texture.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_plane_two_faces.f")) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_textured_edges.f" )) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_with_light.f" )) + { + std::cerr<<"adding fragment shader FAILED"<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"<addShaderFromSourceFile(QOpenGLShader::Fragment,":/cgal/Polyhedron_3/resources/shader_without_light.f" )) + { + std::cerr<<"adding fragment shader FAILED"<bindAttributeLocation("colors", 1); + program->link(); + d->shader_programs[PROGRAM_INSTANCED_WIRE] = program; + return program; + + } + break; + default: + std::cerr<<"ERROR : Program not found."<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 -Nru cgal-4.7/demo/Polyhedron/Viewer.h cgal-4.8/demo/Polyhedron/Viewer.h --- cgal-4.7/demo/Polyhedron/Viewer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Polyhedron/Viewer.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,21 +1,30 @@ +//! \file Viewer.h + #ifndef VIEWER_H #define VIEWER_H -#include "Viewer_config.h" -#include +#include +#include +#include +#include +#include #include #include // forward declarations class QWidget; +namespace CGAL{ +namespace Three{ class Scene_draw_interface; +} +} class QMouseEvent; class QKeyEvent; class Viewer_impl; - -class VIEWER_EXPORT Viewer : public Viewer_interface { +//!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 @@ -24,36 +33,106 @@ ~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); - void setScene(Scene_draw_interface* scene); + //! 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 *vertices; + std::vector *normals; + std::vector *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 v_Axis; + //! Holds the normals data for the axis system + std::vector n_Axis; + //! Holds the color data for the axis system + std::vector 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 -Nru cgal-4.7/demo/Principal_component_analysis/cleanup.bat cgal-4.8/demo/Principal_component_analysis/cleanup.bat --- cgal-4.7/demo/Principal_component_analysis/cleanup.bat 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/demo/Principal_component_analysis/cleanup.bat 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Straight_skeleton_2/cgal_types.h cgal-4.8/demo/Straight_skeleton_2/cgal_types.h --- cgal-4.7/demo/Straight_skeleton_2/cgal_types.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/cgal_types.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// -#ifndef CGAL_TYPES -#define CGAL_TYPES - -#include -#include -#include - -#include -#include - -#include -#include - -#if USE_BIG_FLOAT - -#include - -#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 CGAL_Polygon ; - -typedef K::FT FT ; -typedef K::Point_2 Point; -typedef std::vector Polygon; -typedef boost::shared_ptr PolygonPtr; -typedef CGAL::Segment_2 Segment; -typedef std::vector Region ; -typedef boost::shared_ptr RegionPtr ; -typedef std::vector Regions ; -typedef std::set Doubles ; - -} -#endif diff -Nru cgal-4.7/demo/Straight_skeleton_2/CMakeLists.txt cgal-4.8/demo/Straight_skeleton_2/CMakeLists.txt --- cgal-4.7/demo/Straight_skeleton_2/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -# This is the CMake script for compiling a CGAL application. - -project( straight_skeleton_2 ) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -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 Qt5: 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 -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_0.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_0.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_0.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_0.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 60.4827 5.07777 60.4795 5.0701 60.4858 5.06574 60.4868 5.06218 60.4859 5.06127 60.4783 5.06598 60.473 5.07754 60.4708 5.07964 60.467 5.08542 60.4658 5.11313 60.4692 5.11443 60.4671 5.08079 60.4558 5.0851 60.4525 5.08343 60.4515 5.08126 60.4507 5.07485 60.4527 5.07298 60.4453 5.07637 60.442 5.09674 60.4473 5.10051 60.4495 5.09988 60.4529 5.10658 60.4519 5.11072 60.447 5.11528 60.45 5.12215 60.448 5.12717 60.4434 5.13357 60.4439 5.14035 60.4424 5.14692 60.4445 5.15667 60.4445 5.17486 60.4388 5.16691 60.4341 5.16908 60.4273 5.15327 60.425 5.14971 60.4284 5.14767 60.4303 5.14424 60.4287 5.14231 60.4241 5.1444 60.4177 5.1614 60.4033 5.16545 60.3939 5.1837 60.3903 5.1878 60.3958 5.19508 60.3991 5.19967 60.3968 5.20824 60.3981 5.22265 60.3978 5.22773 60.4056 5.23388 60.4074 5.23837 60.4134 5.24415 60.4148 5.25141 60.4105 5.25667 60.4096 5.25734 60.411 5.24527 60.4273 5.23036 60.4475 5.23209 60.4508 5.24351 60.4492 5.24402 60.4515 5.23647 60.4599 5.22727 60.4646 5.22544 60.4695 5.22764 60.4754 5.22028 60.4801 5.22331 60.4839 5.219 60.4872 5.20576 60.4884 5.18156 60.5014 5.16719 60.5062 5.16304 60.5035 5.15595 60.5041 5.15075 60.5021 5.13981 60.5092 5.1386 60.51 5.12094 60.5175 5.10543 60.5209 5.09251 60.5204 5.08949 60.5166 5.08166 60.5137 5.07623 60.5254 5.06351 60.5262 5.05277 60.5289 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_1.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_1.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_1.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_1.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 4.92495 61.7872 4.94077 61.7904 4.9355 61.795 4.94242 61.7992 4.95025 61.798 4.9519 61.7978 4.95123 61.7939 4.95532 61.7878 4.96655 61.7849 4.95493 61.78 4.95764 61.7785 5 61.7861 5.02327 61.7968 5.03297 61.7967 5.04356 61.802 5.05024 61.8025 5.0583 61.8084 5.06952 61.8105 5.0816 61.8156 5.09602 61.8162 5.10916 61.8234 5.11868 61.833 5.12256 61.8369 5.12956 61.8408 5.13594 61.8429 5.14757 61.843 5.14927 61.8442 5.14622 61.8475 5.15151 61.8528 5.14923 61.857 5.14097 61.8622 5.14281 61.8653 5.15313 61.8595 5.16121 61.8502 5.16073 61.8451 5.14687 61.8365 5.13375 61.8341 5.13074 61.8322 5.12869 61.8277 5.13218 61.8247 5.13791 61.8251 5.14455 61.8309 5.15049 61.8328 5.16308 61.8329 5.17619 61.8302 5.18884 61.8309 5.19056 61.831 5.20766 61.8354 5.21714 61.834 5.25167 61.8359 5.25501 61.8388 5.25176 61.8483 5.25745 61.8618 5.25502 61.8645 5.23653 61.8699 5.20272 61.8742 5.16412 61.8756 5.14264 61.8788 5.12334 61.8782 5.08762 61.8797 5.07453 61.8846 5.05044 61.8886 5.03267 61.8893 5.03135 61.8894 5.00572 61.8938 5 61.8957 4.98077 61.9021 4.94261 61.9108 4.93297 61.9104 4.91732 61.906 4.903 61.8999 4.89939 61.896 4.90787 61.8925 4.91997 61.8903 4.92613 61.8862 4.92268 61.884 4.91519 61.885 4.90939 61.8825 4.8998 61.8818 4.88793 61.8829 4.87796 61.8769 4.87228 61.8762 4.86401 61.8771 4.85839 61.8777 4.85019 61.8702 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_2.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_2.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_2.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_2.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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.8611 12.417 65.8579 12.4255 65.8564 12.4494 65.8618 12.47 65.8583 12.502 65.8755 12.5103 65.8774 12.5195 65.8855 12.5365 65.8924 12.5375 65.8998 12.5567 65.9083 12.5737 65.9137 12.5954 65.9206 12.6042 65.9281 12.6267 65.9342 12.6781 65.9575 12.6974 65.9616 12.7329 65.9736 12.7766 65.9824 12.7805 65.9812 12.7783 65.9796 12.7581 65.9746 12.7571 65.9719 12.7798 65.9785 12.8236 65.9839 12.8304 65.9854 12.8435 65.9882 12.8515 65.9852 12.8773 65.9948 12.9237 66.0068 12.9268 66.009 12.9237 66.0139 12.9309 66.0232 12.9253 66.0258 12.9168 66.026 12.8987 66.0227 12.8944 66.0236 12.9067 66.033 12.9227 66.0414 12.9205 66.044 12.9075 66.0409 12.8836 66.0382 12.877 66.0352 12.873 66.0333 12.8481 66.0287 12.8264 66.0276 12.803 66.0233 12.747 66.0199 12.7174 66.0142 12.6916 66.0019 12.6485 65.9889 12.6182 65.9839 12.6163 65.9856 12.6222 65.9875 12.6355 65.9917 12.6327 65.9929 12.6227 65.9911 12.6194 65.9923 12.6297 65.9962 12.6403 66.0039 12.6629 66.0127 12.6675 66.0181 12.7022 66.0294 12.7022 66.0311 12.663 66.0252 12.638 66.0194 12.633 66.0205 12.6474 66.0258 12.6436 66.0281 12.6273 66.025 12.6148 66.0262 12.6057 66.0253 12.5856 66.0155 12.5412 66.0017 12.4943 65.9814 12.491 65.9768 12.4669 65.9636 12.4548 65.9542 12.4582 65.9501 12.4517 65.9408 12.4618 65.9313 12.4572 65.9276 12.4528 65.9276 12.4322 65.9277 12.4276 65.9251 12.4176 65.9258 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_3.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_3.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_3.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_3.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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.88364 61.1967 4.88985 61.1917 4.90127 61.1867 4.90158 61.1803 4.89327 61.1741 4.89512 61.1623 4.90335 61.1542 4.90674 61.1465 4.91309 61.1431 4.90517 61.1327 4.90217 61.1334 4.89679 61.144 4.88914 61.1491 4.88732 61.1633 4.88386 61.1689 4.87244 61.1735 4.86531 61.1763 4.86275 61.1748 4.8647 61.1673 4.85421 61.1627 4.86048 61.1501 4.85 61.1552 4.84211 61.1663 4.82663 61.1654 4.81217 61.1569 4.82403 61.1521 4.82488 61.143 4.8312 61.1398 4.82995 61.1317 4.83398 61.1257 4.82425 61.1246 4.82682 61.1187 4.83356 61.1158 4.83385 61.112 4.83464 61.0959 4.83404 61.0949 4.83112 61.0898 4.83604 61.0744 4.82258 61.0634 4.82185 61.0599 4.84384 61.0467 4.85135 61.0471 4.85777 61.0529 4.86327 61.0538 4.86097 61.0631 4.8668 61.0696 4.86707 61.0779 4.87152 61.0817 4.90142 61.096 4.9024 61.0988 4.89888 61.1047 4.89786 61.1065 4.89988 61.1076 4.90839 61.1012 4.91518 61.1007 4.92065 61.0872 4.91843 61.0742 4.92577 61.0681 4.92657 61.0567 4.93139 61.0562 4.94118 61.0594 4.94707 61.073 4.96112 61.086 4.97068 61.0855 5 61.0947 5.00909 61.0976 5.01278 61.0995 5.01987 61.1031 5.0266 61.1101 5.03241 61.1218 5.02377 61.1373 5.02414 61.1527 5.01306 61.166 5.0151 61.1702 5.00485 61.1741 5 61.1812 4.9943 61.1895 5 61.1949 5.00112 61.196 5 61.1964 4.99186 61.1997 4.9893 61.1957 4.98524 61.1946 4.97207 61.1988 4.97441 61.199 4.98522 61.1996 4.98559 61.2026 4.98022 61.2058 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_4.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_4.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_4.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_4.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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.4365 5.60279 60.4399 5.6115 60.4377 5.62305 60.4462 5.62604 60.4532 5.63425 60.4595 5.64236 60.4637 5.64877 60.4642 5.66161 60.4735 5.68186 60.4773 5.68904 60.4732 5.69122 60.473 5.70129 60.4721 5.71008 60.4695 5.71454 60.4706 5.71731 60.4734 5.71156 60.4773 5.71116 60.4881 5.70493 60.5032 5.70388 60.5318 5.71387 60.5696 5.71984 60.5814 5.72088 60.5835 5.71785 60.5905 5.72189 60.5998 5.72061 60.6103 5.71623 60.617 5.73181 60.6635 5.73044 60.6717 5.7329 60.6794 5.72851 60.6861 5.70727 60.6958 5.69741 60.6966 5.6959 60.6967 5.68289 60.6907 5.67689 60.6847 5.67356 60.6851 5.67021 60.6939 5.64991 60.7061 5.61834 60.6966 5.61363 60.6941 5.61305 60.6893 5.61684 60.6834 5.62272 60.6818 5.63563 60.6883 5.64337 60.6868 5.64209 60.6833 5.61635 60.6671 5.6177 60.6647 5.62265 60.663 5.61921 60.6588 5.60065 60.636 5.59023 60.6287 5.58958 60.6215 5.57897 60.6209 5.57041 60.6164 5.5595 60.6148 5.55596 60.611 5.55256 60.6117 5.55059 60.6151 5.54445 60.6155 5.52482 60.6131 5.5147 60.615 5.50161 60.6099 5.50053 60.608 5.5027 60.6062 5.51528 60.6035 5.51702 60.5935 5.50304 60.5989 5.48272 60.5978 5.47513 60.5798 5.4782 60.5756 5.47281 60.5745 5.4635 60.5851 5.45894 60.5739 5.44377 60.5648 5.46604 60.5492 5.46918 60.5445 5.49179 60.5321 5.49592 60.5268 5.49659 60.5259 5.48912 60.526 5.47798 60.5313 5.46133 60.5442 5.45598 60.5508 5.43235 60.5608 5.42811 60.5611 5.42441 60.5557 5.41453 60.5589 5.40973 60.5571 5.40822 60.5525 5.38241 60.5484 5.36289 60.5482 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/complex_5.poly cgal-4.8/demo/Straight_skeleton_2/data/complex_5.poly --- cgal-4.7/demo/Straight_skeleton_2/data/complex_5.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/complex_5.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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.6421 23.6759 70.6391 23.6723 70.6368 23.66 70.6371 23.6521 70.6312 23.6539 70.626 23.6002 70.6085 23.598 70.6057 23.6089 70.6034 23.6273 70.6024 23.6248 70.6058 23.6267 70.6063 23.6414 70.6098 23.6461 70.6071 23.6439 70.6036 23.657 70.6045 23.6676 70.598 23.6766 70.5861 23.6898 70.5758 23.6882 70.5717 23.6798 70.5676 23.7048 70.562 23.7273 70.5468 23.7203 70.5434 23.7316 70.5372 23.7285 70.5306 23.7478 70.5209 23.7593 70.5199 23.7782 70.514 23.8156 70.5117 23.8622 70.5137 23.8872 70.5094 23.9015 70.5088 23.9649 70.5168 23.9847 70.5221 23.9955 70.525 23.9992 70.5289 24.0021 70.5521 24.0174 70.5547 24.0247 70.5618 24.099 70.5851 24.1387 70.612 24.1377 70.6168 24.1072 70.6225 24.1148 70.624 24.1217 70.6235 24.1234 70.629 24.1291 70.6312 24.1252 70.634 24.0981 70.6306 24.0971 70.6354 24.1065 70.6412 24.0934 70.6502 24.0622 70.6473 24.0486 70.6492 24.0591 70.6526 24.0793 70.6558 24.0851 70.6596 24.057 70.6815 24.039 70.6895 24.0234 70.6935 24.0104 70.6945 24.0082 70.6943 23.9951 70.6932 23.9876 70.6949 23.9851 70.6976 23.9889 70.7026 23.9849 70.7049 23.9553 70.707 23.9322 70.7113 23.9183 70.7098 23.8662 70.7154 23.8565 70.7148 23.8228 70.7052 23.8204 70.7002 23.8098 70.6953 23.8038 70.6994 23.7816 70.6982 23.7811 70.7 23.7958 70.7036 23.7912 70.7072 23.7955 70.7109 23.8382 70.7202 23.8475 70.7269 23.8373 70.7288 23.8317 70.728 23.821 70.721 23.8147 70.7201 23.8099 70.7215 23.8153 70.731 23.8024 70.7345 23.8103 70.7395 23.8065 70.7452 23.7873 70.7483 23.7679 70.7476 \ No newline at end of file diff -Nru cgal-4.7/demo/Straight_skeleton_2/data/large_1.poly cgal-4.8/demo/Straight_skeleton_2/data/large_1.poly --- cgal-4.7/demo/Straight_skeleton_2/data/large_1.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/large_1.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Straight_skeleton_2/data/large_2.poly cgal-4.8/demo/Straight_skeleton_2/data/large_2.poly --- cgal-4.7/demo/Straight_skeleton_2/data/large_2.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/large_2.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Straight_skeleton_2/data/large_3.poly cgal-4.8/demo/Straight_skeleton_2/data/large_3.poly --- cgal-4.7/demo/Straight_skeleton_2/data/large_3.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/large_3.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Straight_skeleton_2/data/large_4.poly cgal-4.8/demo/Straight_skeleton_2/data/large_4.poly --- cgal-4.7/demo/Straight_skeleton_2/data/large_4.poly 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/data/large_4.poly 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Straight_skeleton_2/help/index.html cgal-4.8/demo/Straight_skeleton_2/help/index.html --- cgal-4.7/demo/Straight_skeleton_2/help/index.html 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/help/index.html 1970-01-01 00:00:00.000000000 +0000 @@ -1,231 +0,0 @@ - - - - 2D Straight Skeleton and Offsetting demo - - - -

How to use 2D Straight Skeleton and Polygon Offseting Demo

-
- Main Functionality -

- Input - - Generation - - Persistance - - -

 

-

 

-

 

-

 

- -

-  

-

-  

-

- Reset application

-

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)

- -

-  

-

-  

-

-

Create a new window

- 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).

- -

-  

-

-  

-

Print -

-

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.

- - -

-  

-

-  

-

-

Close the current window

- 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.

- -

-  

-

-  

-

- Quit the application

-

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.

- -

-  

-

-  

-

- Create a new simple polygon with holes

- -

This package supports polygons with holes. To create a a polygon with holes you must - first create the outer 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.

-

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.

- -

-  

-

-  

-

- Generate the straight skeleton on the exterior of the polygon

-

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).
- As explained in the package's User Manual, the outer skeleton is constructed by placing the polygon - as a hole of a big frame. 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.
- If the construction fails for any reason, a critical dialog will pop up saying so.

- -

-  

-

-  

-

- Generate the straight skeleton in the interior of the polygon

-

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.

- -

-  

-

-  

-

- Set the offset distance

-

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.
- 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). -

- -

-  

-

-  

-

- Generate offset polygons

-

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.
- The offset polygons will be created in the same region were the skeleton was created (exterior or interior)
- If you loaded or drawn a polygon, and after 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.
- If the construction fails for any reason, a critical dialog will pop up saying so.

- -

-  

-

-  

-

-

Load an existing polygon wit holes

- 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.
- 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.

-

 

-

 

- - -

-  

-

-  

-

-

Save the current polygon with holes

- 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.

- -

-  

-

-  

-

-

Polygon with holes file format

-

The files loaded and saved by this demo must have the extension ".poly" - and follow this simple text-based format:

-
-      (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
-      ..
-      ..
-    
-

The package is distributed with some sample files you can look at

- - -
-Last modified: Thu March, 2006 - - diff -Nru cgal-4.7/demo/Straight_skeleton_2/ss_types.h cgal-4.8/demo/Straight_skeleton_2/ss_types.h --- cgal-4.7/demo/Straight_skeleton_2/ss_types.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/ss_types.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// -#ifndef SSKEL_DEMO_SS_TYPES_H -#define SSKEL_DEMO_SS_TYPES_H - -#include -#include -#include - -namespace demo -{ - -typedef CGAL::Straight_skeleton_2 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 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 SSkelBuilderTraits; -typedef CGAL::Straight_skeleton_builder_2 SSkelBuilder; - -typedef CGAL::Polygon_offset_builder_traits_2 OffsetBuilderTraits; -typedef CGAL::Polygon_offset_builder_2 OffsetBuilder; - - -} - -#endif // SSKEL_DEMO_SS_TYPES_H diff -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2.cpp cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2.cpp --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#include - - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "cgal_types.h" -#include -#include -#include -#include -#include -#include - -#include - -#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 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@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 -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_layers.h cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_layers.h --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_layers.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_layers.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#include - -template -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 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 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
FigurePtr ; - typedef std::vector 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 -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#include - - -#include "cgal_types.h" -#include "ss_types.h" -#include "straight_skeleton_2_toolbar.h" - -// icons - -#include -#include - -#include - - -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 -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#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 -#include - - -#include -#include -#include -#include -#include - -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 getpolybut; -};//end class - -#endif diff -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#include - - -#include "cgal_types.h" -#include "ss_types.h" -#include "straight_skeleton_2_toolbar_layers.h" -#include "straight_skeleton_2_layers.h" - -// icons -#include -#include -#include - -#include - -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 (this,"Input",in,CGAL::RED); - showSSkel = new Qt_layer_show_skeleton (this,"Skeleton",sskel); - showO = new Qt_layer_show_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; isetToggleButton(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 -Nru cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h --- cgal-4.7/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Straight_skeleton_2/straight_skeleton_2_toolbar_layers.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// - -#ifndef CGAL_STRAIGHTSKELETON_2_TOOLBAR_LAYERS_H -#define CGAL_STRAIGHTSKELETON_2_TOOLBAR_LAYERS_H - -#include - -#include -#include -#include -#include -#include -#include - - -template class Qt_layer_show_regions; -template 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 *showI; - Qt_layer_show_skeleton *showSSkel; - Qt_layer_show_regions *showO; - Qt_layer_show_progress *progress ; - -};//end class - -#endif diff -Nru cgal-4.7/demo/Surface_mesh_deformation/CMakeLists.txt cgal-4.8/demo/Surface_mesh_deformation/CMakeLists.txt --- cgal-4.7/demo/Surface_mesh_deformation/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Surface_mesh_deformation/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp cgal-4.8/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp --- cgal-4.7/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Surface_mesh_deformation/deform_mesh_for_botsch08_format.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,96 @@ +#include +#include +#include +#include +// HalfedgeGraph adapters for Polyhedron_3 +#include +#include +#include +// #define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP +#include + +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; + +typedef CGAL::Surface_mesh_deformation 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 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 -Nru cgal-4.7/demo/Surface_mesher/binary_image.h cgal-4.8/demo/Surface_mesher/binary_image.h --- cgal-4.7/demo/Surface_mesher/binary_image.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/binary_image.h 2016-04-04 19:00:12.000000000 +0000 @@ -44,10 +44,17 @@ typedef FT_ FT; public: - CBinary_image_3() : Image_3(), interpolate_(true) + 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_) { @@ -56,9 +63,6 @@ max_value = bi.max_value; } - ~CBinary_image_3() - { - } void finish_open() { CGAL_IMAGE_IO_CASE(image_ptr.get(), diff -Nru cgal-4.7/demo/Surface_mesher/CMakeLists.txt cgal-4.8/demo/Surface_mesher/CMakeLists.txt --- cgal-4.7/demo/Surface_mesher/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -41,11 +41,11 @@ add_definitions(-DQT_NO_KEYWORDS) include( ${CGAL_USE_FILE} ) - find_package(Qt5 QUIET COMPONENTS OpenGL Xml ) + find_package(Qt5 QUIET COMPONENTS OpenGL Xml Svg) find_package(QGLViewer ) find_package(OpenGL ) - if ( QGLVIEWER_FOUND AND Qt5_FOUND) + if ( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) include_directories( ${QGLVIEWER_INCLUDE_DIR} ) @@ -92,18 +92,33 @@ add_executable ( ${prj} ${sources} ${uis} ${qrc_sources} ) - qt5_use_modules(${prj} OpenGL Xml ) + 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} ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) + target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${VTK_LIBS}) - else( QGLVIEWER_FOUND AND Qt5_FOUND) + 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) + 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... diff -Nru cgal-4.7/demo/Surface_mesher/mainwindow.cpp cgal-4.8/demo/Surface_mesher/mainwindow.cpp --- cgal-4.7/demo/Surface_mesher/mainwindow.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/mainwindow.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -136,6 +136,29 @@ } } +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(); diff -Nru cgal-4.7/demo/Surface_mesher/mainwindow.h cgal-4.8/demo/Surface_mesher/mainwindow.h --- cgal-4.7/demo/Surface_mesher/mainwindow.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/mainwindow.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,6 +26,7 @@ private Q_SLOTS: void on_action_Open_triggered(); + void on_action_OpenDirectory_triggered(); void on_action_Quit_triggered(); void on_action_Clone_triggered(); diff -Nru cgal-4.7/demo/Surface_mesher/polyhedral_surface.h cgal-4.8/demo/Surface_mesher/polyhedral_surface.h --- cgal-4.7/demo/Surface_mesher/polyhedral_surface.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/polyhedral_surface.h 2016-04-04 19:00:12.000000000 +0000 @@ -96,7 +96,7 @@ int selected_edge; int selected_facet; bool is_dirty; - GLuint list_id; + GLint list_id; Connection_map connection_map; }; diff -Nru cgal-4.7/demo/Surface_mesher/ui/mainwindow.ui cgal-4.8/demo/Surface_mesher/ui/mainwindow.ui --- cgal-4.7/demo/Surface_mesher/ui/mainwindow.ui 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/ui/mainwindow.ui 2016-04-04 19:00:12.000000000 +0000 @@ -1,7 +1,8 @@ - + + MainWindow - - + + 0 0 @@ -9,22 +10,22 @@ 648 - + CGAL Surface mesh generator - - + + :/icons/cgal_logo.xpm:/icons/cgal_logo.xpm - + true - - - - - - + + + + + + 1 0 @@ -33,172 +34,173 @@ - - + + 0 0 1147 - 29 + 21 - - + + &File - - - - - + + + + + + - - + + &Options - + volume polyhedral - - - - - - - - - - - - - + + + + + + + + + + + + + - - + + &Edit - + polyhedral - + - - - + + + - - - + + + Actions toolbar - + Qt::AllToolBarAreas - + TopToolBarArea - + false - - - - - - - - - - - + + + + + + + + + + + - - + + true - + Meshing toolbar - + volume - + TopToolBarArea - + false - - + + - - + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea - + Images options - + volume - + 1 - - - - + + + + - - - + + + 0 0 - + &Image type - + volume - + - - - + + + 0 0 - + Grayscale image - + true - - - + + + 0 0 - + Segmented image @@ -207,27 +209,27 @@ - - + + &Operations - + - - + + Trilinear interpolation - + true - - + + Search for seeds - + true @@ -236,74 +238,74 @@ - - - + + + 0 0 - + C&riteria - + volume - + - - + + Manifold - - + + Facets vertices have same index - - - - + + + + &Sizing bound: - + spinBox_radius_bound - - - + + + 5 - + 9999.989999999999782 - - - + + + &Distance bound: - + spinBox_distance_bound - - - + + + 5 - + 9999.989999999999782 @@ -315,15 +317,15 @@ - - - + + + Qt::Vertical - + QSizePolicy::Expanding - + 20 0 @@ -334,41 +336,41 @@ - - - + + + 0 0 - + Image sub-domaines - + volume - + 1 - - - + + + 10 10 - - - - - + + + + + 0 5 - + volume @@ -378,391 +380,400 @@ - - - + + + :/icons/fileopen.png:/icons/fileopen.png - + &Open... - + Ctrl+O - - + + &Quit - + Ctrl+Q - + QAction::QuitRole - - + + true - - + + :/icons/flip.png:/icons/flip.png - + &Inverse normals - + Flip - + Ctrl+I - + volume polyhedral - - + + true - - + + :/icons/bbox.png:/icons/bbox.png - + Display oc&tree - + Ctrl+T - + polyhedral - - + + true - + true - - + + :/icons/surface.png:/icons/surface.png - + Display &surface - + polyhedral - - + + &Options... - + polyhedral - - + + Piecewise-smooth &subdivision - + Ctrl+S - + polyhedral - - + + true - + true - + Display &all edges - + Ctrl+A - + polyhedral - - + + true - + false - + Display &control edges - + Ctrl+C - + polyhedral - - + + true - - + + :/icons/bbox-red.png:/icons/bbox-red.png - + Display edges octree - + polyhedral - - + + Marching &cubes - + Marching &cubes - + volume - - + + Surface &mesher - + Surface &mesher - + volume - - + + true - + true - - + + :/icons/twosides.png:/icons/twosides.png - + Display facets with &front and back - + Two-sides - + Ctrl+F - + volume polyhedral - - + + Clone - - + + true - + false - - + + :/icons/resize.png:/icons/resize.png - + Auto-&resize - + Auto-&resize - + Automaticaly zoom in or out when the object change. - + Ctrl+S - + volume polyhedral - - + + true - + true - + Draw triangles &edges - + Draw triangles &edges - + Ctrl+E - + volume - - + + true - + false - + Use &Gouraud shading (marching cube only) - + Use &Gouraud shading - + Use Gouraud shading to display the marching cubes. - + Ctrl+G - + volume - - + + true - + Show the whole &triangulation (surface mesher only) - + Ctrl+T - + volume - - + + Choose the triangulation edges &color... - + volume - - - + + + :/icons/filesave.png:/icons/filesave.png - + Export surface mesh to OFF... - + volume - - + + true - + true - - + + :/icons/bbox.png:/icons/bbox.png - + Show the image &bounding box - + Ctrl+B - + volume - - - + + + :/icons/filesave.png:/icons/filesave.png - + Save the image as Inrimage... + + + + :/icons/fileopen.png:/icons/fileopen.png + + + Open directory... + + - Viewer - QGLViewer -
viewer.h
-
- Values_list QWidget
values_list.h
1
+ + Viewer + QWidget +
viewer.h
+
viewer @@ -774,7 +785,7 @@ spinBox_distance_bound - + @@ -783,11 +794,11 @@ sameIndexCheckBox setDisabled(bool) - + 130 172 - + 139 414 diff -Nru cgal-4.7/demo/Surface_mesher/ui/raw_image.ui cgal-4.8/demo/Surface_mesher/ui/raw_image.ui --- cgal-4.7/demo/Surface_mesher/ui/raw_image.ui 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/ui/raw_image.ui 2016-04-04 19:00:12.000000000 +0000 @@ -134,7 +134,7 @@ vx:
- 3 + 5 1.000000000000000 @@ -147,7 +147,7 @@ vy: - 3 + 5 1.000000000000000 @@ -160,7 +160,7 @@ vz: - 3 + 5 1.000000000000000 diff -Nru cgal-4.7/demo/Surface_mesher/volume.cpp cgal-4.8/demo/Surface_mesher/volume.cpp --- cgal-4.7/demo/Surface_mesher/volume.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/volume.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -28,16 +28,13 @@ #include #include #include "Raw_image_dialog.h" - -#include - #include // #include #include #include #include - #include +#include struct Threshold : public std::unary_function { double isovalue; @@ -325,6 +322,9 @@ } #ifdef CGAL_USE_VTK + +#include + #include #include #include @@ -368,7 +368,8 @@ smoother->Update(); vtk_image = smoother->GetOutput(); vtk_image->Print(std::cerr); - if(!m_image.read_vtk_image_data(vtk_image)) + m_image = CGAL::read_vtk_image_data(vtk_image); + if(m_image.image() == 0) { QMessageBox::warning(mw, mw->windowTitle(), tr("Error with file %1/:\nunknown file format!").arg(dirname)); @@ -418,7 +419,8 @@ vtk_reader->Print(std::cerr); vtk_image = vtk_reader->GetOutput(); vtk_image->Print(std::cerr); - if(!m_image.read_vtk_image_data(vtk_image)) + m_image = CGAL::read_vtk_image_data(vtk_image); + if(m_image.image() == NULL) { QMessageBox::warning(mw, mw->windowTitle(), tr("Error with file %1:\nunknown file format!").arg(filename)); @@ -485,7 +487,8 @@ 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)) + m_image = CGAL::read_vtk_image_data(vtk_image); + if(m_image.image() != NULL) { QMessageBox::warning(mw, mw->windowTitle(), tr("Error with file %1:\nunknown file format!").arg(filename)); @@ -1512,8 +1515,9 @@ 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()); + { + CGAL::Qt::opengl_check_errors(); + } } } #endif // CGAL_SURFACE_MESH_DEMO_USE_MARCHING_CUBE diff -Nru cgal-4.7/demo/Surface_mesher/volume.h cgal-4.8/demo/Surface_mesher/volume.h --- cgal-4.7/demo/Surface_mesher/volume.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_mesher/volume.h 2016-04-04 19:00:12.000000000 +0000 @@ -123,9 +123,9 @@ QDoubleSpinBox* spinBox_distance_bound; bool direct_draw; // do not use display lists - std::vector lists_draw_surface; + std::vector lists_draw_surface; bool lists_draw_surface_is_valid; - GLuint list_draw_marching_cube; + GLint list_draw_marching_cube; bool list_draw_marching_cube_is_valid; CGAL::Timer sm_timer; @@ -135,7 +135,7 @@ std::vector m_surface_mc; MarchingCubes mc ; std::vector nbs_of_mc_triangles; - std::vector lists_draw_surface_mc; + std::vector lists_draw_surface_mc; bool lists_draw_surface_mc_is_valid; CGAL::Timer mc_timer; int mc_total_time; diff -Nru cgal-4.7/demo/Surface_modeling/CMakeLists.txt cgal-4.8/demo/Surface_modeling/CMakeLists.txt --- cgal-4.7/demo/Surface_modeling/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_modeling/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +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.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 -Nru cgal-4.7/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp cgal-4.8/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp --- cgal-4.7/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Surface_modeling/deform_mesh_for_botsch08_format.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -#include -#include -#include -#include -// HalfedgeGraph adapters for Polyhedron_3 -#include -#include -#include -// #define CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP -#include - -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; - -typedef CGAL::Surface_mesh_deformation 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 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 -Nru cgal-4.7/demo/Three/CMakeLists.txt cgal-4.8/demo/Three/CMakeLists.txt --- cgal-4.7/demo/Three/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Three/CMakeLists.txt 2016-04-04 19:00:36.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Three/Example_plugin/CMakeLists.txt cgal-4.8/demo/Three/Example_plugin/CMakeLists.txt --- cgal-4.7/demo/Three/Example_plugin/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Three/Example_plugin/CMakeLists.txt 2016-04-04 19:00:13.000000000 +0000 @@ -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 -Nru cgal-4.7/demo/Three/Example_plugin/dock_example.ui cgal-4.8/demo/Three/Example_plugin/dock_example.ui --- cgal-4.7/demo/Three/Example_plugin/dock_example.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Three/Example_plugin/dock_example.ui 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,156 @@ + + + Dock_example + + + + 0 + 0 + 275 + 222 + + + + + 0 + 0 + + + + + 58 + 200 + + + + DockWidget + + + + + + 0 + 150 + 261 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 0 + 10 + 261 + 121 + + + + + + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Point C + + + + + + + Point A + + + + + + + + + + + + + Point B + + + + + + + + + + + + + X + + + + + + + Y + + + + + + + Z + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + diff -Nru cgal-4.7/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp cgal-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp --- cgal-4.7/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,312 @@ +//! \file Polyhedron_demo_example_plugin.cpp +#include +#include +#include +#include +#include +#include +#include +#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( "

Number of vertices: %1
" + "Number of edges: %2
" + "Number of facets: %3") + .arg(3) + .arg(3) + .arg(1); + str+=QObject::tr("
Volume: %1").arg(0); + str+=QObject::tr("
Area: %1").arg(0.5); + str+="

"; + 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("
Number of isolated vertices : 0
"); + + 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(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 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(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 +//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 actions() const { + return QList() << 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 triangle_array; +Ui::Dock_example ui_widget; +QDockWidget* dock_widget; + +}; //end of class Polyhedron_demo_example_plugin +#include "Polyhedron_demo_example_plugin.moc" diff -Nru cgal-4.7/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui cgal-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui --- cgal-4.7/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/demo/Three/Example_plugin/Polyhedron_demo_example_plugin.ui 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,156 @@ + + + Polyhedron_demo_example_plugin_dialog + + + + 0 + 0 + 400 + 199 + + + + Triangle coordinates + + + + + 40 + 150 + 341 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 9 + 9 + 381 + 121 + + + + + + + Point C + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Point A + + + + + + + Point B + + + + + + + X + + + + + + + Y + + + + + + + Z + + + + + + + TextLabel + + + + + + + + + + buttonBox + accepted() + Polyhedron_demo_example_plugin_dialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + Polyhedron_demo_example_plugin_dialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff -Nru cgal-4.7/demo/Triangulation_3/MainWindow.cpp cgal-4.8/demo/Triangulation_3/MainWindow.cpp --- cgal-4.7/demo/Triangulation_3/MainWindow.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Triangulation_3/MainWindow.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -39,8 +39,6 @@ // 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() diff -Nru cgal-4.7/demo/Triangulation_3/Viewer.cpp cgal-4.8/demo/Triangulation_3/Viewer.cpp --- cgal-4.7/demo/Triangulation_3/Viewer.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/demo/Triangulation_3/Viewer.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -176,6 +176,8 @@ 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 diff -Nru cgal-4.7/doc_html/index.html cgal-4.8/doc_html/index.html --- cgal-4.7/doc_html/index.html 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/doc_html/index.html 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,7 @@
  • CGAL Manual - Table of Contents
  • CGAL Manual - Package Overview
  • You can also access the CGAL Online Manual from the - CGAL website. + CGAL website. diff -Nru cgal-4.7/examples/Advancing_front_surface_reconstruction/boundaries.cpp cgal-4.8/examples/Advancing_front_surface_reconstruction/boundaries.cpp --- cgal-4.7/examples/Advancing_front_surface_reconstruction/boundaries.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Advancing_front_surface_reconstruction/boundaries.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -12,22 +12,31 @@ : bound(bound) {} - // The point type that will be injected here will be - // CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 - template - bool operator()(const Point& p, const Point& q, const Point& r) const + template + 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 false; + return adv.smallest_radius_delaunay_sphere (c, index); } - double d = sqrt(squared_distance(p,q)); - if(d>bound) return true; - d += sqrt(squared_distance(p,r)) ; - if(d>bound) return true; - d+= sqrt(squared_distance(q,r)); - return d>bound; + + // 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); } }; diff -Nru cgal-4.7/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp cgal-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp --- cgal-4.7/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Advancing_front_surface_reconstruction/reconstruction_fct.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -4,6 +4,7 @@ #include #include #include +#include typedef CGAL::Simple_cartesian K; typedef K::Point_3 Point_3; @@ -27,28 +28,38 @@ : bound(bound) {} - // The point type that will be injected here will be - // CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 - template - bool operator()(const Point& p, const Point& q, const Point& r) const + template + 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 false; + return adv.smallest_radius_delaunay_sphere (c, index); } - double d = sqrt(squared_distance(p,q)); - if(d>bound) return true; - d += sqrt(squared_distance(p,r)) ; - if(d>bound) return true; - d+= sqrt(squared_distance(q,r)); - return d>bound; + + // 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(argv[2]):0; std::vector points; std::vector facets; @@ -56,7 +67,7 @@ std::istream_iterator(), std::back_inserter(points)); - Perimeter perimeter(0); + Perimeter perimeter(per); CGAL::advancing_front_surface_reconstruction(points.begin(), points.end(), std::back_inserter(facets), diff -Nru cgal-4.7/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp cgal-4.8/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp --- cgal-4.7/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Alpha_shapes_2/ex_weighted_alpha_shapes_2.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -71,7 +71,7 @@ std::cout << "Reading " << n << " points" << std::endl; for( ; n>0 ; n--) { - Point_base p; + Point_base p(0., 0.); is >> p; if(is) { L.push_back(Point (p, FT(10))); diff -Nru cgal-4.7/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp cgal-4.8/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp --- cgal-4.7/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Apollonius_graph_2/ag2_exact_traits_sqrt.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -5,7 +5,6 @@ #include #include - #if defined CGAL_USE_LEDA # include #elif defined CGAL_USE_CORE diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/arr_rational_nt.h cgal-4.8/examples/Arrangement_on_surface_2/arr_rational_nt.h --- cgal-4.7/examples/Arrangement_on_surface_2/arr_rational_nt.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/arr_rational_nt.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -#ifndef CGAL_ARR_RATIONAL_NT_H -#define CGAL_ARR_RATIONAL_NT_H - -#include - -#ifdef CGAL_USE_GMP - - // GMP is installed. Use the GMP rational number-type. - #include - - typedef CGAL::Gmpq Number_type; - -#else - - // GMP is not installed. Use CGAL's exact rational number-type. - #include - #include - - typedef CGAL::Quotient Number_type; - -#endif - -#endif diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp cgal-4.8/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ //! \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 +#include #include #include #include @@ -38,7 +38,7 @@ { key->set_data(val); } }; -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef CGAL::Arr_face_extended_dcel Dcel; typedef CGAL::Arrangement_2 Ex_arrangement; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp cgal-4.8/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ //! \file examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp // Adapting an arrangement to a BGL graph. -#include "arr_rational_nt.h" #include +#include #include #include #include @@ -12,7 +12,7 @@ #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; @@ -92,7 +92,7 @@ template unsigned int get(const boost::Arr_vertex_index_map_boost & index_map, - typename Arrangement::Vertex_handle v) + typename Arrangement::Vertex_handle v) { const CGAL::Arr_vertex_index_map & index_map_tmp = static_cast &>(index_map); @@ -100,15 +100,15 @@ } } - + 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), + 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))); @@ -121,16 +121,16 @@ // Create a mapping of the arrangement vertices to indices. CGAL::Arr_vertex_index_map index_map_tmp(arr); boost::Arr_vertex_index_map_boost index_map(index_map_tmp); - + // Perform Dijkstra's algorithm from the vertex v0. Edge_length_func edge_length; - + boost::vector_property_map > dist_map(static_cast(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; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/circles.cpp cgal-4.8/examples/Arrangement_on_surface_2/circles.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/circles.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/circles.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,12 +1,12 @@ //! \file examples/Arrangement_on_surface_2/circles.cpp // Constructing an arrangement of circles using the conic-arc traits. -#include "arr_rational_nt.h" #include +#include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef Kernel::Circle_2 Circle_2; typedef CGAL::Arr_circle_segment_traits_2 Traits_2; typedef Traits_2::CoordNT CoordNT; @@ -14,37 +14,37 @@ typedef Traits_2::Curve_2 Curve_2; typedef CGAL::Arrangement_2 Arrangement_2; -int main () +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); + 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); - 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); + 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, 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); + 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; + Arrangement_2 arr; + + insert(arr, cv1); + insert(arr, cv2); + insert(arr, cv3); - 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; + 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) { diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/circular_arcs.cpp cgal-4.8/examples/Arrangement_on_surface_2/circular_arcs.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/circular_arcs.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/circular_arcs.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,12 +1,12 @@ //! \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 +#include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef Kernel::Circle_2 Circle_2; typedef Kernel::Segment_2 Segment_2; typedef CGAL::Arr_circle_segment_traits_2 Traits_2; @@ -15,78 +15,80 @@ typedef Traits_2::Curve_2 Curve_2; typedef CGAL::Arrangement_2 Arrangement_2; -int main () +int main() { std::list 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)); + 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, Number_type(3, 2))); + 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); + 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)); + 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); + 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)); + 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)); + 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)); + 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)); + 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); + 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)); + curves.push_back(Curve_2(s7, mid7, t7)); // Construct the arrangement of the curves. - Arrangement_2 arr; + Arrangement_2 arr; + + insert(arr, curves.begin(), curves.end()); - 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() + << ", E = " << arr.number_of_edges() << ", F = " << arr.number_of_faces() << std::endl; return 0; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/CMakeLists.txt cgal-4.8/examples/Arrangement_on_surface_2/CMakeLists.txt --- cgal-4.7/examples/Arrangement_on_surface_2/CMakeLists.txt 2015-10-17 19:00:31.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/CMakeLists.txt 2016-04-04 19:00:34.000000000 +0000 @@ -64,7 +64,6 @@ 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" ) diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp cgal-4.8/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/consolidated_curve_data.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -2,8 +2,8 @@ // Associating a color attribute with segments using the consolidated // curve-data traits. -#include "arr_rational_nt.h" #include +#include #include #include #include @@ -14,7 +14,7 @@ BLUE }; -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Segment_traits_2; typedef Segment_traits_2::Curve_2 Segment_2; typedef CGAL::Arr_consolidated_curve_data_traits_2 @@ -79,7 +79,7 @@ // 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::cout << "Red-blue intersection at (" << vit->point() << ")" << std::endl; } } @@ -102,7 +102,7 @@ if (*dit == RED) has_red = true; else if (*dit == BLUE) - has_blue = true; + has_blue = true; } // Print the edge only if it corresponds to a red-blue overlap. diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/curve_history.cpp cgal-4.8/examples/Arrangement_on_surface_2/curve_history.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/curve_history.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/curve_history.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ //! \file examples/Arrangement_on_surface_2/curve_history.cpp // Constructing an arrangement with curve history. -#include "arr_rational_nt.h" #include +#include #include #include @@ -11,7 +11,7 @@ #include "point_location_utils.h" -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::Curve_2 Segment_2; @@ -44,7 +44,7 @@ << 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; + << arr.number_of_induced_edges(cit) << " edges." << std::endl; // Print the arrangement edges, along with the list of curves that // induce each edge. diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/dcel_extension.cpp cgal-4.8/examples/Arrangement_on_surface_2/dcel_extension.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/dcel_extension.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/dcel_extension.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,15 +1,15 @@ //! \file examples/Arrangement_on_surface_2/dcel_extension.cpp // Extending all DCEL records (vertices, edges and faces). -#include "arr_rational_nt.h" #include +#include #include #include #include enum Color {BLUE, RED, WHITE}; -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/dcel_extension_io.cpp cgal-4.8/examples/Arrangement_on_surface_2/dcel_extension_io.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/dcel_extension_io.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/dcel_extension_io.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ //! \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 +#include #include #include #include @@ -39,7 +39,7 @@ return (is); } -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/dual_lines.cpp cgal-4.8/examples/Arrangement_on_surface_2/dual_lines.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/dual_lines.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/dual_lines.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -2,27 +2,27 @@ // 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 +#include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_linear_traits_2 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 Arrangement_2; -int main (int argc, char *argv[]) +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"; + const char* filename = (argc > 1) ? argv[1] : "points.dat"; // Open the input file. - std::ifstream in_file (filename); + std::ifstream in_file(filename); if (! in_file.is_open()) { std::cerr << "Failed to open " << filename << "!" << std::endl; @@ -36,43 +36,43 @@ // // point #2. // : : : : // // point #n. - std::vector points; - std::list dual_lines; + std::vector points; + std::list dual_lines; - unsigned int n; + 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); + 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))); + 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; + Arrangement_2 arr; - insert (arr, dual_lines.begin(), dual_lines.end()); + 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() + << ", 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; + Arrangement_2::Vertex_const_iterator vit; + bool found_collinear = false; for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) { if (vit->degree() > 4) { @@ -89,15 +89,14 @@ // 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())); + 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); + insert(arr, dual_p_mid); // Make sure that we now have three collinear points. found_collinear = false; @@ -107,6 +106,7 @@ break; } } - CGAL_assertion (found_collinear); + CGAL_assertion(found_collinear); + return (0); } diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/dual_with_data.cpp cgal-4.8/examples/Arrangement_on_surface_2/dual_with_data.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/dual_with_data.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/dual_with_data.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -2,29 +2,29 @@ // 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 +#include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_linear_traits_2 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 Traits_2; + unsigned int> Traits_2; typedef Traits_2::X_monotone_curve_2 X_monotone_curve_2; typedef CGAL::Arrangement_2 Arrangement_2; -int main (int argc, char *argv[]) +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); + std::ifstream in_file(filename); if (! in_file.is_open()) { std::cerr << "Failed to open " << filename << " ..." << std::endl; @@ -37,33 +37,33 @@ unsigned int n; in_file >> n; - points.resize (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); + 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)); + 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)); + 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; + Arrangement_2 arr; - insert (arr, dual_lines.begin(), dual_lines.end()); + 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; + 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) { diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp cgal-4.8/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/edge_manipulation_curve_history.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,12 +1,12 @@ //! \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 +#include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef Kernel::Point_2 Rat_point_2; typedef Kernel::Circle_2 Circle_2; typedef CGAL::Arr_circle_segment_traits_2 Traits_2; @@ -14,17 +14,17 @@ typedef Traits_2::Curve_2 Curve_2; typedef CGAL::Arrangement_with_history_2 Arr_with_hist_2; typedef Arr_with_hist_2::Curve_handle Curve_handle; -typedef CGAL::Arr_walk_along_line_point_location +typedef CGAL::Arr_walk_along_line_point_location 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]; + 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); @@ -36,23 +36,23 @@ 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; + 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() + << ", 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]) + 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() + << ", E = " << arr.number_of_edges() << ", F = " << arr.number_of_faces() << std::endl; // Locate the point q, which should be on an edge e. @@ -63,16 +63,16 @@ 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; + 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() + << ", E = " << arr.number_of_edges() << ", F = " << arr.number_of_faces() << std::endl; // Merge back the two split edges. @@ -80,7 +80,7 @@ std::cout << "After edge merge: " << "V = " << arr.number_of_vertices() - << ", E = " << arr.number_of_edges() + << ", E = " << arr.number_of_edges() << ", F = " << arr.number_of_faces() << std::endl; return 0; } diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/face_extension.cpp cgal-4.8/examples/Arrangement_on_surface_2/face_extension.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/face_extension.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/face_extension.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,14 +1,14 @@ //! \file examples/Arrangement_on_surface_2/face_extension.cpp // Extending the arrangement-face records. -#include "arr_rational_nt.h" #include +#include #include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; @@ -29,7 +29,7 @@ n_faces (0) { CGAL_precondition (arr.is_empty()); - + arr.unbounded_face()->set_data (0); n_faces++; } diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/face_extension_overlay.cpp cgal-4.8/examples/Arrangement_on_surface_2/face_extension_overlay.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/face_extension_overlay.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/face_extension_overlay.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,15 +1,15 @@ //! \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 +#include #include #include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/generic_curve_data.cpp cgal-4.8/examples/Arrangement_on_surface_2/generic_curve_data.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/generic_curve_data.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/generic_curve_data.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -2,8 +2,8 @@ // Associating a name attribute with segments using the generic curve-data // traits. -#include "arr_rational_nt.h" #include +#include #include #include #include @@ -21,7 +21,7 @@ } }; -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Segment_traits_2; typedef CGAL::Arr_polyline_traits_2 Polyline_traits_2; typedef Polyline_traits_2::Curve_2 Polyline_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/io.cpp cgal-4.8/examples/Arrangement_on_surface_2/io.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/io.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/io.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,8 +1,8 @@ //! \file examples/Arrangement_on_surface_2/io.cpp // Using the arrangement I/O operators. -#include "arr_rational_nt.h" #include +#include #include #include #include @@ -10,7 +10,7 @@ #include "point_location_utils.h" -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef CGAL::Arrangement_2 Arrangement_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/io_curve_history.cpp cgal-4.8/examples/Arrangement_on_surface_2/io_curve_history.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/io_curve_history.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/io_curve_history.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,14 +1,14 @@ //! \file examples/Arrangement_on_surface_2/io_curve_history.cpp // Using the arrangement-with-history I/O operators. -#include "arr_rational_nt.h" #include +#include #include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::Curve_2 Segment_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/io_unbounded.cpp cgal-4.8/examples/Arrangement_on_surface_2/io_unbounded.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/io_unbounded.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/io_unbounded.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,15 +1,15 @@ //! \file examples/Arrangement_2/io_unbounded.cpp // Using the I/O operators with an arrangement of unbounded curves. -#include "arr_rational_nt.h" #include +#include #include #include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_linear_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::Segment_2 Segment_2; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/overlay.cpp cgal-4.8/examples/Arrangement_on_surface_2/overlay.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/overlay.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/overlay.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,14 +1,14 @@ //! \file examples/Arrangement_on_surface_2/overlay.cpp // A simple overlay of two arrangements. -#include "arr_rational_nt.h" #include +#include #include #include #include #include -typedef CGAL::Cartesian Kernel; +typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; typedef Traits_2::X_monotone_curve_2 Segment_2; @@ -52,7 +52,7 @@ // 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() + << ", E = " << overlay_arr.number_of_edges() << ", F = " << overlay_arr.number_of_faces() << std::endl; return 0; diff -Nru cgal-4.7/examples/Arrangement_on_surface_2/sweep_line.cpp cgal-4.8/examples/Arrangement_on_surface_2/sweep_line.cpp --- cgal-4.7/examples/Arrangement_on_surface_2/sweep_line.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/Arrangement_on_surface_2/sweep_line.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -//! \file examples/Arrangement_on_surface_2/sweep_line.cpp -// Computing intersection points among curves using the sweep line. - -#include -#include -#include -#include -#include -#include - -typedef CGAL::Quotient NT; -typedef CGAL::Cartesian Kernel; -typedef Kernel::Point_2 Point_2; -typedef CGAL::Arr_segment_traits_2 Traits_2; -typedef Traits_2::Curve_2 Segment_2; - -int main() -{ - // Construct the input segments. - Segment_2 segments[] = {Segment_2 (Point_2 (1, 5), Point_2 (8, 5)), - Segment_2 (Point_2 (1, 1), Point_2 (8, 8)), - Segment_2 (Point_2 (3, 1), Point_2 (3, 8)), - Segment_2 (Point_2 (8, 5), Point_2 (8, 8))}; - - // Compute all intersection points. - std::list pts; - - CGAL::compute_intersection_points (segments, segments + 4, - std::back_inserter (pts)); - - // Print the result. - std::cout << "Found " << pts.size() << " intersection points: " << std::endl; - std::copy (pts.begin(), pts.end(), - std::ostream_iterator(std::cout, "\n")); - - // Compute the non-intersecting sub-segments induced by the input segments. - std::list sub_segs; - - CGAL::compute_subcurves(segments, segments + 4, std::back_inserter(sub_segs)); - - std::cout << "Found " << sub_segs.size() - << " interior-disjoint sub-segments." << std::endl; - - CGAL_assertion (CGAL::do_curves_intersect (segments, segments + 4)); - - return 0; -} diff -Nru cgal-4.7/examples/BGL_OpenMesh/CMakeLists.txt cgal-4.8/examples/BGL_OpenMesh/CMakeLists.txt --- cgal-4.7/examples/BGL_OpenMesh/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/BGL_OpenMesh/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/BGL_OpenMesh/TriMesh.cpp cgal-4.8/examples/BGL_OpenMesh/TriMesh.cpp --- cgal-4.7/examples/BGL_OpenMesh/TriMesh.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/BGL_OpenMesh/TriMesh.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,51 @@ + +#include + +#include +#include + +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; + +typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::face_descriptor face_descriptor; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + +int main(int argc, char** argv ) +{ + Mesh mesh; + + std::vector 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 -Nru cgal-4.7/examples/BGL_polyhedron_3/CMakeLists.txt cgal-4.8/examples/BGL_polyhedron_3/CMakeLists.txt --- cgal-4.7/examples/BGL_polyhedron_3/CMakeLists.txt 2015-10-17 19:00:31.000000000 +0000 +++ cgal-4.8/examples/BGL_polyhedron_3/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -1,32 +1,73 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. +# Created by the script cgal_create_CMakeLists +# This is the CMake script for compiling a set of CGAL applications. +project( BGL_polyhedron_3 ) -project( BGL_polyhedron_3_example ) -cmake_minimum_required(VERSION 2.8.10) +cmake_minimum_required(VERSION 2.8.11) -find_package(CGAL QUIET COMPONENTS Core ) +# CGAL and its components +find_package( CGAL QUIET COMPONENTS ) -if ( CGAL_FOUND ) +if ( NOT CGAL_FOUND ) - include( ${CGAL_USE_FILE} ) + message(STATUS "This project requires the CGAL library, and will not be compiled.") + return() - include( CGAL_CreateSingleSourceCGALProgram ) +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.") - include_directories (BEFORE "../../include") + return() - 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" ) +endif() + +find_package( OpenMesh QUIET ) +if ( OpenMesh_FOUND ) +include( UseOpenMesh ) else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - + 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 -Nru cgal-4.7/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp cgal-4.8/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp --- cgal-4.7/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/BGL_polyhedron_3/polyhedron_2_OpenMesh.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,87 @@ + +#include + +#include +#include +#include + +#include + +#if 1 +#include +#include +#else +#include +#include +#endif + +#include + +#include + +#include +#include + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Vector_3 Vector; +typedef Kernel::Point_3 Point; +typedef CGAL::Polyhedron_3 Source; + +#if 1 +typedef OpenMesh::PolyMesh_ArrayKernelT Target; +#else +typedef OpenMesh::TriMesh_ArrayKernelT Target; +#endif +typedef boost::graph_traits::vertex_descriptor sm_vertex_descriptor; +typedef boost::graph_traits::vertex_descriptor tm_vertex_descriptor; + +typedef boost::graph_traits::halfedge_descriptor sm_halfedge_descriptor; +typedef boost::graph_traits::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 v2v; + boost::unordered_map h2h; + + convert_surface_mesh(S,T,v2v,h2h); + OpenMesh::IO::write_mesh(T, "om.off"); + } + S.clear(); + { + boost::unordered_map v2v; + boost::unordered_map h2h; + + convert_surface_mesh(T,S,v2v,h2h); + std::ofstream out("reverse.off"); + out << S << std::endl; + } + + + return 0; +} diff -Nru cgal-4.7/examples/BGL_polyhedron_3/range.cpp cgal-4.8/examples/BGL_polyhedron_3/range.cpp --- cgal-4.7/examples/BGL_polyhedron_3/range.cpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/examples/BGL_polyhedron_3/range.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -38,7 +38,7 @@ { vertex_range vr(vertices(p)); -#ifndef CGAL_NO_CPP0X_RANGE_BASED_FOR +#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; diff -Nru cgal-4.7/examples/Combinatorial_map/map_3_marks.cpp cgal-4.8/examples/Combinatorial_map/map_3_marks.cpp --- cgal-4.7/examples/Combinatorial_map/map_3_marks.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Combinatorial_map/map_3_marks.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -6,18 +6,23 @@ 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. - int mark = cm.get_new_mark(); - if ( mark==-1 ) - { - std::cerr<<"No more free mark, exit."<::iterator it(cm.darts_of_cell<3>(dh1).begin()), itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it) - cm.mark(it, mark); + cm.mark(it, amark); // 4) Remove the common 2-cell between the two cubes: // the two tetrahedra are merged. @@ -40,13 +45,13 @@ 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; - } + { + if ( cm.is_marked(it, amark) ) + ++res; + } std::cout<<"Number of darts from the first tetrahedron: "<::iterator it = vertices.begin(); it != vertices.end(); - it++) { - Vector p = ((*it)->point() - vit->point()) / 2; + it++) + { + if (dt.is_infinite(*it)) continue; + Vector p(vit->point(),(*it)->point()); planes.push_back (Plane(CGAL::midpoint((*it)->point(), vit->point()), p)); } @@ -165,9 +167,9 @@ // Intersection Polyhedron P; CGAL::halfspace_intersection_3(planes.begin(), - planes.end(), - P, - vit->point()); + planes.end(), + P, + boost::make_optional(vit->point())); // Centroid apply_function_object_polyhedron(P, centroid_acc); diff -Nru cgal-4.7/examples/Core/CMakeLists.txt cgal-4.8/examples/Core/CMakeLists.txt --- cgal-4.7/examples/Core/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Core/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 2.8.11) -set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) - if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) diff -Nru cgal-4.7/examples/Generator/random_degenerate_point_set.cpp cgal-4.8/examples/Generator/random_degenerate_point_set.cpp --- cgal-4.7/examples/Generator/random_degenerate_point_set.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Generator/random_degenerate_point_set.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -40,7 +40,7 @@ // Use a random permutation to hide the creation history // of the point set. - std::random_shuffle( points.begin(), points.end(), default_random); + std::random_shuffle( points.begin(), points.end(), get_default_random()); // Check range of values. for ( Vector::iterator i = points.begin(); i != points.end(); i++){ diff -Nru cgal-4.7/examples/Generator/random_polygon.cpp cgal-4.8/examples/Generator/random_polygon.cpp --- cgal-4.7/examples/Generator/random_polygon.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Generator/random_polygon.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -29,12 +29,13 @@ const double RADIUS = 100; const int MAX_POLY_SIZE = 100; -int main( ) +int main() { Polygon_2 polygon; std::list 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 diff -Nru cgal-4.7/examples/Jet_fitting_3/Mesh_estimation.cpp cgal-4.8/examples/Jet_fitting_3/Mesh_estimation.cpp --- cgal-4.7/examples/Jet_fitting_3/Mesh_estimation.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Jet_fitting_3/Mesh_estimation.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -6,7 +6,7 @@ #include -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; #endif @@ -117,7 +117,7 @@ } ///////////////MAIN/////////////////////////////////////////////////////// -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) int main(int argc, char *argv[]) #else int main() @@ -131,7 +131,7 @@ std::ofstream out_4ogl, out_verbose; try { -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#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.") diff -Nru cgal-4.7/examples/Kernel_23/CMakeLists.txt cgal-4.8/examples/Kernel_23/CMakeLists.txt --- cgal-4.7/examples/Kernel_23/CMakeLists.txt 2015-10-17 19:00:32.000000000 +0000 +++ cgal-4.8/examples/Kernel_23/CMakeLists.txt 2016-04-04 19:00:35.000000000 +0000 @@ -19,6 +19,8 @@ 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" ) diff -Nru cgal-4.7/examples/Kernel_23/intersection_get.cpp cgal-4.8/examples/Kernel_23/intersection_get.cpp --- cgal-4.7/examples/Kernel_23/intersection_get.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Kernel_23/intersection_get.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,26 @@ +#include +#include + +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::type + result = intersection(seg, lin); + if (result) { + if (const Segment_2* s = boost::get(&*result)) { + std::cout << *s << std::endl; + } else { + const Point_2* p = boost::get(&*result); + std::cout << *p << std::endl; + } + } + return 0; +} diff -Nru cgal-4.7/examples/Kernel_23/intersections.cpp cgal-4.8/examples/Kernel_23/intersections.cpp --- cgal-4.7/examples/Kernel_23/intersections.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Kernel_23/intersections.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,11 +1,10 @@ -#include -#include +#include #include #include #include -typedef CGAL::Simple_cartesian K; +typedef CGAL::Exact_predicates_exact_constructions_kernel K; typedef K::Point_2 Point; typedef K::Segment_2 Segment; @@ -49,7 +48,7 @@ std::vector segments; typedef CGAL::Dispatch_output_iterator< - CGAL::cpp11::tuple, CGAL::cpp0x::tuple< std::back_insert_iterator >, + CGAL::cpp11::tuple, CGAL::cpp11::tuple< std::back_insert_iterator >, std::back_insert_iterator > > > Dispatcher; diff -Nru cgal-4.7/examples/Kernel_23/intersection_visitor.cpp cgal-4.8/examples/Kernel_23/intersection_visitor.cpp --- cgal-4.7/examples/Kernel_23/intersection_visitor.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Kernel_23/intersection_visitor.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,41 @@ +#include +#include + +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::type + result = intersection(seg, lin); + if (result) { + boost::apply_visitor(Intersection_visitor(), *result); + } else { + // no intersection + } + + return 0; +} diff -Nru cgal-4.7/examples/Kinetic_data_structures/CMakeLists.txt cgal-4.8/examples/Kinetic_data_structures/CMakeLists.txt --- cgal-4.7/examples/Kinetic_data_structures/CMakeLists.txt 2015-10-17 19:00:32.000000000 +0000 +++ cgal-4.8/examples/Kinetic_data_structures/CMakeLists.txt 2016-04-04 19:00:35.000000000 +0000 @@ -22,6 +22,8 @@ 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() diff -Nru cgal-4.7/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp cgal-4.8/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp --- cgal-4.7/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Kinetic_data_structures/defining_a_simulation_traits.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,135 @@ +#define CGAL_CHECK_EXPENSIVE +#define CGAL_CHECK_EXACTNESS + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +template +struct Point_with_color: public P { + typedef P Base_point; + typedef typename P::Coordinate C; + Point_with_color(const P &p, int c): P(p), color(c){} + Point_with_color(const C &x, const C &y): P(x,y){} + Point_with_color(){} + int color; +}; +template +std::istream &operator<<(std::istream &in, Point_with_color

    &p) { + typename P::Base_point bp; + in >> bp; + int c; + in >> c; + p= Point_with_color

    (bp, c); + return in; +} + +template +std::ostream &operator>>(std::ostream &out, const Point_with_color

    &p) { + out << static_cast(p) << " " << p.color; + return out; +} + + +struct My_simulation_traits { + typedef My_simulation_traits This; + + typedef CGAL::Exact_predicates_exact_constructions_kernel Static_kernel; + //typedef CGAL::Regular_triangulation_euclidean_traits_3 Static_kernel; + typedef CGAL::POLYNOMIAL::Polynomial Function; + typedef CGAL::POLYNOMIAL::Sturm_root_stack_traits Root_stack_traits; + typedef CGAL::POLYNOMIAL::Sturm_root_stack Root_stack; + typedef CGAL::POLYNOMIAL::Kernel Function_kernel; + + typedef CGAL::Kinetic::Handle_degeneracy_function_kernel Simulator_function_kernel_base; + struct Simulator_function_kernel: public Simulator_function_kernel_base{}; + + typedef CGAL::Kinetic::Cartesian Kinetic_kernel; + typedef CGAL::Kinetic::Two_list_pointer_event_queue Event_queue; + typedef CGAL::Kinetic::Default_simulator Simulator; + + typedef Point_with_color Point_2; + + + typedef CGAL::Kinetic::Active_objects_vector Active_points_1_table; + typedef CGAL::Kinetic::Active_objects_vector Active_points_2_table; + typedef CGAL::Kinetic::Active_objects_vector Active_points_3_table; + // typedef Active_objects_vector Active_weighted_points_3_table; + + typedef CGAL::Kinetic::Default_instantaneous_kernel Instantaneous_kernel; + + + Active_points_1_table* active_points_1_table_handle() const { return ap1_.get();} + Active_points_2_table* active_points_2_table_handle() const {return ap2_.get();} + Active_points_3_table* active_points_3_table_handle() const {return ap3_.get();} + //Active_weighted_points_3_table* active_weighted_points_3_table_handle() const {return awp3_.get();} + + Simulator* simulator_handle() const { return sim_.get();} + const Static_kernel& static_kernel_object() const {return k_;} + const Kinetic_kernel& kinetic_kernel_object() const {return kk_;} + + Instantaneous_kernel instantaneous_kernel_object() const { + return Instantaneous_kernel(*this); + } + + My_simulation_traits(const Simulator::Time &lb, + const Simulator::Time &ub): sim_(new Simulator(lb, ub)), + ap1_(new Active_points_1_table()), + ap2_(new Active_points_2_table()), + ap3_(new Active_points_3_table()) + {} + + + bool is_exact() const { + return true; + } +protected: + Simulator::Handle sim_; + Active_points_1_table::Handle ap1_; + Active_points_2_table::Handle ap2_; + Active_points_3_table::Handle ap3_; + //Active_weighted_points_3_table::Handle awp3_; + Static_kernel k_; + Kinetic_kernel kk_; + Function_kernel fk_; +}; + + +int main() +{ + typedef CGAL::Kinetic::Delaunay_triangulation_2 KDel; + + My_simulation_traits tr(0, 10000); + My_simulation_traits::Simulator::Handle sp= tr.simulator_handle(); + + KDel kdel(tr); + + kdel.set_has_certificates(false); + std::ifstream in("data/points_with_color_2"); + in >> *tr.active_points_2_table_handle(); + + + + kdel.set_has_certificates(true); + + + std::cout << "Starting to run" << std::endl; + while (sp->next_event_time() + < sp->end_time()) { + sp->set_current_event_number(sp->current_event_number()+10); + std::cout << "At time " << sp->current_time() << ":\n"; + std::cout << kdel.triangulation_data_structure(); + } + + return EXIT_SUCCESS; +} diff -Nru cgal-4.7/examples/Kinetic_data_structures/trivial_kds.cpp cgal-4.8/examples/Kinetic_data_structures/trivial_kds.cpp --- cgal-4.7/examples/Kinetic_data_structures/trivial_kds.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Kinetic_data_structures/trivial_kds.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,186 @@ +#include +#include +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable:4355) // complaint about using 'this' to + // initialize a member +#endif + +// This must be external since operator<< has to be defined +template +struct Trivial_event: public CGAL::Kinetic::Event_base +{ + typedef CGAL::Kinetic::Event_base P; + Trivial_event(){} + template + Trivial_event(It beg, It end, const Map &m, KDS *kds): P(kds) { + for (; beg != end; ++beg) { + objects_.push_back(m[*beg]); + } + } + void write(std::ostream &out) const { + out << "An event"; + } + void process() const + { + std::cout << "The following objects are in the table: "; + for (typename std::vector::const_iterator + cit= objects_.begin(); + cit != objects_.end(); ++cit) { + std::cout << *cit << " "; + } + std::cout << std::endl; + P::kds()->set_processed(true); + } + + std::vector objects_; +}; + + + +/*! This is a trivial kinetic data structure which doesn't actually + do anything, other than print what it should be doing and maintain 1 + certificate in the event queue which has a list of all the moving + objects in the moving object table. +*/ +template +struct Trivial_kds: CGAL::Kinetic::Ref_counted > +{ + typedef Trivial_kds This; + typedef typename Traits::Active_points_1_table::Data Point; + typedef typename Traits::Simulator::Time Time; + typedef typename Traits::Active_points_1_table::Key Point_key; + typedef typename Traits::Simulator::Event_key Event_key; + CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator, typename Traits::Active_points_1_table) +public: + typedef Trivial_event Event; + + Trivial_kds(Traits tr): has_certificates_(true), + tr_(tr){ + CGAL_KINETIC_INITIALIZE_LISTENERS(tr_.simulator_handle(), + tr_.active_points_1_table_handle()); + } + + // this method is called with the value true when the event is processed + void set_processed(bool tf) { + if (tf== true) { + event_= Event_key(); + set_has_certificates(false); + set_has_certificates(true); + } + } + + void audit() const + { + /* In a real KDS you could use tr_.instantaneous_kernel() to build + a static version of the kinetic data structure and check it for + equality with the kinetic version. + */ + CGAL_assertion(event_.is_valid()); + std::cout << "The structure is trivially correct at time " + << tr_.simulator_handle()->audit_time() << std::endl; + } + + void set_has_certificates(bool tf) { + typename Traits::Simulator::Handle sp= tr_.simulator_handle(); + if (has_certificates_ != tf) { + has_certificates_=tf; + if (has_certificates_) { + CGAL_assertion_code(bool ev=) + event_.is_valid(); + CGAL_assertion(!ev); + Time t= CGAL::to_interval(sp->current_time()).second+1; + event_= sp->new_event(t, Event(objects_.begin(), + objects_.end(), + *tr_.active_points_1_table_handle(), + this)); + std::cout << "Created event (" << event_ << ") at time " << t << std::endl; + } else { + if (event_.is_valid()) { + std::cout << "Deleting event " << event_ << std::endl; + sp->delete_event(event_); + event_=Event_key(); + } + } + } + } + + bool has_certificates() const + { + // you can't use !event_ because the simulation + // might end before the time you tried to schedule the event. + return has_certificates_; + } + + void insert(Point_key k) { + std::cout << "Updating structure to include new object " + << k << "." << std::endl; + objects_.insert(k); + if (has_certificates_) { + std::cout << "Updating all certificates which depend on " + << k << "." << std::endl; + set_has_certificates(false); + set_has_certificates(true); + } + } + + void set(Point_key k) { + if (has_certificates_) { + std::cout << "Updating all certificates which depend on " + << k << "." << std::endl; + set_has_certificates(false); + set_has_certificates(true); + } else { + std::cout << "An object changed, but there was no certificate."<< std::endl; + } + } + + void erase(Point_key k) { + std::cout << "An object " << k << " was removed."<< std::endl; + objects_.erase(k); + if (has_certificates_) { + std::cout << "Updating all certificates which depend on " + << k << "." << std::endl; + set_has_certificates(false); + set_has_certificates(true); + } + } + +protected: + bool has_certificates_; + std::set objects_; + Event_key event_; + Traits tr_; +}; + +int main(int, char *[]) +{ + typedef CGAL::Kinetic::Exact_simulation_traits Traits; + typedef Trivial_kds TKDS; + + Traits tr(1,100); + TKDS::Handle tk= new TKDS(tr); + + Traits::Simulator::Handle sp=tr.simulator_handle(); + + Traits::Simulator::Function_kernel::Construct_function cf + = tr.kinetic_kernel_object().function_kernel_object().construct_function_object(); + + tk->set_has_certificates(true); + + typedef Traits::Kinetic_kernel::Point_2 Point; + Traits::Active_points_1_table::Key k + = tr.active_points_1_table_handle()->insert(Point(cf(1), cf(0))); + sp->set_current_event_number(sp->current_event_number()+10); + tr.active_points_1_table_handle() + ->set(k, Traits::Kinetic_kernel::Point_2(cf(2), cf(0))); + sp->set_current_event_number(sp->current_event_number()+10); + tr.active_points_1_table_handle()->erase(k); + sp->set_current_event_number(sp->current_event_number()+10); + return EXIT_SUCCESS; +} diff -Nru cgal-4.7/examples/Kinetic_framework/CMakeLists.txt cgal-4.8/examples/Kinetic_framework/CMakeLists.txt --- cgal-4.7/examples/Kinetic_framework/CMakeLists.txt 2015-10-17 19:00:32.000000000 +0000 +++ cgal-4.8/examples/Kinetic_framework/CMakeLists.txt 2016-04-04 19:00:35.000000000 +0000 @@ -17,11 +17,9 @@ 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() diff -Nru cgal-4.7/examples/Kinetic_framework/defining_a_simulation_traits.cpp cgal-4.8/examples/Kinetic_framework/defining_a_simulation_traits.cpp --- cgal-4.7/examples/Kinetic_framework/defining_a_simulation_traits.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Kinetic_framework/defining_a_simulation_traits.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ -#define CGAL_CHECK_EXPENSIVE -#define CGAL_CHECK_EXACTNESS - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -template -struct Point_with_color: public P { - typedef P Base_point; - typedef typename P::Coordinate C; - Point_with_color(const P &p, int c): P(p), color(c){} - Point_with_color(const C &x, const C &y): P(x,y){} - Point_with_color(){} - int color; -}; -template -std::istream &operator<<(std::istream &in, Point_with_color

    &p) { - typename P::Base_point bp; - in >> bp; - int c; - in >> c; - p= Point_with_color

    (bp, c); - return in; -} - -template -std::ostream &operator>>(std::ostream &out, const Point_with_color

    &p) { - out << static_cast(p) << " " << p.color; - return out; -} - - -struct My_simulation_traits { - typedef My_simulation_traits This; - - typedef CGAL::Exact_predicates_exact_constructions_kernel Static_kernel; - //typedef CGAL::Regular_triangulation_euclidean_traits_3 Static_kernel; - typedef CGAL::POLYNOMIAL::Polynomial Function; - typedef CGAL::POLYNOMIAL::Sturm_root_stack_traits Root_stack_traits; - typedef CGAL::POLYNOMIAL::Sturm_root_stack Root_stack; - typedef CGAL::POLYNOMIAL::Kernel Function_kernel; - - typedef CGAL::Kinetic::Handle_degeneracy_function_kernel Simulator_function_kernel_base; - struct Simulator_function_kernel: public Simulator_function_kernel_base{}; - - typedef CGAL::Kinetic::Cartesian Kinetic_kernel; - typedef CGAL::Kinetic::Two_list_pointer_event_queue Event_queue; - typedef CGAL::Kinetic::Default_simulator Simulator; - - typedef Point_with_color Point_2; - - - typedef CGAL::Kinetic::Active_objects_vector Active_points_1_table; - typedef CGAL::Kinetic::Active_objects_vector Active_points_2_table; - typedef CGAL::Kinetic::Active_objects_vector Active_points_3_table; - // typedef Active_objects_vector Active_weighted_points_3_table; - - typedef CGAL::Kinetic::Default_instantaneous_kernel Instantaneous_kernel; - - - Active_points_1_table* active_points_1_table_handle() const { return ap1_.get();} - Active_points_2_table* active_points_2_table_handle() const {return ap2_.get();} - Active_points_3_table* active_points_3_table_handle() const {return ap3_.get();} - //Active_weighted_points_3_table* active_weighted_points_3_table_handle() const {return awp3_.get();} - - Simulator* simulator_handle() const { return sim_.get();} - const Static_kernel& static_kernel_object() const {return k_;} - const Kinetic_kernel& kinetic_kernel_object() const {return kk_;} - - Instantaneous_kernel instantaneous_kernel_object() const { - return Instantaneous_kernel(*this); - } - - My_simulation_traits(const Simulator::Time &lb, - const Simulator::Time &ub): sim_(new Simulator(lb, ub)), - ap1_(new Active_points_1_table()), - ap2_(new Active_points_2_table()), - ap3_(new Active_points_3_table()) - {} - - - bool is_exact() const { - return true; - } -protected: - Simulator::Handle sim_; - Active_points_1_table::Handle ap1_; - Active_points_2_table::Handle ap2_; - Active_points_3_table::Handle ap3_; - //Active_weighted_points_3_table::Handle awp3_; - Static_kernel k_; - Kinetic_kernel kk_; - Function_kernel fk_; -}; - - -int main() -{ - typedef CGAL::Kinetic::Delaunay_triangulation_2 KDel; - - My_simulation_traits tr(0, 10000); - My_simulation_traits::Simulator::Handle sp= tr.simulator_handle(); - - KDel kdel(tr); - - kdel.set_has_certificates(false); - std::ifstream in("data/points_with_color_2"); - in >> *tr.active_points_2_table_handle(); - - - - kdel.set_has_certificates(true); - - - std::cout << "Starting to run" << std::endl; - while (sp->next_event_time() - < sp->end_time()) { - sp->set_current_event_number(sp->current_event_number()+10); - std::cout << "At time " << sp->current_time() << ":\n"; - std::cout << kdel.triangulation_data_structure(); - } - - return EXIT_SUCCESS; -} diff -Nru cgal-4.7/examples/Kinetic_framework/trivial_kds.cpp cgal-4.8/examples/Kinetic_framework/trivial_kds.cpp --- cgal-4.7/examples/Kinetic_framework/trivial_kds.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Kinetic_framework/trivial_kds.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,186 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#ifdef _MSC_VER -#pragma warning(disable:4355) // complaint about using 'this' to - // initialize a member -#endif - -// This must be external since operator<< has to be defined -template -struct Trivial_event: public CGAL::Kinetic::Event_base -{ - typedef CGAL::Kinetic::Event_base P; - Trivial_event(){} - template - Trivial_event(It beg, It end, const Map &m, KDS *kds): P(kds) { - for (; beg != end; ++beg) { - objects_.push_back(m[*beg]); - } - } - void write(std::ostream &out) const { - out << "An event"; - } - void process() const - { - std::cout << "The following objects are in the table: "; - for (typename std::vector::const_iterator - cit= objects_.begin(); - cit != objects_.end(); ++cit) { - std::cout << *cit << " "; - } - std::cout << std::endl; - P::kds()->set_processed(true); - } - - std::vector objects_; -}; - - - -/*! This is a trivial kinetic data structure which doesn't actually - do anything, other than print what it should be doing and maintain 1 - certificate in the event queue which has a list of all the moving - objects in the moving object table. -*/ -template -struct Trivial_kds: CGAL::Kinetic::Ref_counted > -{ - typedef Trivial_kds This; - typedef typename Traits::Active_points_1_table::Data Point; - typedef typename Traits::Simulator::Time Time; - typedef typename Traits::Active_points_1_table::Key Point_key; - typedef typename Traits::Simulator::Event_key Event_key; - CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator, typename Traits::Active_points_1_table) -public: - typedef Trivial_event Event; - - Trivial_kds(Traits tr): has_certificates_(true), - tr_(tr){ - CGAL_KINETIC_INITIALIZE_LISTENERS(tr_.simulator_handle(), - tr_.active_points_1_table_handle()); - } - - // this method is called with the value true when the event is processed - void set_processed(bool tf) { - if (tf== true) { - event_= Event_key(); - set_has_certificates(false); - set_has_certificates(true); - } - } - - void audit() const - { - /* In a real KDS you could use tr_.instantaneous_kernel() to build - a static version of the kinetic data structure and check it for - equality with the kinetic version. - */ - CGAL_assertion(event_.is_valid()); - std::cout << "The structure is trivially correct at time " - << tr_.simulator_handle()->audit_time() << std::endl; - } - - void set_has_certificates(bool tf) { - typename Traits::Simulator::Handle sp= tr_.simulator_handle(); - if (has_certificates_ != tf) { - has_certificates_=tf; - if (has_certificates_) { - CGAL_assertion_code(bool ev=) - event_.is_valid(); - CGAL_assertion(!ev); - Time t= CGAL::to_interval(sp->current_time()).second+1; - event_= sp->new_event(t, Event(objects_.begin(), - objects_.end(), - *tr_.active_points_1_table_handle(), - this)); - std::cout << "Created event (" << event_ << ") at time " << t << std::endl; - } else { - if (event_.is_valid()) { - std::cout << "Deleting event " << event_ << std::endl; - sp->delete_event(event_); - event_=Event_key(); - } - } - } - } - - bool has_certificates() const - { - // you can't use !event_ because the simulation - // might end before the time you tried to schedule the event. - return has_certificates_; - } - - void insert(Point_key k) { - std::cout << "Updating structure to include new object " - << k << "." << std::endl; - objects_.insert(k); - if (has_certificates_) { - std::cout << "Updating all certificates which depend on " - << k << "." << std::endl; - set_has_certificates(false); - set_has_certificates(true); - } - } - - void set(Point_key k) { - if (has_certificates_) { - std::cout << "Updating all certificates which depend on " - << k << "." << std::endl; - set_has_certificates(false); - set_has_certificates(true); - } else { - std::cout << "An object changed, but there was no certificate."<< std::endl; - } - } - - void erase(Point_key k) { - std::cout << "An object " << k << " was removed."<< std::endl; - objects_.erase(k); - if (has_certificates_) { - std::cout << "Updating all certificates which depend on " - << k << "." << std::endl; - set_has_certificates(false); - set_has_certificates(true); - } - } - -protected: - bool has_certificates_; - std::set objects_; - Event_key event_; - Traits tr_; -}; - -int main(int, char *[]) -{ - typedef CGAL::Kinetic::Exact_simulation_traits Traits; - typedef Trivial_kds TKDS; - - Traits tr(1,100); - TKDS::Handle tk= new TKDS(tr); - - Traits::Simulator::Handle sp=tr.simulator_handle(); - - Traits::Simulator::Function_kernel::Construct_function cf - = tr.kinetic_kernel_object().function_kernel_object().construct_function_object(); - - tk->set_has_certificates(true); - - typedef Traits::Kinetic_kernel::Point_2 Point; - Traits::Active_points_1_table::Key k - = tr.active_points_1_table_handle()->insert(Point(cf(1), cf(0))); - sp->set_current_event_number(sp->current_event_number()+10); - tr.active_points_1_table_handle() - ->set(k, Traits::Kinetic_kernel::Point_2(cf(2), cf(0))); - sp->set_current_event_number(sp->current_event_number()+10); - tr.active_points_1_table_handle()->erase(k); - sp->set_current_event_number(sp->current_event_number()+10); - return EXIT_SUCCESS; -} diff -Nru cgal-4.7/examples/Linear_cell_complex/CMakeLCCViewerQt.inc cgal-4.8/examples/Linear_cell_complex/CMakeLCCViewerQt.inc --- cgal-4.7/examples/Linear_cell_complex/CMakeLCCViewerQt.inc 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/CMakeLCCViewerQt.inc 2016-04-04 19:00:11.000000000 +0000 @@ -1,33 +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 +# 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) +if ( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND) message(STATUS "NOTICE: Libraries for lcc_viewer not found " - "(CGAL, Qt4, QGLViewer).") -endif( NOT CGAL_FOUND OR NOT CGAL_Qt4_FOUND) + "(CGAL, Qt5, QGLViewer).") +endif( NOT CGAL_FOUND OR NOT CGAL_Qt5_FOUND) include( ${CGAL_USE_FILE} ) +set(CMAKE_INCLUDE_CURRENT_DIR ON) -SET(QT_USE_QTMAIN TRUE ) -SET(QT_USE_QTOPENGL TRUE) -SET(QT_USE_QTXML TRUE) - -FIND_PACKAGE(Qt4 REQUIRED) +FIND_PACKAGE(Qt5 REQUIRED COMPONENTS OpenGL Xml) find_package(QGLViewer REQUIRED) find_package(OpenGL REQUIRED) -INCLUDE(${QT_USE_FILE}) 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}) + ${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 -Nru cgal-4.7/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc cgal-4.8/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc --- cgal-4.7/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/CMakeLCCViewerVtk.inc 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Linear_cell_complex/CMakeLists.txt cgal-4.8/examples/Linear_cell_complex/CMakeLists.txt --- cgal-4.7/examples/Linear_cell_complex/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -4,13 +4,15 @@ 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 -# 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) +# find_package(CGAL COMPONENTS Qt5) # 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) @@ -23,7 +25,6 @@ # add_definition(-DCGAL_DISABLE_ROUNDING_MATH_CHECK) if ( CGAL_FOUND ) - include( ${CGAL_USE_FILE} ) include( CGAL_CreateSingleSourceCGALProgram ) @@ -39,19 +40,15 @@ 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}) + # 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() diff -Nru cgal-4.7/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp cgal-4.8/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp --- cgal-4.7/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/linear_cell_complex_3_triangulation.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,272 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -/* 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 P_traits; -typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; - -struct Face_info { - bool exist_edge[3]; - bool is_external; -}; - -typedef CGAL::Triangulation_face_base_with_info_2 Fb1; - -typedef CGAL::Constrained_triangulation_face_base_2 Fb; -typedef CGAL::Triangulation_data_structure_2 TDS; -typedef CGAL::No_intersection_tag Itag; -typedef CGAL::Constrained_Delaunay_triangulation_2 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<::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 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& points) -{ - Dart_handle d = - CGAL::make_combinatorial_polygon(lcc,(unsigned int)points.size()); - for (unsigned int i=0; i(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()< 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()< -// Contributor(s): Adrien Pilleboue #ifndef CGAL_LCC_3_VIEWER_QT_H #define CGAL_LCC_3_VIEWER_QT_H @@ -25,14 +24,26 @@ #include #include -#include +#include +#include +#include +#include +#include + #include -#include #include - -typedef CGAL::Cartesian Local_kernel; -typedef typename Local_kernel::Point_3 Local_point; -typedef typename Local_kernel::Vector_3 Local_vector; +#include +#include +#include +#include +#include +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Local_kernel; +typedef Local_kernel::Point_3 Local_point; +typedef Local_kernel::Vector_3 Local_vector; template struct Geom_utils; @@ -112,20 +123,44 @@ } template -class SimpleLCCViewerQt : public QGLViewer +class SimpleLCCViewerQt : public QGLViewer, public QOpenGLFunctions_2_1 { typedef typename LCC::Dart_handle Dart_handle; -public: + 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 P_traits; + typedef CGAL::Triangulation_vertex_base_with_info_2 Vb; + + typedef CGAL::Triangulation_face_base_with_info_2 Fb1; + + typedef CGAL::Constrained_triangulation_face_base_2 Fb; + typedef CGAL::Triangulation_data_structure_2 TDS; + typedef CGAL::No_intersection_tag Itag; + typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; +public: // Constructor/Destructor SimpleLCCViewerQt(LCC& alcc) : + QGLViewer(CGAL::Qt::createOpenGLContext()), lcc(alcc), wireframe(false), flatShading(true), edges(true), vertices(true), - m_displayListCreated(false) + are_buffers_initialized(false) { setWindowTitle("3D lcc viewer"); resize(500, 450); @@ -136,135 +171,603 @@ this->setFormat(newFormat); } -protected : - void drawAllFaces(bool flat) + ~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() { - for(typename LCC::template One_dart_per_cell_range<2>::iterator - dartIter=lcc.template one_dart_per_cell<2>().begin(); - dartIter.cont(); ++dartIter) + if(!buffers[0].create() || !buffers[1].create() || !buffers[2].create() || + !buffers[3].create() || !buffers[4].create() || !buffers[5].create()) { - Dart_handle& dart = dartIter; - ::glBegin(GL_POLYGON); - ::glColor3f(1.0f, .7f, .7f); + std::cerr<<"VBO Creation FAILED"<::const_iterator - orbitIter = lcc.template darts_of_orbit<1>(dart).begin(); - orbitIter.cont(); ++orbitIter) + "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"<compileSourceCode(fragment_source)) + { + std::cerr<<"Compiling fragmentsource FAILED"<compileSourceCode(vertex_source_p_l)) + { + std::cerr<<"Compiling vertex source FAILED"<compileSourceCode(fragment_source_p_l)) + { + std::cerr<<"Compiling fragmentsource FAILED"<(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(); - for(typename LCC::template One_dart_per_cell_range<1>::iterator - dartIter=lcc.template one_dart_per_cell<1>().begin(); - dartIter.cont(); ++dartIter) + //normals of the facets + buffers[1].bind(); + buffers[1].allocate(flat_normals.data(), + static_cast(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(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(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(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(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) { - Dart_handle& dart = dartIter; + P_traits cdt_traits(normal); + CDT cdt(cdt_traits); - Local_point p = geomutils.get_point(lcc, dartIter); - Dart_handle d2 = lcc.other_extremity(dartIter); - if ( d2!=NULL ) + // 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) { - Local_point p2 = geomutils.get_point(lcc, d2); - glVertex3f( p.x(),p.y(),p.z()); - glVertex3f( p2.x(),p2.y(),p2.z()); + 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 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()); } } + } - ::glEnd(); - // ::glDepthRange(0.005, 1.0); + 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 drawAllVertices() + void compute_vertex(Dart_handle dh, bool empty) { - // ::glDepthRange(0.0, 1.0-0.005); - ::glPointSize(7.0); - ::glBegin(GL_POINTS); - ::glColor3f(0.2f, 0.2f, 0.7f); + 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()); - for (typename LCC::Vertex_attribute_const_range::iterator - v=lcc.vertex_attributes().begin(), - vend=lcc.vertex_attributes().end(); - v!=vend; ++v) + if ( empty ) { - Local_point p = geomutils.get_point(lcc, v); - glVertex3f(p.x(), p.y(), p.z()); + bb = p.bbox(); + empty = false; } - - ::glEnd(); - // ::glDepthRange(0.005, 1.0); + else + bb = bb + p.bbox(); } - void initDraw() + void compute_elements() { - //Compile drawFacet - std::cout << "Compile Display Lists : Faces," << std::flush; - m_dlFaces = ::glGenLists(1); - ::glNewList(m_dlFaces, GL_COMPILE); - drawAllFaces(false); - ::glEndList(); + pos_facets.clear(); + flat_normals.clear(); + smooth_normals.clear(); + pos_lines.clear(); + pos_points.clear(); - //Compile drawFacet with flat shading - std::cout << "Faces (flat shading), " << std::flush; - m_dlFacesFlat = ::glGenLists(1); - ::glNewList(m_dlFacesFlat, GL_COMPILE); - drawAllFaces(true); - ::glEndList(); + 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; + } - //Compile drawEdge - std::cout << "edges, " << std::flush; - m_dlEdges = ::glGenLists(1); - ::glNewList(m_dlEdges, GL_COMPILE); - drawAllEdges(); - ::glEndList(); + unsigned int markfaces = lcc.get_new_mark(); + unsigned int markedges = lcc.get_new_mark(); + unsigned int markvertices = lcc.get_new_mark(); - //Compile drawvertices - std::cout << "vertices" << std::flush; - m_dlVertices = ::glGenLists(1); - ::glNewList(m_dlVertices, GL_COMPILE); - drawAllVertices(); - ::glEndList(); + 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, it, markfaces); + } - std::cout << ". DONE." << std::endl; - m_displayListCreated = true; + if ( !lcc.is_marked(it, markedges) ) + { + compute_edge(it); + CGAL::mark_cell(lcc, it, markedges); + } + + if ( !lcc.is_marked(it, markvertices) ) + { + compute_vertex(it, empty); + empty = false; + CGAL::mark_cell(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() { - if(!m_displayListCreated) initDraw(); + glEnable(GL_DEPTH_TEST); + if(!are_buffers_initialized) + initialize_buffers(); + QColor color; if ( !wireframe ) { - if(flatShading) ::glCallList(m_dlFacesFlat); - else ::glCallList(m_dlFaces); + 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(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(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(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(pos_points.size()/3)); + rendering_program_p_l.release(); + vao[3].release(); } - - if(edges) ::glCallList(m_dlEdges); - - if(vertices) ::glCallList(m_dlVertices); } virtual void init() @@ -284,36 +787,25 @@ // Light default parameters ::glLineWidth(2.4f); ::glPointSize(7.f); - // ::glEnable(GL_POLYGON_OFFSET_FILL); - // ::glPolygonOffset(1.f,1.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); + ::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(), @@ -323,14 +815,12 @@ 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; @@ -338,46 +828,24 @@ 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) + else QGLViewer::keyPressEvent(e); } @@ -413,6 +881,7 @@ text += "Press Escape to exit the viewer."; return text; } + private: LCC& lcc; bool wireframe; @@ -421,26 +890,43 @@ bool vertices; Geom_utils geomutils; - GLuint m_dlFaces; - GLuint m_dlFacesFlat; - GLuint m_dlEdges; - GLuint m_dlVertices; - bool m_displayListCreated; + 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 pos_points; + std::vector pos_lines; + std::vector pos_facets; + std::vector smooth_normals; + std::vector flat_normals; + + QGLBuffer buffers[6]; + QOpenGLVertexArrayObject vao[4]; + + QOpenGLShaderProgram rendering_program; + QOpenGLShaderProgram rendering_program_p_l; }; template void display_lcc(LCC& alcc) { int argc=1; - typedef char* s; const char* argv[2]={"lccviewer","\0"}; QApplication app(argc,const_cast(argv)); - SimpleLCCViewerQt mainwindow(alcc); + SimpleLCCViewerQt mainwindow(alcc,&app); mainwindow.show(); app.exec(); -}; +} #endif // CGAL_LCC_3_VIEWER_QT_H diff -Nru cgal-4.7/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h cgal-4.8/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h --- cgal-4.7/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/linear_cell_complex_3_viewer_vtk.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// -#ifndef CGAL_LCC_3_VIEWER_VTK_H -#define CGAL_LCC_3_VIEWER_VTK_H - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Cartesian Local_kernel; -typedef typename Local_kernel::Point_3 Local_point; -typedef typename Local_kernel::Vector_3 Local_vector; - -template -struct Geom_utils; - -template -struct Geom_utils -{ - 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,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,dh)); - n = n/(CGAL::sqrt(n*n)); - return n; - } -protected: - CGAL::Cartesian_converter converter; -}; - -template -struct Geom_utils -{ - 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 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 SimpleLCCViewerVtk : public SimpleViewVtk -{ - typedef typename LCC::Dart_handle Dart_handle; - Geom_utils 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, 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 -void display_lcc(LCC& alcc) -{ - int argc=1; - typedef char* s; - - const char* argv[2]={"lccviewer","\0"}; - QApplication app(argc,const_cast(argv)); - - SimpleLCCViewerVtk mainwindow(alcc); - mainwindow.show(); - - app.exec(); -}; - -#endif // CGAL_LCC_3_VIEWER_VTK_H diff -Nru cgal-4.7/examples/Linear_cell_complex/README.txt cgal-4.8/examples/Linear_cell_complex/README.txt --- cgal-4.7/examples/Linear_cell_complex/README.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/README.txt 2016-04-04 19:00:11.000000000 +0000 @@ -13,12 +13,6 @@ 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. diff -Nru cgal-4.7/examples/Linear_cell_complex/voronoi_2.cpp cgal-4.8/examples/Linear_cell_complex/voronoi_2.cpp --- cgal-4.7/examples/Linear_cell_complex/voronoi_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/voronoi_2.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -5,14 +5,9 @@ #include #include -/* If you want to use a viewer, you can use one of the following file - * depending if you use vtk or qglviewer. */ +/* If you want to use a viewer, you can use 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. @@ -34,7 +29,7 @@ // Indeed, we cannot view these faces since they do not have // a "correct geometry". std::stack toremove; - int mark_toremove=alcc.get_new_mark(); + LCC_2::size_type mark_toremove=alcc.get_new_mark(); // adart belongs to the infinite face. toremove.push(adart); diff -Nru cgal-4.7/examples/Linear_cell_complex/voronoi_3.cpp cgal-4.8/examples/Linear_cell_complex/voronoi_3.cpp --- cgal-4.7/examples/Linear_cell_complex/voronoi_3.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Linear_cell_complex/voronoi_3.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -5,14 +5,9 @@ #include #include -/* If you want to use a viewer, you can use one of the following file - * depending if you use vtk or qglviewer. */ +/* 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" -#else -#ifdef CGAL_LCC_USE_VTK -#include "linear_cell_complex_3_viewer_vtk.h" -#endif #endif /* // If you want to use exact constructions. @@ -34,7 +29,7 @@ // Indeed, we cannot view these volumes since they do not have // a "correct geometry". std::stack toremove; - int mark_toremove=alcc.get_new_mark(); + LCC_3::size_type mark_toremove=alcc.get_new_mark(); // adart belongs to the infinite volume. toremove.push(adart); diff -Nru cgal-4.7/examples/Mesh_3/CMakeLists.txt cgal-4.8/examples/Mesh_3/CMakeLists.txt --- cgal-4.7/examples/Mesh_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -8,9 +8,6 @@ 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) @@ -48,6 +45,21 @@ 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 ) @@ -62,10 +74,16 @@ 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." ) Binary files /tmp/tmpFwXPJy/EKuWN0_mXZ/cgal-4.7/examples/Mesh_3/data/skull_2.9.inr and /tmp/tmpFwXPJy/Z1chxSVHA8/cgal-4.8/examples/Mesh_3/data/skull_2.9.inr differ diff -Nru cgal-4.7/examples/Mesh_3/mesh_3D_gray_image.cpp cgal-4.8/examples/Mesh_3/mesh_3D_gray_image.cpp --- cgal-4.7/examples/Mesh_3/mesh_3D_gray_image.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_3D_gray_image.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,54 @@ + +#include + +#include +#include +#include + +#include +#include +#include +#include + +typedef float Image_word_type; + +// Domain +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Gray_image_mesh_domain_3 Mesh_domain; + +// Triangulation +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + +// Criteria +typedef CGAL::Mesh_criteria_3 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(domain, criteria); + + // Output + std::ofstream medit_file("out.mesh"); + c3t3.output_to_medit(medit_file); + + return 0; +} diff -Nru cgal-4.7/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp cgal-4.8/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp --- cgal-4.7/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_3D_gray_vtk_image.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -0,0 +1,89 @@ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +typedef short Image_word_type; + +// Domain +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Gray_image_mesh_domain_3 > > Mesh_domain; + +// Triangulation +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + +// Criteria +typedef CGAL::Mesh_criteria_3 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] << " 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(argv[2]): 1; + double fs = (argc>3)? boost::lexical_cast(argv[3]): 1; + double fd = (argc>4)? boost::lexical_cast(argv[4]): 0.1; + double cs = (argc>5)? boost::lexical_cast(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(), 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(domain, criteria); + + // Output + std::ofstream medit_file("out.mesh"); + c3t3.output_to_medit(medit_file); + + return 0; +} diff -Nru cgal-4.7/examples/Mesh_3/mesh_3D_image.cpp cgal-4.8/examples/Mesh_3/mesh_3D_image.cpp --- cgal-4.7/examples/Mesh_3/mesh_3D_image.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_3D_image.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -1,3 +1,4 @@ + #include #include @@ -30,11 +31,15 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char* argv[]) { + const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz"; // Loads image CGAL::Image_3 image; - image.read("data/liver.inr.gz"); + if(!image.read(fname)){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } // Domain Mesh_domain domain(image); diff -Nru cgal-4.7/examples/Mesh_3/mesh_3D_image_variable_size.cpp cgal-4.8/examples/Mesh_3/mesh_3D_image_variable_size.cpp --- cgal-4.7/examples/Mesh_3/mesh_3D_image_variable_size.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_3D_image_variable_size.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -35,11 +35,15 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char* argv[]) { + const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz"; // Loads image CGAL::Image_3 image; - image.read("data/liver.inr.gz"); + if(!image.read(fname)){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } // Domain Mesh_domain domain(image); diff -Nru cgal-4.7/examples/Mesh_3/mesh_optimization_example.cpp cgal-4.8/examples/Mesh_3/mesh_optimization_example.cpp --- cgal-4.7/examples/Mesh_3/mesh_optimization_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_optimization_example.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -30,11 +30,16 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char* argv[]) { + const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz"; // Domain CGAL::Image_3 image; - image.read("data/liver.inr.gz"); + if(!image.read(fname)){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + Mesh_domain domain(image); // Mesh criteria diff -Nru cgal-4.7/examples/Mesh_3/mesh_optimization_lloyd_example.cpp cgal-4.8/examples/Mesh_3/mesh_optimization_lloyd_example.cpp --- cgal-4.7/examples/Mesh_3/mesh_optimization_lloyd_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_optimization_lloyd_example.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -30,11 +30,15 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char*argv[]) { + const char* fname = (argc>1)?argv[1]:"data/liver.inr.gz"; // Domain CGAL::Image_3 image; - image.read("data/liver.inr.gz"); + if(!image.read(fname)){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } Mesh_domain domain(image); // Mesh criteria diff -Nru cgal-4.7/examples/Mesh_3/mesh_polyhedral_domain.cpp cgal-4.8/examples/Mesh_3/mesh_polyhedral_domain.cpp --- cgal-4.7/examples/Mesh_3/mesh_polyhedral_domain.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_polyhedral_domain.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -34,12 +34,18 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char*argv[]) { + const char* fname = (argc>1)?argv[1]:"data/elephant.off"; // Create input polyhedron Polyhedron polyhedron; - std::ifstream input("data/elephant.off"); + 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); diff -Nru cgal-4.7/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp cgal-4.8/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp --- cgal-4.7/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Mesh_3/mesh_polyhedral_domain_with_features.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -30,10 +30,11 @@ // To avoid verbose function and named parameters call using namespace CGAL::parameters; -int main() +int main(int argc, char*argv[]) { + const char* fname = (argc>1)?argv[1]:"data/fandisk.off"; // Create domain - Mesh_domain domain("data/fandisk.off"); + Mesh_domain domain(fname); // Get sharp features domain.detect_features(); diff -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt cgal-4.8/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/data/stair.xy cgal-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xy --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/data/stair.xy 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xy 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/data/stair.xym cgal-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xym --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/data/stair.xym 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/data/stair.xym 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_indexed_output_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,68 @@ +#include +#include + +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::FT FT; +typedef K::Point_2 Point; + +typedef CGAL::Optimal_transportation_reconstruction_2 Otr_2; + +void load_xy_file(const std::string& filename, std::vector& 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 points; + std::vector isolated_vertices; + std::vector > 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::iterator pit; + for (pit = points.begin(); pit != points.end(); pit++) + std::cout << *pit << std::endl; + + // isolated vertices + std::vector::iterator vit; + for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++) + std::cout << "1 " << *vit << std::endl; + + // edges + std::vector >::iterator eit; + for (eit = edges.begin(); eit != edges.end(); eit++) + std::cout << "2 " << eit->first << " " << eit->second << std::endl; +} + +int main () +{ + std::vector points; + + load_xy_file("data/stair-noise00.xy", points); + + Otr_2 otr2(points); + otr2.run(100); // 100 steps + indexed_output(otr2); + + return 0; +} diff -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_list_output_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,57 @@ +#include +#include + +#include +#include +#include +#include +#include + +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 Otr_2; + +void load_xy_file(const std::string& filename, std::vector& 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 isolated_points; + std::vector segments; + + otr2.list_output( + std::back_inserter(isolated_points), std::back_inserter(segments)); + + std::vector::iterator pit; + for (pit = isolated_points.begin(); pit != isolated_points.end(); pit++) + std::cout << *pit << std::endl; + + std::vector::iterator sit; + for (sit = segments.begin(); sit != segments.end(); sit++) + std::cout << *sit << std::endl; +} + +int main () +{ + std::vector points; + + load_xy_file("data/stair-noise00.xy", points); + + Otr_2 otr2(points); + otr2.run(100); // 100 steps + list_output(otr2); + + return 0; +} diff -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_mass_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,70 @@ +#include +#include + +#include +#include +#include +#include +#include // std::pair +#include + +#include + +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 PointMassPair; +typedef std::vector PointMassList; + +typedef CGAL::First_of_pair_property_map Point_property_map; +typedef CGAL::Second_of_pair_property_map 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 isolated_vertices; + std::vector edges; + + otr2.list_output( + std::back_inserter(isolated_vertices), std::back_inserter(edges)); + + std::cout << "Isolated vertices:" << std::endl; + std::vector::iterator vit; + for (vit = isolated_vertices.begin(); vit != isolated_vertices.end(); vit++) + std::cout << *vit << std::endl; + + std::cerr << "Edges:" << std::endl; + std::vector::iterator eit; + for (eit = edges.begin(); eit != edges.end(); eit++) + std::cout << *eit << std::endl; + + return 0; +} diff -Nru cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp --- cgal-4.7/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,28 @@ +// Simplest example for Optimal_transportation_reconstruction_2, with no mass +// attributes for the input points + +#include +#include +#include + +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_2 Point; + +typedef CGAL::Optimal_transportation_reconstruction_2 Otr; + +int main () +{ + // Generate a set of random points on the boundary of a square. + std::vector points; + CGAL::Random_points_on_square_2 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 -Nru cgal-4.7/examples/Point_set_processing_3/average_spacing_example.cpp cgal-4.8/examples/Point_set_processing_3/average_spacing_example.cpp --- cgal-4.7/examples/Point_set_processing_3/average_spacing_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/average_spacing_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -15,6 +15,14 @@ // define the Red Green Blue color of the point. typedef boost::tuple 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"; @@ -48,7 +56,7 @@ // Computes average spacing. const unsigned int nb_neighbors = 6; // 1 ring - FT average_spacing = CGAL::compute_average_spacing( + FT average_spacing = CGAL::compute_average_spacing( points.begin(), points.end(), CGAL::Nth_of_tuple_property_map<1,IndexedPointWithColorTuple>(), nb_neighbors); diff -Nru cgal-4.7/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp cgal-4.8/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp --- cgal-4.7/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -16,6 +16,13 @@ // Point with normal vector stored in a std::pair. typedef std::pair 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[]) { @@ -45,7 +52,7 @@ for (int i = 0; i < iter_number; ++i) { /* double error = */ - CGAL::bilateral_smooth_point_set ( + CGAL::bilateral_smooth_point_set ( points.begin(), points.end(), CGAL::First_of_pair_property_map(), diff -Nru cgal-4.7/examples/Point_set_processing_3/CMakeLists.txt cgal-4.8/examples/Point_set_processing_3/CMakeLists.txt --- cgal-4.7/examples/Point_set_processing_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -5,12 +5,6 @@ cmake_minimum_required(VERSION 2.8.11) -# 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 ) @@ -23,15 +17,10 @@ # 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 + + # Allow Windows 32bit 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}'" ) @@ -57,6 +46,7 @@ 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" ) diff -Nru cgal-4.7/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp cgal-4.8/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp --- cgal-4.7/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -15,6 +15,13 @@ // Point with normal vector stored in a std::pair. typedef std::pair 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[]) { @@ -39,10 +46,10 @@ 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; + const std::size_t number_of_output_points = points.size() * 4; //Run algorithm - CGAL::edge_aware_upsample_point_set( + CGAL::edge_aware_upsample_point_set( points.begin(), points.end(), std::back_inserter(points), diff -Nru cgal-4.7/examples/Point_set_processing_3/grid_simplify_indices.cpp cgal-4.8/examples/Point_set_processing_3/grid_simplify_indices.cpp --- cgal-4.7/examples/Point_set_processing_3/grid_simplify_indices.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/grid_simplify_indices.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,7 +1,8 @@ #include #include #include -#include +#include + #include #include diff -Nru cgal-4.7/examples/Point_set_processing_3/hierarchy_simplification_example.cpp cgal-4.8/examples/Point_set_processing_3/hierarchy_simplification_example.cpp --- cgal-4.7/examples/Point_set_processing_3/hierarchy_simplification_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/hierarchy_simplification_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,48 @@ +#include +#include +#include +#include +#include +#include + +#include +#include + +// 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 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 -Nru cgal-4.7/examples/Point_set_processing_3/jet_smoothing_example.cpp cgal-4.8/examples/Point_set_processing_3/jet_smoothing_example.cpp --- cgal-4.7/examples/Point_set_processing_3/jet_smoothing_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/jet_smoothing_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,11 +1,20 @@ #include #include + #include // 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 @@ -22,7 +31,7 @@ // 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); + CGAL::jet_smooth_point_set(points.begin(), points.end(), nb_neighbors); return EXIT_SUCCESS; } diff -Nru cgal-4.7/examples/Point_set_processing_3/normal_estimation.cpp cgal-4.8/examples/Point_set_processing_3/normal_estimation.cpp --- cgal-4.7/examples/Point_set_processing_3/normal_estimation.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/normal_estimation.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -26,8 +26,9 @@ #include // defines std::pair #include -#include +#include #include +#include // ---------------------------------------------------------------------------- @@ -46,6 +47,13 @@ typedef std::pair PointVectorPair; typedef std::vector PointList; +// Concurrency +#ifdef CGAL_LINKED_WITH_TBB +typedef CGAL::Parallel_tag Concurrency_tag; +#else +typedef CGAL::Sequential_tag Concurrency_tag; +#endif + // ---------------------------------------------------------------------------- // Private functions @@ -62,12 +70,12 @@ // 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::pca_estimate_normals(points.begin(), points.end(), CGAL::First_of_pair_property_map(), CGAL::Second_of_pair_property_map(), nb_neighbors_pca_normals); - long memory = CGAL::Memory_sizer().virtual_size(); + std::size_t memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " << (memory>>20) << " Mb allocated" << std::endl; @@ -84,12 +92,12 @@ // 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::jet_estimate_normals(points.begin(), points.end(), CGAL::First_of_pair_property_map(), CGAL::Second_of_pair_property_map(), nb_neighbors_jet_fitting_normals); - long memory = CGAL::Memory_sizer().virtual_size(); + std::size_t memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " << (memory>>20) << " Mb allocated" << std::endl; @@ -112,7 +120,7 @@ R, r); - long memory = CGAL::Memory_sizer().virtual_size(); + std::size_t memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " << (memory>>20) << " Mb allocated" << std::endl; @@ -139,7 +147,7 @@ // 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::size_t memory = CGAL::Memory_sizer().virtual_size(); std::cerr << "done: " << task_timer.time() << " seconds, " << (memory>>20) << " Mb allocated" << std::endl; @@ -271,7 +279,7 @@ } // Prints status - int nb_points = points.size(); + std::size_t nb_points = points.size(); std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, " << task_timer.time() << " seconds" << std::endl; diff -Nru cgal-4.7/examples/Point_set_processing_3/normals_example.cpp cgal-4.8/examples/Point_set_processing_3/normals_example.cpp --- cgal-4.7/examples/Point_set_processing_3/normals_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/normals_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -16,6 +16,13 @@ // Point with normal vector stored in a std::pair. typedef std::pair 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"; @@ -35,7 +42,7 @@ // 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::pca_estimate_normals(points.begin(), points.end(), CGAL::First_of_pair_property_map(), CGAL::Second_of_pair_property_map(), nb_neighbors); @@ -44,7 +51,7 @@ // Note: mst_orient_normals() requires an iterator over points // as well as property maps to access each point's position and normal. std::list::iterator unoriented_points_begin = - CGAL::mst_orient_normals(points.begin(), points.end(), + CGAL::mst_orient_normals(points.begin(), points.end(), CGAL::First_of_pair_property_map(), CGAL::Second_of_pair_property_map(), nb_neighbors); diff -Nru cgal-4.7/examples/Point_set_processing_3/random_simplification_example.cpp cgal-4.8/examples/Point_set_processing_3/random_simplification_example.cpp --- cgal-4.7/examples/Point_set_processing_3/random_simplification_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/random_simplification_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -5,6 +5,7 @@ #include #include +#include // types typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; diff -Nru cgal-4.7/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp cgal-4.8/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp --- cgal-4.7/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -6,6 +6,7 @@ #include // defines std::pair #include #include +#include // types typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; diff -Nru cgal-4.7/examples/Point_set_processing_3/remove_outliers_example.cpp cgal-4.8/examples/Point_set_processing_3/remove_outliers_example.cpp --- cgal-4.7/examples/Point_set_processing_3/remove_outliers_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/remove_outliers_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -5,6 +5,7 @@ #include #include +#include // types typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; diff -Nru cgal-4.7/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp cgal-4.8/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp --- cgal-4.7/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -5,11 +5,19 @@ #include #include +#include // types typedef CGAL::Simple_cartesian 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"; @@ -33,7 +41,7 @@ const double neighbor_radius = 0.5; // neighbors size. CGAL::wlop_simplify_and_regularize_point_set - // parallel version + (points.begin(), points.end(), std::back_inserter(output), diff -Nru cgal-4.7/examples/Poisson_surface_reconstruction_3/CMakeLists.txt cgal-4.8/examples/Poisson_surface_reconstruction_3/CMakeLists.txt --- cgal-4.7/examples/Poisson_surface_reconstruction_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Poisson_surface_reconstruction_3/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Poisson_surface_reconstruction_3/data/kitten.xyz cgal-4.8/examples/Poisson_surface_reconstruction_3/data/kitten.xyz --- cgal-4.7/examples/Poisson_surface_reconstruction_3/data/kitten.xyz 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Poisson_surface_reconstruction_3/data/kitten.xyz 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,5210 @@ +-0.0721898 -0.159749 -0.108444 0.340472 0.937712 -0.0690972 +0.145233 -0.163455 0.107108 0.821548 0.302589 0.483218 +0.126784 -0.175123 -0.0474613 0.625688 0.275329 -0.729869 +-0.0481776 -0.165903 -0.0696537 0.304957 0.95168 0.0361474 +-0.061821 -0.160092 -0.0798811 0.303781 0.952723 0.00601667 +0.18959 -0.0441324 -0.0583945 0.586367 -0.770557 -0.249832 +-0.0910041 -0.0473802 -0.0703309 -0.571321 -0.793276 -0.21049 +0.121865 -0.20656 -0.0630568 0.58295 0.246179 -0.774316 +-0.238013 0.0972646 -0.0475612 -0.763139 -0.641471 -0.0783177 +-0.252128 0.113606 -0.0418154 -0.768814 -0.631298 -0.101922 +-0.181908 -0.150647 -0.179282 -0.0515764 0.971988 -0.229303 +-0.0797994 -0.157003 -0.069821 0.138144 0.973901 0.180094 +-0.147355 -0.140286 -0.130828 0.200499 0.979694 -0.000430957 +0.297153 0.250216 -0.0435451 0.898297 -0.35699 -0.256165 +-0.016266 -0.249438 -0.247267 0.612683 0.455631 -0.645771 +0.00728707 -0.314915 -0.246576 0.729056 0.0314841 -0.68373 +-0.0872895 -0.15636 -0.136979 0.301291 0.951298 -0.0652348 +-0.119395 -0.149051 -0.146431 0.238813 0.969265 -0.059112 +-0.141649 -0.147604 -0.175279 0.124256 0.959842 -0.251524 +-0.234311 -0.328351 -0.240886 -0.655553 -0.351807 -0.668193 +-0.131634 -0.145404 -0.12887 0.262869 0.964652 -0.0186147 +0.0614646 -0.498881 -0.0497886 0.00288573 -0.999989 0.00361588 +-0.0313547 -0.171847 -0.0747266 0.267033 0.960615 -0.0768956 +-0.0219535 -0.170117 -0.045884 -0.0915186 0.965182 -0.245045 +-0.235408 -0.454685 -0.081975 -0.856685 -0.515816 -0.0050348 +-0.15958 -0.139452 -0.146065 0.0460015 0.991112 -0.124821 +-0.0548369 0.166926 -0.251163 -0.330298 0.0533227 -0.942369 +-0.232858 -0.456752 -0.0596575 -0.841615 -0.526479 0.120437 +0.15194 -0.431975 -0.0617963 0.77208 0.635502 -0.00546661 +-0.192664 0.259502 0.0130537 -0.944406 0.263691 0.196379 +0.0668991 -0.489411 -0.138382 0.585053 -0.658313 -0.473642 +-0.241635 -0.186916 -0.0530211 -0.596702 0.715943 0.362455 +-0.120469 -0.15258 -0.176379 0.198434 0.961548 -0.189868 +0.0678517 0.0202853 -0.225825 0.12869 -0.515475 -0.847186 +-0.00625867 0.298363 -0.226465 -0.128394 0.537319 -0.833549 +-0.11927 -0.158179 -0.199837 0.158134 0.937532 -0.309884 +-0.128294 -0.14838 -0.161113 0.224967 0.964092 -0.141128 +-0.0559685 0.149143 -0.251352 -0.329683 -0.0119581 -0.944016 +0.175103 -0.0634498 -0.0261962 0.610214 -0.772236 -0.176891 +-0.0273079 0.131126 -0.258575 -0.238994 -0.0840461 -0.967377 +-0.0222544 -0.496567 0.0103161 -0.180626 -0.969553 -0.165353 +-0.042432 0.122516 -0.253562 -0.285304 -0.125476 -0.950188 +-0.288933 -0.209323 -0.153456 -0.898609 0.256234 0.356154 +0.0197803 0.0842369 -0.257008 -0.0665083 -0.290489 -0.954564 +-0.00923839 -0.474861 -0.0394226 -0.0851904 -0.990979 -0.10346 +-0.25372 -0.256467 -0.258339 -0.638393 -0.353794 -0.683582 +-0.136981 -0.144374 -0.0978283 0.180851 0.971813 0.151238 +-0.190808 -0.148654 -0.16661 -0.118483 0.978553 -0.168508 +-0.0852432 0.323718 -0.168989 -0.43918 0.691497 -0.573543 +-0.2066 -0.149973 -0.161006 -0.208648 0.976805 -0.048141 +-0.167584 -0.142276 -0.103551 -0.110778 0.977581 0.179065 +-0.214846 -0.0562103 -0.245331 0.657937 0.142026 -0.739559 +-0.147513 -0.141518 -0.111288 0.135589 0.988471 0.0673765 +-0.246258 -0.052246 -0.252449 -0.272089 0.613699 -0.741175 +0.0302254 0.30189 -0.225753 0.0474554 0.550746 -0.833323 +0.281646 0.142488 -0.0483718 0.983943 0.0121708 -0.178068 +-0.0287156 -0.385694 -0.254434 0.481533 -0.403448 -0.778046 +-0.108216 -0.148934 -0.10765 0.192387 0.981244 0.012159 +-0.256272 -0.412174 -0.0484345 -0.868213 -0.48019 0.124999 +-0.280278 -0.260533 -0.0357663 -0.915803 0.223518 0.333683 +0.0202554 0.19524 -0.264544 -0.0306971 0.132948 -0.990648 +-0.0100756 -0.483748 -0.0221762 0.0156098 -0.87493 -0.483998 +0.0472835 0.168668 -0.2665 0.0904187 0.0651501 -0.993771 +-0.192276 -0.0311072 -0.157972 0.48944 -0.546995 0.67915 +-0.0343814 -0.487596 -0.00250569 -0.361344 -0.928134 -0.0894248 +0.311009 0.289879 -0.0429126 0.936829 -0.258762 -0.235358 +0.0951159 0.15758 -0.256511 0.306129 0.0270707 -0.951605 +0.0781069 0.160108 -0.261489 0.245742 0.0399743 -0.968511 +0.166595 -0.049528 -0.0853077 0.490702 -0.80149 -0.341798 +-0.0648471 -0.166919 -0.0443978 0.0256679 0.976101 0.215795 +-0.0394325 -0.164345 -0.0172429 -0.298607 0.95138 -0.0755685 +0.0345961 0.413045 -0.0302082 -0.0625827 0.992678 -0.103313 +-0.135018 -0.149572 -0.0795717 0.127418 0.95209 0.278011 +0.077688 0.12543 -0.260916 0.234135 -0.092476 -0.967796 +-0.0118103 0.121778 -0.261279 -0.18914 -0.124959 -0.973967 +0.122851 0.408969 -0.0619005 -0.193415 0.940439 -0.27958 +-0.227554 -0.194002 -0.0239083 -0.504223 0.696352 0.510738 +-0.117026 -0.166081 -0.0350238 0.0631263 0.90932 0.411281 +-0.0676798 -0.161555 -0.0605097 0.185222 0.957786 0.219863 +-0.208275 -0.150199 -0.138472 -0.319121 0.947604 0.0144603 +-0.277595 0.144142 -0.0286479 -0.820775 -0.570796 -0.0228258 +0.151718 -0.441401 -0.0346282 0.819574 0.414449 0.395639 +-0.0445576 -0.486016 -0.0392794 0.0587527 -0.990477 -0.124515 +-0.0650822 -0.482734 -0.0149406 -0.0358344 -0.985068 0.168396 +-0.232877 -0.288881 -0.260779 -0.568496 -0.326298 -0.75521 +-0.204163 -0.344803 -0.256869 -0.515756 -0.330114 -0.790582 +-0.0515999 -0.479091 0.000453441 -0.205311 -0.973534 -0.100397 +0.147215 -0.286265 -0.0384327 0.833468 -0.241745 -0.496881 +-0.194253 -0.361722 -0.256148 -0.507891 -0.343653 -0.789905 +0.154622 -0.201015 -0.0258112 0.819552 0.234652 -0.522756 +-0.0249456 -0.482824 -0.0343095 0.270834 -0.916578 -0.294166 +-0.138319 -0.450307 -0.237276 -0.212534 -0.493022 -0.843658 +0.195898 -0.0437999 -0.041838 0.621528 -0.760066 -0.189745 +0.12937 -0.405008 -0.0530142 0.849716 0.512381 -0.12429 +-0.116777 -0.417019 -0.260014 -0.0623564 -0.489619 -0.869704 +0.185081 -0.0587389 -0.00674544 0.627338 -0.774021 -0.0856666 +-0.116816 -0.0320404 -0.0533273 -0.60895 -0.775585 -0.166275 +-0.16257 -0.138961 -0.12379 -0.00561221 0.997826 0.0656706 +-0.175502 0.0220674 -0.0545377 -0.744933 -0.665187 -0.0510027 +-0.248692 -0.176851 -0.0986233 -0.643428 0.74768 0.164241 +-0.0276411 -0.480916 -0.0488753 0.22768 -0.971919 0.0594605 +0.28322 0.178827 -0.0264141 0.99458 0.00225036 -0.103947 +-0.0726005 -0.4796 0.00656314 0.248856 -0.918906 -0.306076 +-0.0224941 -0.485578 -0.0660648 -0.079758 -0.886141 0.456501 +0.037861 0.15525 -0.26739 0.028714 0.0147999 -0.999478 +0.0488279 0.123351 -0.26544 0.0760119 -0.113807 -0.990591 +-0.0415368 -0.167181 -0.0373349 0.00445007 0.996779 -0.0800739 +-0.323212 0.25785 -0.0390385 -0.949029 -0.0755595 0.305999 +-0.206557 0.34705 -0.0314958 0.15191 0.964003 0.218223 +0.0444739 0.140085 -0.26706 0.0594753 -0.0477283 -0.997088 +0.179883 0.451059 -0.0362189 -0.604662 0.778966 -0.166123 +-0.166256 -0.00698664 -0.160566 0.66738 -0.716506 0.203036 +0.196069 0.462988 -0.0380465 -0.568075 0.792655 -0.221335 +0.218929 0.480971 -0.0271408 -0.48544 0.853618 -0.188905 +-0.172861 0.00474642 -0.131822 0.00824581 -0.880887 0.473255 +-0.292815 -0.114292 -0.255258 -0.852434 0.266337 -0.449912 +0.253948 0.131026 -0.127299 0.87436 -0.0516106 -0.482525 +-0.203037 -0.15079 -0.183576 0.0834498 0.99598 0.0325554 +0.255082 0.49457 -0.0287433 -0.104757 0.932047 -0.346865 +-0.0632463 -0.486019 -0.0351406 -0.0287493 -0.999027 0.0334548 +-0.213058 -0.461446 -0.00464083 -0.795922 -0.513207 0.321133 +-0.282146 -0.228582 -0.082814 -0.912151 0.363492 0.189354 +0.158294 -0.0776357 -0.0246839 0.67312 -0.69896 -0.241587 +0.212603 -0.0308818 -0.0341366 0.682625 -0.713638 -0.157303 +-0.0302419 -0.488892 -0.0215477 -0.00363449 -0.976084 -0.217362 +-0.184262 -0.0362513 -0.172305 0.724066 -0.519509 0.453694 +-0.017125 -0.340448 -0.26343 0.541181 -0.162865 -0.824984 +-0.0152848 -0.319707 -0.265148 0.563743 -0.0542476 -0.824167 +-0.0655733 -0.411416 -0.256878 0.267853 -0.507151 -0.819178 +-0.130836 -0.426304 -0.25302 -0.160632 -0.488647 -0.857567 +-0.310957 0.317062 -0.0288837 -0.520458 0.167203 0.837357 +-0.185087 -0.493636 -0.0259475 -0.307923 -0.944821 0.111791 +-0.290368 -0.187174 -0.256136 -0.812741 -0.261137 -0.520827 +-0.107813 -0.190198 -0.250435 0.211672 0.700499 -0.68154 +-0.0517664 -0.190971 -0.218982 0.45997 0.748194 -0.478156 +-0.0930247 -0.20254 -0.256705 0.262804 0.642447 -0.719858 +-0.0586637 -0.164073 -0.0985394 0.349982 0.930665 -0.106655 +-0.172196 0.0169512 -0.0369627 -0.760878 -0.64659 -0.0546506 +0.0107708 0.391478 -0.113855 -0.13902 0.928023 -0.345612 +-0.0569718 -0.169123 -0.0263236 -0.21604 0.965619 0.144593 +-0.243543 -0.225052 -0.280438 -0.405437 -0.304851 -0.861793 +-0.171335 -0.147424 -0.0865226 -0.169463 0.943436 0.284977 +-0.161949 -0.165404 -0.227078 0.116022 0.908381 -0.401726 +-0.150645 0.00447613 -0.15549 0.435242 -0.870382 -0.230216 +-0.0137941 0.406466 -0.0227275 -0.236183 0.970063 -0.0565197 +-0.0808652 -0.483769 -0.028792 0.207866 -0.96786 0.141557 +0.18262 0.368392 0.0374551 0.709717 0.506504 0.489649 +-0.170531 -0.347031 -0.274546 -0.378346 -0.281481 -0.881829 +0.0804058 -0.473327 -0.131595 0.553595 -0.114218 -0.824916 +-0.223154 -0.150705 -0.272817 0.694741 0.303099 -0.652277 +0.276898 0.0691892 -0.0235888 0.962006 -0.254879 -0.0978856 +0.107993 0.404776 -0.0706635 -0.0288351 0.958027 -0.285223 +0.301154 0.250331 -0.0257477 0.926511 -0.356534 -0.120251 +0.0443342 0.134106 0.292336 0.245375 0.17551 0.953408 +-0.0796152 -0.407975 -0.262944 0.176856 -0.491639 -0.85265 +-0.280609 0.267672 -0.0248043 0.0847461 0.040975 0.99556 +0.118521 0.0733598 -0.236419 0.363048 -0.295367 -0.883716 +-0.26897 0.287947 -0.0261521 0.0402056 -0.0237685 0.998909 +0.0141038 0.111821 0.293042 -0.218396 -0.246297 0.944268 +-0.260741 0.269933 -0.0265047 0.037242 0.00534352 0.999292 +-0.27767 0.301061 -0.0252558 0.0256769 -0.0361683 0.999016 +0.0787156 -0.0100206 0.240834 0.260719 -0.414749 0.871785 +0.025801 0.146161 0.290617 -0.00185102 0.38455 0.923102 +-0.265618 0.327403 -0.0235752 -0.121799 0.0251807 0.992235 +0.0154439 0.045346 0.274255 0.215397 -0.357497 0.908735 +0.0113867 0.131302 0.294057 -0.249115 0.110069 0.962199 +-0.265749 -0.204934 -0.274876 -0.575575 -0.329087 -0.748609 +-0.0656077 -0.355435 -0.281959 0.243087 -0.269034 -0.931949 +0.0823779 0.0894638 0.283435 0.233934 0.0457325 0.971176 +-0.233723 0.29077 -0.0227118 -0.276231 -0.152567 0.948905 +0.03874 0.0812565 0.282941 -0.0721134 -0.286075 0.95549 +0.0213958 0.161316 0.280081 -0.0751891 0.727395 0.682087 +0.0599989 0.139856 0.283127 0.492604 0.362694 0.791071 +0.134757 -0.159037 0.120263 0.760591 0.316227 0.567011 +-0.283905 0.332301 -0.0249318 -0.113118 0.134468 0.98444 +0.0676135 0.101665 0.285565 0.232212 0.0492457 0.971418 +0.0853554 0.108595 0.279217 0.354245 0.26554 0.89666 +0.00306278 0.100047 0.281849 -0.250016 -0.180745 0.951222 +-0.222437 0.34588 -0.0212486 -0.0191486 0.756428 0.653797 +0.322156 0.339575 -0.0379985 0.976071 -0.10916 -0.188067 +-0.00993407 0.253985 -0.247766 -0.156144 0.335652 -0.928955 +0.116833 -0.498214 -0.0410586 0.022783 -0.997787 0.0624716 +0.0771899 0.0735268 0.283094 0.113906 -0.179895 0.977069 +0.100858 -0.258599 -0.0891678 0.626563 0.078189 -0.775439 +-0.016813 0.0655117 0.278572 -0.275319 -0.0983143 0.956313 +0.0621006 0.0652524 0.281993 -0.0649632 -0.303581 0.950589 +-0.0869092 -0.0650904 0.00523852 -0.549422 -0.828511 -0.108192 +-0.235824 -0.115853 -0.274359 0.632689 0.174602 -0.754466 +-0.293379 -0.295046 -0.0958402 -0.997626 -0.0674564 0.0138899 +-0.256943 0.117036 -0.0252105 -0.765341 -0.643433 -0.0157217 +-0.152339 -0.205918 -0.272698 0.121567 0.532705 -0.837524 +0.00205732 0.15838 0.276778 -0.394374 0.672266 0.626521 +0.071127 0.12181 0.280897 0.433559 0.236638 0.869499 +0.28242 0.123467 -0.041124 0.987461 -0.0461197 -0.150976 +-0.138639 -0.215421 -0.276573 0.0960367 0.483449 -0.870088 +-0.015531 0.107321 0.278436 -0.451101 -0.0162577 0.892325 +-0.281436 0.234389 -0.0215051 0.093395 0.154006 0.983646 +-0.00198539 0.0809442 0.282224 -0.0968825 -0.022042 0.995052 +-0.0174847 0.0886516 0.278063 -0.351445 0.0400305 0.935352 +0.0171605 0.0816998 0.281293 -0.0257303 -0.184674 0.982463 +0.0696838 0.250903 -0.244924 0.217643 0.357625 -0.90815 +0.0273376 0.0623482 0.276463 0.0866814 -0.322932 0.942444 +-0.0632754 -0.236946 -0.270422 0.352327 0.480755 -0.802957 +0.00559823 0.0615926 0.280397 0.0446784 -0.18374 0.981959 +-0.0324337 0.0745066 0.271246 -0.538447 0.0208 0.842403 +0.095471 0.0734796 0.279689 0.275443 -0.113198 0.954629 +-0.219046 0.313211 -0.0114728 -0.386284 -0.0899065 0.917988 +-0.197848 -0.303429 -0.275419 -0.380326 -0.266348 -0.88567 +0.0898447 0.0594103 0.277865 0.175591 -0.289515 0.94093 +0.30128 0.3388 -0.0833041 0.788791 -0.0841767 -0.608871 +-0.00889564 0.141022 0.280151 -0.556111 0.293895 0.77741 +-0.0286785 0.117465 0.268222 -0.681315 0.142662 0.717953 +-0.0278642 0.252325 -0.244312 -0.241198 0.324836 -0.914497 +0.0988355 0.100314 0.276197 0.388068 0.246461 0.888065 +0.116485 0.103649 0.26589 0.491786 0.339279 0.801896 +-0.197317 -0.187142 -0.011896 -0.27408 0.752788 0.59849 +0.272159 0.184461 0.0870537 0.946793 0.105921 0.303913 +-0.278483 -0.159131 -0.279701 -0.620497 -0.0997712 -0.777837 +0.228958 -0.0185604 -0.00674278 0.738308 -0.67126 -0.0656574 +-0.0018417 0.272447 -0.241421 -0.106027 0.412199 -0.904904 +0.0523264 -0.498521 -0.100382 0.00971514 -0.999796 -0.0176836 +0.0703833 0.036994 0.268067 -0.0912241 -0.587813 0.803837 +-0.111332 0.078136 -0.210488 -0.476567 -0.330251 -0.81475 +0.0517834 -0.498084 0.00163542 0.0347671 -0.998853 0.0329246 +0.0380318 -0.498673 -0.0105632 -0.00800469 -0.999921 0.00971716 +-0.250411 -0.408245 -0.0158556 -0.825119 -0.467948 0.316548 +0.0458204 -0.498695 -0.0822852 -0.00393933 -0.999926 -0.0115182 +-0.268805 -0.303633 -0.000508347 -0.854032 0.0483082 0.517972 +0.281686 0.0914666 -0.0227657 0.983379 -0.156169 -0.0926069 +-0.0325745 0.096501 0.268582 -0.621415 0.118748 0.77443 +-0.0751454 -0.303365 -0.292004 0.220627 -0.00146613 -0.975357 +0.104481 0.0869196 0.276227 0.394614 0.107111 0.912583 +0.112976 0.0709048 0.272869 0.40219 -0.0761319 0.912386 +-0.148058 -0.257745 -0.291231 -0.0595534 0.152143 -0.986563 +0.104855 0.0531224 0.271954 0.283778 -0.314977 0.905682 +0.197195 0.425819 -0.0978775 -0.279744 0.621758 -0.731546 +-0.0101601 0.0139323 0.259898 -0.050928 -0.568316 0.821233 +-0.156196 -0.272598 -0.29151 -0.137401 0.0188313 -0.990336 +0.0121484 0.169605 0.264076 -0.21858 0.847832 0.483119 +-0.233726 0.327296 -0.0150664 -0.268466 0.113244 0.95661 +0.071218 0.152239 0.263994 0.558326 0.597658 0.575393 +0.322214 0.344831 -0.00441819 0.904789 -0.0235256 0.42521 +0.0735618 0.414328 0.00307866 0.0268636 0.998449 0.0487564 +-0.050982 0.28474 -0.221522 -0.331956 0.483246 -0.81011 +-0.118508 -0.338336 -0.290344 -0.0984418 -0.217069 -0.97118 +-0.133568 -0.495037 -0.0221124 -0.0473912 -0.998813 -0.0112677 +-0.0452257 0.0829728 0.259641 -0.711205 0.129124 0.691024 +-0.0449162 0.0637993 0.261759 -0.654648 -0.00660345 0.755905 +-0.0294375 0.0507757 0.270967 -0.441647 -0.1856 0.877781 +0.0900081 0.0432755 0.271289 0.127287 -0.464032 0.876625 +0.0289495 0.0152443 0.256556 0.079925 -0.39202 0.916478 +-0.0369856 0.030663 0.260454 -0.477527 -0.342985 0.808906 +0.0549873 0.157874 0.273314 0.437811 0.676526 0.592144 +-0.146094 -0.49605 0.0150984 -0.0304027 -0.999454 -0.0129406 +-0.0589705 0.0536394 0.247606 -0.737078 -0.0334326 0.67498 +0.133251 0.0498677 0.258434 0.466486 -0.270808 0.842053 +-0.152246 -0.319976 -0.287777 -0.24792 -0.194927 -0.948967 +0.130421 -0.428311 -0.00921679 0.805943 0.20939 0.553726 +-0.0701063 -0.0762415 0.0102274 -0.523603 -0.846754 -0.0940623 +0.00924817 -0.497775 -0.164104 0.0297389 -0.9973 -0.0671473 +0.115208 0.293219 -0.208145 0.366258 0.500258 -0.7846 +0.154213 -0.178889 0.10045 0.863192 0.273736 0.424225 +-0.204902 0.212816 -0.171586 -0.287057 0.141134 -0.947459 +0.284761 0.171217 -0.00710441 0.998571 0.0312472 -0.0433469 +-0.00663674 -0.36383 -0.249059 0.614418 -0.299848 -0.729782 +-0.0905727 -0.456461 -0.234207 0.165893 -0.522648 -0.836253 +0.129597 0.068791 0.264089 0.486609 -0.0654521 0.871165 +0.0407148 0.0261924 0.257217 0.129876 -0.297095 0.945974 +-0.194582 0.0465062 -0.0719423 -0.789403 -0.611967 -0.0483655 +0.123689 -0.011132 0.224643 0.390722 -0.591596 0.705231 +0.0737875 0.0228021 0.256567 -0.0335262 -0.537205 0.842785 +-0.000877383 -0.375083 -0.238277 0.662692 -0.357117 -0.658261 +-0.0287562 0.0132688 0.255022 -0.316701 -0.519819 0.793403 +-0.120556 0.359792 -8.68261e-005 -0.511621 0.858296 0.0396605 +0.129651 -0.174116 0.134254 0.706007 0.302087 0.640545 +0.148353 0.116254 0.228357 0.497288 0.660273 0.5628 +-0.254488 -0.382768 -0.169316 -0.842424 -0.409712 -0.349939 +0.164731 -0.0662621 0.082489 0.627601 -0.714628 0.308908 +-0.0581945 0.0709443 0.246909 -0.777842 0.119922 0.616913 +0.00715172 -0.498114 -0.0785365 -0.111827 -0.98856 0.101207 +0.117674 0.0399671 0.261888 0.336394 -0.416157 0.84478 +-0.261086 -0.286424 -0.233215 -0.759234 -0.336414 -0.557126 +-0.054248 0.0327647 0.248441 -0.648125 -0.245562 0.720856 +-0.254335 -0.3843 0.00101866 -0.812323 -0.359413 0.459297 +-0.116611 -0.186905 0.000620904 -0.0653904 0.811119 0.581214 +-0.309266 0.240001 -0.0847696 -0.890667 -0.145799 -0.430645 +0.0773923 0.00765613 0.249161 0.173054 -0.389153 0.904772 +0.0429285 0.00402916 0.253091 -0.00956665 -0.288843 0.957329 +-0.000825592 -0.261441 -0.239359 0.711799 0.373339 -0.594946 +0.0226516 0.00234414 0.248735 -0.0696254 -0.482077 0.873358 +0.000962767 0.000989537 0.249418 0.0312329 -0.597641 0.801156 +0.166265 -0.0768174 0.0083644 0.754488 -0.650903 -0.0841019 +-0.285653 -0.245468 -0.0712209 -0.94146 0.274889 0.195162 +-0.181336 0.245144 -0.168954 -0.230932 0.344236 -0.910039 +-0.0460249 0.100532 0.253804 -0.774751 0.214679 0.594705 +-0.1697 -0.44548 -0.22681 -0.475848 -0.466114 -0.745859 +-0.106708 -0.494673 -0.202667 0.0115309 -0.940201 -0.340424 +-0.215213 -0.121669 -0.233144 0.99981 -0.00704172 -0.0181635 +-0.154231 -0.496178 0.0344373 -0.147333 -0.988918 0.0182822 +0.0518958 0.0283027 -0.232204 0.0590805 -0.497107 -0.865675 +-0.16464 -0.496724 -0.0885213 -0.00567984 -0.999584 0.0282853 +0.118538 0.299475 0.197273 0.309131 0.423765 0.851388 +-0.0705893 0.0600515 0.232005 -0.827214 0.116343 0.549711 +-0.0679434 0.0406309 0.235981 -0.76186 -0.104114 0.639319 +-0.0100148 -0.49908 0.0624651 -0.013685 -0.999621 -0.0239071 +-0.136421 0.170339 -0.20861 -0.542273 0.0642987 -0.837738 +0.110563 0.0101075 0.243682 0.210428 -0.536115 0.817496 +0.0948686 0.0174669 0.251796 0.127534 -0.573067 0.809524 +-0.0617689 -0.467893 -0.217255 0.387955 -0.520279 -0.760789 +-0.220539 -0.440806 0.0037125 -0.784367 -0.453831 0.422855 +-0.147781 -0.498023 -0.152926 -0.011142 -0.999919 -0.00611434 +-0.222268 -0.45272 -0.0139173 -0.797385 -0.505285 0.329946 +0.0622069 0.175606 0.240978 0.39361 0.646577 0.65346 +0.0190364 0.179907 0.247692 -0.0981756 0.731936 0.674264 +-0.0274933 0.149969 0.252801 -0.721239 0.533746 0.441508 +0.114196 0.133318 0.240458 0.545436 0.678596 0.491943 +0.140054 0.129537 0.218706 0.477038 0.65393 0.587206 +0.280281 0.158221 0.0664138 0.973796 0.0750506 0.214682 +0.11973 -0.432972 0.00537508 0.753438 0.00723231 0.65748 +0.144704 0.0625072 0.254454 0.549 -0.108356 0.828769 +0.0937268 0.0014467 0.241503 0.200095 -0.451795 0.869393 +0.0897857 0.127296 0.268936 0.48351 0.464324 0.742039 +-0.234688 -0.221369 -0.000189629 -0.556886 0.54552 0.626328 +0.0649671 -0.018637 0.240789 0.200181 -0.48934 0.848807 +-0.21177 0.0699778 -0.0103804 -0.746867 -0.642758 0.170447 +0.163869 -0.177441 0.00880336 0.930062 0.263469 -0.256062 +-0.133498 -0.0275777 -0.00192849 -0.669013 -0.737262 -0.0941647 +-0.191179 0.0445629 0.00158148 -0.840001 -0.531434 0.109432 +0.29068 0.220455 0.0042914 0.954048 -0.298024 0.0312192 +0.315672 0.307628 0.00378021 0.914381 -0.0753736 0.397777 +-0.125848 0.354248 0.0203801 -0.560967 0.8176 0.129793 +0.181227 0.26577 -0.182617 0.584192 0.375224 -0.719671 +0.193193 -0.0483996 0.0634715 0.651147 -0.741034 0.163942 +-0.0552532 0.00452152 0.232171 -0.560057 -0.479007 0.675935 +-0.0460655 0.014923 0.246217 -0.522281 -0.435226 0.733349 +-0.0371264 -0.000710344 0.240735 -0.365805 -0.598337 0.712867 +-0.0371896 0.0708221 -0.241271 -0.272225 -0.378429 -0.884695 +0.0769019 -0.0290875 0.231533 0.226547 -0.600949 0.76651 +0.0483605 -0.0148519 0.245787 0.00823668 -0.490213 0.871564 +0.056344 -0.0306185 0.234616 0.0603291 -0.629497 0.774657 +0.266884 0.372752 0.00154932 -0.0939212 0.107264 0.989784 +0.0232521 -0.0239992 0.234297 -0.217438 -0.565971 0.795234 +0.111946 0.127747 -0.249871 0.372776 -0.0715434 -0.925159 +-0.0570702 -0.0208962 0.207572 -0.477782 -0.643278 0.598263 +0.0221265 0.19385 0.238212 0.00448801 0.366324 0.930476 +-0.242235 -0.196276 -0.0378064 -0.601028 0.670743 0.434591 +-0.0110862 0.196148 0.233716 -0.227898 0.16451 0.959687 +-0.0846863 -0.362334 -0.283515 0.120722 -0.295284 -0.947752 +-0.0154612 0.163622 0.247109 -0.551294 0.651762 0.520847 +0.0774494 0.180729 0.22813 0.487006 0.311157 0.816092 +0.00534288 -0.467493 0.153786 0.376925 -0.0450676 0.925147 +-0.0449465 0.135434 0.233866 -0.817374 0.34908 0.458305 +0.155623 0.103701 0.235181 0.554078 0.510481 0.657576 +0.267884 0.127546 -0.0970199 0.929782 -0.0449837 -0.365352 +0.168672 0.0720245 0.236904 0.626776 0.0394613 0.7782 +0.14775 0.0283087 0.23949 0.489031 -0.44337 0.75118 +0.276129 0.474034 0.00536837 0.272985 0.143793 0.951211 +0.30007 0.379443 0.00423604 0.0388958 0.144321 0.988766 +0.0133566 -0.0106841 0.239991 -0.115794 -0.543151 0.831612 +0.000259148 0.404504 -0.0576676 -0.189212 0.963807 -0.187817 +0.269733 0.146134 -0.0932639 0.943028 -0.00175796 -0.33271 +-0.00480989 -0.0127836 0.238723 -0.0788936 -0.640478 0.763913 +0.279395 0.404698 0.00034901 -0.0362167 0.00869697 0.999306 +0.0427724 0.249724 0.228868 0.0656726 0.199765 0.977641 +-0.0119424 0.23504 0.229447 -0.157162 0.163021 0.974025 +0.00100523 0.245776 0.228995 -0.09828 0.216443 0.971336 +0.0521519 0.234349 0.230434 0.127334 0.115705 0.985088 +0.323447 0.361702 -0.0398561 0.979524 -0.0383157 -0.19765 +0.00635684 0.207596 0.234493 -0.0894775 0.163279 0.982514 +0.0747102 0.201937 0.227121 0.336164 0.0516131 0.940388 +0.233525 -0.00874049 -0.0335808 0.757134 -0.634974 -0.153483 +0.221997 -0.0182716 -0.0460013 0.716587 -0.670649 -0.191657 +0.131258 0.417415 0.0081932 -0.327288 0.928061 0.177724 +0.0720758 -0.451908 0.0550947 0.825946 -0.124505 0.549829 +-0.0736707 -0.0716399 -0.00735656 -0.520335 -0.843909 -0.130648 +0.0892957 0.164052 0.229091 0.595612 0.500093 0.628612 +-0.203702 -0.404746 -0.225403 -0.618219 -0.42996 -0.657982 +-0.240362 -0.417145 -0.00500179 -0.788304 -0.477961 0.387467 +-0.0628838 0.0947114 0.229396 -0.863154 0.281694 0.419062 +0.100206 0.346827 -0.170683 0.289763 0.692867 -0.660282 +-0.0721647 0.0111965 0.220449 -0.676788 -0.359386 0.642495 +-0.0217233 -0.013014 0.234918 -0.217034 -0.67802 0.702272 +0.129894 0.203749 -0.237868 0.412994 0.188754 -0.890959 +-0.242678 0.116919 -0.0995023 -0.79583 -0.57561 -0.187955 +0.0123446 0.259476 0.226311 -0.0596034 0.270152 0.960971 +0.266097 0.49174 0.00242032 0.174137 0.678714 0.713459 +0.0815505 0.2395 0.224115 0.259398 0.0758953 0.962784 +-0.164174 -0.497322 -0.158659 -0.094332 -0.99324 -0.0676444 +-0.0690082 -0.0389518 -0.125209 -0.390927 -0.811146 -0.434992 +-0.0334666 -0.354731 -0.269687 0.44658 -0.249876 -0.859144 +-0.212711 -0.236719 0.0259874 -0.382942 0.501186 0.775995 +0.12259 0.140551 -0.246054 0.399285 -0.0356171 -0.916135 +-0.195879 0.0941335 0.0745503 -0.9219 -0.247758 0.297852 +0.171477 0.0913721 0.230463 0.593778 0.317938 0.73915 +0.28583 0.201202 0.00590791 0.989576 -0.14289 0.0179207 +0.284701 0.195744 0.0256548 0.99553 -0.0559824 0.0760635 +0.0921961 -0.03298 0.221783 0.315596 -0.699483 0.641188 +-0.19757 0.231141 0.0355623 -0.960727 0.247071 0.126328 +0.00743555 0.40301 0.0708723 -0.143424 0.962398 0.230692 +0.0831364 0.275029 0.217128 0.188492 0.291606 0.937783 +0.030459 0.264359 0.225583 0.00022481 0.292012 0.956415 +-0.107542 0.00863553 -0.165207 -0.359754 -0.684461 -0.634106 +0.0963126 -0.272946 -0.0942 0.647799 0.0245053 -0.761417 +0.0699765 0.227071 0.227794 0.23438 0.0606265 0.970253 +-0.0375789 0.173129 0.226703 -0.506534 0.0826553 0.858249 +-0.224374 -0.443473 -0.164346 -0.806494 -0.453761 -0.379036 +0.0899127 0.410827 0.0352016 0.0759998 0.987006 0.141575 +-0.104737 0.29265 -0.18516 -0.502382 0.540737 -0.674697 +0.315704 0.296124 -0.0114773 0.974336 -0.219898 0.0481174 +0.156528 -0.155235 0.0753228 0.924026 0.281532 0.258681 +0.176955 0.0376343 0.221934 0.616363 -0.331553 0.714261 +0.172444 0.0173604 0.213979 0.572843 -0.485195 0.660634 +0.299108 0.255642 0.0249226 0.887522 -0.141547 0.438486 +-0.0131785 0.407018 -0.00141679 -0.22996 0.973135 0.0112515 +-0.0414833 -0.0255945 0.212991 -0.361134 -0.69433 0.622485 +0.105977 -0.0358363 0.20952 0.368893 -0.751638 0.546771 +-0.0305623 0.402171 0.00410177 -0.292176 0.956154 0.0200494 +0.0509055 -0.0513813 0.209721 0.0521126 -0.845764 0.531006 +0.0382822 0.294313 0.213776 0.00905402 0.437567 0.89914 +0.072751 0.289751 0.213204 0.132045 0.394127 0.909521 +0.134196 -0.318977 -0.0403878 0.852285 -0.333044 -0.403352 +-0.215049 -0.482204 -0.08223 -0.696836 -0.717132 0.0118405 +-0.0371994 0.276325 0.211908 -0.270387 0.367762 0.889743 +0.0808025 0.258005 0.221498 0.208643 0.185929 0.960155 +-0.0479106 0.227294 0.221508 -0.336175 0.0954716 0.936948 +0.271711 0.0653285 -0.0512982 0.935813 -0.29235 -0.196941 +-0.0634739 0.107648 0.216921 -0.820996 0.257279 0.509679 +-0.0467305 0.119383 0.243612 -0.831331 0.297807 0.469254 +0.0873076 0.216826 0.222539 0.35582 -0.0230848 0.934269 +-0.0590134 0.0943439 -0.242171 -0.345828 -0.257792 -0.90219 +0.131321 -0.344461 0.00946143 0.891557 -0.448657 0.0619107 +-0.0854884 0.222512 -0.229977 -0.452211 0.213969 -0.865865 +-0.277686 -0.290192 -0.199371 -0.893655 -0.288556 -0.343679 +0.142508 -0.00358981 0.21972 0.456225 -0.582452 0.672762 +0.015751 -0.047366 0.211146 -0.178511 -0.77787 0.602538 +-0.0497216 -0.365606 -0.273324 0.348927 -0.31009 -0.884361 +0.129895 0.123684 -0.241448 0.424279 -0.0881254 -0.901233 +-0.0490313 0.244983 0.21819 -0.325396 0.210371 0.921879 +-0.0144409 -0.0811025 -0.0804516 -0.250158 -0.887601 -0.386763 +0.103183 0.163098 0.216876 0.533202 0.371302 0.760152 +-0.0512708 0.160848 0.217888 -0.614712 -0.0162097 0.788585 +0.106404 0.147704 0.227683 0.557437 0.623033 0.548719 +-0.138995 -0.497062 -0.119021 0.0280531 -0.999208 0.0282223 +-0.0602731 0.12348 0.212954 -0.739265 0.252648 0.624224 +-0.241848 -0.206059 -0.0236276 -0.595985 0.629999 0.497899 +0.169095 -0.184859 0.0264332 0.96156 0.251019 -0.111318 +-0.0985354 0.0303917 0.194372 -0.79858 0.00630947 0.601856 +-0.077197 0.0282186 0.221698 -0.762845 -0.163336 0.625611 +-0.126921 -0.0357804 0.0178278 -0.660664 -0.748539 -0.0566688 +-0.0891709 -0.154158 -0.083813 0.143996 0.984011 0.104821 +0.0795056 -0.0424948 0.21565 0.242294 -0.791745 0.560743 +0.0336596 -0.0490961 0.213185 -0.0728965 -0.810841 0.580709 +-0.0721722 0.125839 -0.243534 -0.388106 -0.11705 -0.914152 +-0.0754418 0.191089 -0.240577 -0.403611 0.123944 -0.906496 +-0.0500997 0.264311 0.212157 -0.322629 0.310326 0.894208 +0.118364 0.272583 0.207555 0.343746 0.233271 0.909628 +-0.229141 0.136577 0.0170002 -0.408393 0.307745 0.859365 +-0.0645815 0.234074 0.213811 -0.410664 0.127727 0.902796 +-0.0808139 0.223545 0.206736 -0.472636 0.0491216 0.879888 +-0.232396 0.153759 0.0077317 -0.290223 0.424667 0.857571 +0.27719 0.354226 0.00587037 -0.148202 0.209299 0.966556 +-0.0661218 0.168412 0.207906 -0.56975 -0.167422 0.804584 +0.284775 0.370499 0.00420385 -0.116861 0.153671 0.981187 +-0.133033 0.104874 0.151655 -0.450409 -0.0491812 0.891467 +0.0606629 0.0830816 0.285562 0.004607 -0.153949 0.988068 +0.183353 0.107603 0.211347 0.448593 0.52395 0.724045 +-0.0763104 0.100446 0.201554 -0.846206 0.096008 0.524136 +0.257189 0.354868 0.00241999 -0.074753 0.184427 0.979999 +0.296623 0.356002 0.00833153 -0.00622194 0.19894 0.979992 +0.211119 0.0744112 0.200203 0.702564 -0.059823 0.709101 +0.192106 0.0442381 0.21124 0.664052 -0.291169 0.688662 +-0.0649802 -0.00466575 0.216393 -0.583137 -0.519401 0.624639 +-0.0687532 0.176057 -0.245287 -0.378276 0.0818991 -0.922063 +0.129492 0.0180157 0.243111 0.353944 -0.52895 0.771321 +0.0933872 -0.0457937 0.202581 0.308294 -0.816106 0.488801 +0.265958 0.458777 0.00676423 0.187905 -0.0958288 0.977501 +0.207036 0.413727 -0.10933 -0.131078 0.522927 -0.842239 +0.045714 0.306103 0.207392 0.0348916 0.500339 0.865126 +0.106605 -0.0221619 0.224778 0.360922 -0.619218 0.697355 +0.0915273 0.288086 0.210375 0.205911 0.372641 0.904842 +0.254432 0.168483 0.134854 0.852788 0.112973 0.509892 +-0.0800357 0.260861 0.200087 -0.463392 0.285328 0.838961 +0.124045 0.137209 0.223526 0.506929 0.651637 0.564263 +-0.234668 -0.409368 0.0124195 -0.748078 -0.428129 0.507035 +-0.0385829 0.208573 0.225636 -0.312075 0.0305818 0.949565 +0.130304 0.182508 0.201247 0.374436 0.104049 0.921397 +-0.0979311 -0.0591852 0.0201934 -0.584393 -0.808631 -0.0678308 +-0.044406 0.253612 -0.238889 -0.310881 0.323809 -0.893589 +-0.0564248 0.237093 -0.239505 -0.359442 0.258526 -0.896641 +0.179466 0.132963 0.19053 0.34647 0.444779 0.825912 +0.111346 0.242236 0.214238 0.357609 0.0128267 0.933783 +0.099319 0.230011 0.218471 0.35092 -0.0295253 0.93594 +0.239274 -0.00736476 0.00376447 0.775801 -0.630156 -0.0321853 +-0.0754562 0.115089 0.203822 -0.794161 0.207056 0.571345 +0.0237143 -0.0374494 0.224161 -0.17749 -0.672547 0.718455 +0.195259 0.0754563 0.214478 0.643429 0.0302607 0.764907 +0.201551 0.0607234 0.207301 0.687008 -0.165466 0.70756 +-0.0834841 0.0558741 0.211249 -0.854893 0.215878 0.471758 +-0.0643355 0.269233 0.204863 -0.383048 0.336187 0.86038 +-0.0474499 -0.0356879 0.197431 -0.393399 -0.726905 0.562891 +0.06135 0.332602 0.187613 0.0549211 0.644375 0.762735 +0.0161745 0.319773 0.197707 -0.075126 0.589709 0.804114 +-0.0137848 0.305447 0.20262 -0.182653 0.521631 0.83339 +0.0733307 0.268248 -0.236595 0.233268 0.41743 -0.878258 +-0.127955 0.108955 -0.209957 -0.531812 -0.175751 -0.828425 +-0.0659522 0.295832 0.190186 -0.394926 0.48793 0.778433 +-0.0772834 0.0832018 0.2049 -0.868569 0.223659 0.442226 +0.133547 0.26065 0.203841 0.397741 0.128075 0.908515 +-0.0966431 0.00970235 0.191897 -0.73394 -0.291464 0.613499 +0.100274 0.301505 0.202097 0.230864 0.449996 0.862673 +0.269126 0.32804 0.0129876 -0.124162 0.359771 0.924742 +-0.107542 0.180886 0.185431 -0.509418 -0.293563 0.808897 +0.0152016 -0.495489 -0.0420591 -0.559725 -0.821443 0.109268 +-0.0868019 -0.00680214 0.192825 -0.64865 -0.473812 0.595613 +0.22182 0.115753 0.18278 0.596222 0.270085 0.756024 +-0.0948136 0.0505413 0.193509 -0.82109 0.297939 0.486871 +0.185499 0.0273876 0.20848 0.637644 -0.419472 0.646106 +0.181796 0.0102065 0.199229 0.610236 -0.539835 0.579819 +-0.132668 0.125843 -0.209705 -0.547071 -0.116927 -0.82888 +0.109058 -0.0464781 0.189827 0.351866 -0.815655 0.459236 +0.0341723 0.319281 0.19917 -0.00844678 0.582964 0.812454 +0.10867 0.285357 0.207067 0.284736 0.342531 0.89532 +0.188433 0.400781 0.0255219 0.471337 -0.0771609 0.878571 +0.158497 0.251031 0.194819 0.410258 0.0464684 0.910785 +0.143072 0.248178 0.200176 0.392541 0.00662342 0.919711 +0.142754 0.211965 0.195061 0.416565 -0.108091 0.902657 +-0.143391 0.217812 0.164855 -0.654561 0.0923838 0.750343 +0.0326266 0.0379575 -0.237942 -0.021775 -0.482369 -0.875698 +-0.0780482 0.182631 0.204007 -0.510554 -0.206102 0.834779 +-0.0796279 0.164402 0.197187 -0.58842 -0.26845 0.76269 +0.150113 0.178974 0.193089 0.373547 0.159721 0.913757 +0.234536 0.104274 0.173953 0.741076 0.101644 0.663683 +0.151137 0.15897 0.197439 0.353307 0.202095 0.913418 +0.238384 0.476336 0.0131747 0.0264278 0.373134 0.927401 +0.150036 -0.0372912 0.169135 0.474244 -0.765002 0.435735 +-0.148343 -0.495833 -0.00639435 0.00647433 -0.999946 -0.00810157 +0.199365 0.0338025 0.198213 0.687645 -0.387722 0.613854 +0.0792665 -0.466359 0.0421106 0.777514 -0.20742 0.593674 +-0.0820443 -0.0701455 0.0242982 -0.53361 -0.844098 -0.0525283 +0.066451 -0.0509275 0.207374 0.161365 -0.85158 0.498772 +0.0631149 0.40022 -0.0938933 0.0548789 0.950647 -0.305381 +-0.160699 -0.431826 -0.239847 -0.386316 -0.46219 -0.798211 +0.286621 0.21066 0.023799 0.973154 -0.202974 0.108503 +-0.0590287 0.311592 0.182752 -0.363159 0.567119 0.739251 +-0.0908123 0.271282 0.189276 -0.505395 0.355766 0.786133 +-0.0682853 0.221616 -0.238488 -0.399094 0.204677 -0.893774 +-0.160627 0.197786 0.150139 -0.706976 0.0485266 0.70557 +0.202772 0.470157 0.00331987 -0.527109 0.785097 0.325237 +0.0232318 -0.320875 0.148896 -0.0391096 -0.475661 0.878759 +-0.0673755 -0.496912 0.0348613 0.0358206 -0.986938 -0.157069 +0.149704 0.230974 0.196168 0.377466 -0.145797 0.914474 +0.223719 0.165237 0.164911 0.421181 0.18015 0.888905 +0.00785924 -0.295268 -0.242527 0.755103 0.160866 -0.635564 +-0.149845 -0.220369 0.0273222 -0.055348 0.572601 0.817964 +-0.0671208 -0.054212 0.150202 -0.453528 -0.797205 0.398467 +0.0538287 -0.150042 0.157784 -0.104462 0.408315 0.906844 +-0.0764727 0.145083 0.192731 -0.700054 -0.145075 0.699198 +0.196726 0.134192 0.185613 0.293624 0.421233 0.858107 +-0.077564 0.124033 0.189183 -0.757894 0.124807 0.640328 +0.291806 0.385536 -0.0915922 0.648592 0.146695 -0.746866 +-0.158816 -0.234441 0.03643 -0.0449442 0.518445 0.853929 +0.166783 -0.00134073 0.202187 0.542653 -0.60061 0.587193 +0.0471171 0.357531 0.163566 0.00233928 0.757953 0.652305 +0.023768 0.333331 0.187318 -0.049371 0.661675 0.748164 +0.0730714 0.319631 0.196351 0.108175 0.569679 0.814717 +0.0927612 0.315351 0.19571 0.19115 0.539159 0.820225 +-0.0418521 0.316039 0.186758 -0.293721 0.589521 0.752458 +0.319935 0.376125 -0.0531852 0.940476 0.00646088 -0.3398 +-0.109425 0.244159 0.186099 -0.558478 0.203634 0.804137 +0.0795071 -0.131974 0.147763 0.2355 0.405202 0.883375 +0.15519 0.19736 0.188758 0.420269 0.0275212 0.906982 +0.167375 0.18511 0.185011 0.425464 0.173124 0.888262 +0.1804 0.172025 0.181657 0.466073 0.200464 0.861737 +-0.123112 -0.0399317 0.0364869 -0.65804 -0.75292 -0.00978299 +0.228568 -0.019684 0.0145235 0.73631 -0.676642 -0.00150929 +0.00984426 -0.337041 0.13909 -0.0983729 -0.48439 0.869304 +-0.160524 0.000182052 0.0310137 -0.808023 -0.586767 0.0529559 +0.0190345 -0.28972 -0.225114 0.855397 0.210723 -0.473172 +-0.0899531 0.069237 0.184152 -0.802572 0.205579 0.560014 +0.211587 0.0314837 0.181389 0.731728 -0.414109 0.541376 +0.133546 0.332939 0.166619 0.376505 0.650699 0.65942 +-0.0442391 -0.204448 -0.229628 0.488336 0.671992 -0.556737 +0.0722391 -0.308654 0.147729 0.288846 -0.56288 0.774425 +0.0772194 0.336675 0.182546 0.113783 0.657029 0.745229 +0.0881908 0.327308 0.18817 0.168789 0.606976 0.776589 +-0.121564 0.344077 -0.0925125 -0.462579 0.83293 -0.303724 +-0.105636 0.262876 0.182617 -0.554309 0.310844 0.772087 +0.167142 0.265083 0.187421 0.473562 0.205816 0.856375 +-0.0300911 -0.281617 0.136227 -0.666923 -0.0417645 0.743955 +0.283814 0.0958877 -4.56106e-005 0.988612 -0.144501 -0.0420122 +-0.128757 0.142287 -0.214012 -0.538099 -0.0513321 -0.841317 +-0.107266 0.223496 0.191185 -0.541269 0.0604236 0.838676 +0.281384 0.0801032 0.00593653 0.97781 -0.208267 -0.0226152 +0.285931 0.110425 0.0119725 0.996134 -0.0871878 -0.0107274 +0.252096 0.0653795 0.136213 0.873691 -0.269556 0.404974 +0.285837 0.139307 0.0381497 0.996221 0.030109 0.0814672 +0.286247 0.150044 -0.000705009 0.998686 0.0410013 -0.0307357 +-0.0876822 0.138441 0.181141 -0.642846 -0.0715064 0.76265 +0.202284 0.14565 0.179187 0.333055 0.334856 0.881445 +0.207195 0.121316 0.189393 0.419161 0.441124 0.793545 +0.285588 0.162942 0.0116112 0.99873 0.0499026 0.00695993 +-0.0821154 0.358152 0.107546 -0.496181 0.776113 0.389169 +-0.18653 0.275962 0.0175312 -0.920435 0.275188 0.277616 +-0.225565 -0.404497 0.0270904 -0.688816 -0.363088 0.627455 +0.00169514 0.383431 0.119588 -0.133083 0.873465 0.468346 +-0.211383 -0.262467 0.0401475 -0.380925 0.34384 0.858295 +0.266656 0.323838 -0.113014 0.552708 -0.0714479 -0.830307 +-0.0484245 -0.216504 -0.245892 0.458419 0.614324 -0.642229 +-0.155932 0.0616327 0.127019 -0.747669 -0.105353 0.655662 +0.060017 -0.060342 0.191113 0.125293 -0.89719 0.423499 +-0.206642 -0.149842 -0.228953 0.676887 0.722889 -0.138765 +-0.12539 -0.48523 0.106222 -0.108483 -0.611115 0.784072 +0.236126 0.245033 0.13501 0.784954 0.325557 0.527124 +-0.0103998 0.331556 0.183914 -0.177649 0.656012 0.733546 +-0.0513676 0.328222 0.172184 -0.328927 0.647862 0.687082 +0.0618566 0.39261 0.107642 0.0406968 0.906164 0.420964 +-0.182439 0.104457 0.108434 -0.801926 -0.200013 0.562947 +0.167335 -0.0469345 0.126764 0.54085 -0.776831 0.322514 +-0.0647511 -0.0746823 0.0910163 -0.454802 -0.868221 0.198363 +0.175501 0.224279 0.183574 0.374177 -0.137899 0.917047 +-0.0429971 -0.25014 0.120471 -0.76157 0.14629 0.631356 +0.173245 0.203737 0.180084 0.390117 -0.0907809 0.916279 +0.184358 0.190176 0.174624 0.375906 0.0731088 0.923769 +-0.113004 0.14129 -0.223735 -0.513119 -0.0449522 -0.857139 +0.103389 0.0929218 -0.247659 0.317138 -0.222223 -0.921976 +0.19659 -0.0298519 0.112713 0.619923 -0.728656 0.291128 +0.0730769 0.397156 0.0960547 0.0798435 0.922343 0.378031 +-0.134043 -0.496627 0.0338585 -0.0146982 -0.999813 -0.0125686 +0.0751842 0.233888 -0.249989 0.237473 0.301348 -0.923469 +0.205801 0.0890039 0.20438 0.627976 0.161372 0.761318 +0.216274 0.0615552 0.191967 0.7464 -0.211164 0.631108 +0.188464 -0.00551974 0.172758 0.617518 -0.634824 0.464402 +-0.187732 0.0786296 0.0847566 -0.891061 -0.291695 0.347742 +0.162221 -0.0268314 0.173169 0.519531 -0.733939 0.437517 +0.190991 -0.0273621 0.129755 0.605804 -0.725555 0.326455 +0.0946486 -0.062263 0.169257 0.260375 -0.869632 0.419458 +0.170165 -0.0511305 0.11068 0.554783 -0.77563 0.301021 +0.0752603 0.303691 -0.216297 0.230753 0.54019 -0.809288 +0.151229 0.300131 0.181926 0.44998 0.445865 0.773772 +-0.0412495 -0.497206 -0.152933 -0.00300136 -0.999897 0.0140083 +-0.253245 0.0876559 -0.16102 -0.995398 0.0634318 -0.0718239 +0.0238765 0.393776 0.103568 -0.0769775 0.914098 0.39812 +-0.0287596 -0.498243 0.049671 -0.0257061 -0.999006 -0.03643 +0.190342 0.237692 0.179403 0.473899 0.0254124 0.880213 +-0.0111958 -0.498523 0.0411049 -0.024003 -0.99913 -0.0340912 +0.187428 0.218228 0.178652 0.394982 -0.154338 0.905632 +-0.166515 -0.487661 -0.194909 -0.390511 -0.773089 -0.499834 +-0.118608 -0.0178899 -0.105074 -0.568661 -0.786078 -0.242296 +-0.244569 0.0807216 -0.132937 -0.821121 -0.249507 0.513328 +0.215806 0.132324 0.179325 0.435666 0.35055 0.829042 +-0.167396 0.287676 0.0742446 -0.833272 0.485607 0.264281 +-0.248548 -0.356096 -0.205753 -0.779609 -0.383678 -0.494976 +0.227357 0.077217 0.182434 0.776167 -0.107688 0.621263 +0.0997798 -0.427125 0.0277826 0.741258 -0.176228 0.647672 +0.194923 0.342201 0.064439 0.720561 0.648327 0.245895 +-0.10248 0.0575018 0.175647 -0.709633 0.299233 0.637871 +0.172897 -0.197846 0.0389113 0.976292 0.215605 -0.0191998 +-0.146753 -0.0142214 0.0593403 -0.778309 -0.619187 0.104129 +-0.20495 -0.0416225 -0.23386 0.677038 0.110023 -0.727677 +-0.136759 -0.0272192 0.0332875 -0.701448 -0.712706 -0.00450482 +0.059883 -0.0724809 0.162568 0.118122 -0.854615 0.505648 +-0.00743668 -0.0657615 0.171758 -0.181306 -0.885773 0.42724 +0.0512375 -0.18043 0.16878 -0.117661 0.27256 0.954917 +0.0482792 -0.199573 0.172847 -0.132981 0.168593 0.976674 +-0.078822 -0.0698775 0.0760701 -0.506476 -0.852196 0.131319 +0.0633882 -0.212832 0.175202 0.0412802 0.0816575 0.995805 +-0.00133174 -0.0722191 -0.106454 -0.170568 -0.882246 -0.438804 +0.0789097 -0.243202 0.173226 0.186561 -0.11821 0.975306 +0.0978087 -0.235891 0.16862 0.347286 -0.0685325 0.935252 +-0.0272395 -0.152246 0.0334981 -0.926217 0.37699 -0.00109411 +0.00106965 0.408774 -0.0338774 -0.178949 0.978313 -0.104313 +0.0962077 0.339581 0.175665 0.199747 0.663898 0.720653 +-0.0273754 0.326753 0.183326 -0.244566 0.639568 0.728794 +0.107268 0.326035 0.184136 0.239921 0.602929 0.760864 +-0.100316 0.281855 0.17741 -0.536027 0.424654 0.729619 +0.100148 0.0735503 -0.243018 0.291003 -0.305251 -0.906719 +0.0591628 -0.472986 0.0735976 0.875653 -0.230621 0.424319 +0.194742 0.206013 0.172524 0.354681 -0.084811 0.931133 +0.133832 0.087664 -0.233632 0.431127 -0.223994 -0.874046 +0.20708 0.194203 0.168866 0.336292 0.0145153 0.941646 +0.21723 0.209872 0.164347 0.482748 0.0519332 0.874218 +-0.27469 -0.304161 -0.195736 -0.885237 -0.294167 -0.360307 +0.0930014 -0.399664 0.047592 0.764086 -0.313286 0.563937 +-0.0550951 0.0764473 -0.237568 -0.328936 -0.348207 -0.877812 +-0.044097 0.0872945 -0.245341 -0.2952 -0.292659 -0.90951 +-0.203489 0.11263 0.0629422 -0.951116 -0.154743 0.26727 +0.236348 0.0700879 0.167877 0.824826 -0.208046 0.525718 +0.207733 0.0468636 0.195957 0.721828 -0.302565 0.62243 +0.056259 0.1181 0.288654 0.331244 0.0292771 0.943091 +0.155981 -0.299299 0.0532445 0.84581 -0.514547 0.140877 +-0.119191 0.0138047 0.165205 -0.77997 -0.228974 0.582424 +0.162734 -0.0164127 0.188969 0.525069 -0.681411 0.509883 +0.0694776 -0.175353 0.167724 0.0961667 0.29318 0.951209 +0.0637787 -0.193491 0.172532 0.0374627 0.188417 0.981374 +-0.211589 -0.432767 -0.195671 -0.710023 -0.449658 -0.541918 +-0.289723 -0.245071 -0.207059 -0.922275 -0.293873 -0.251091 +0.0295419 -0.224188 0.171486 -0.303841 0.0687755 0.950237 +0.145403 0.120281 -0.233355 0.470976 -0.104028 -0.875991 +-0.283574 -0.278775 -0.192585 -0.918557 -0.271175 -0.287607 +0.0327699 0.40922 0.0519929 -0.0680256 0.98528 0.15683 +0.0417074 -0.256437 0.173092 -0.0914886 -0.147056 0.984888 +0.0683844 0.360024 0.159357 0.0724164 0.768324 0.635952 +0.0329613 0.346771 0.174891 -0.0285635 0.715133 0.698405 +0.0147604 0.406893 0.0551511 -0.121959 0.979687 0.159185 +-0.093671 0.298918 0.170928 -0.511531 0.515047 0.687795 +-0.135309 0.249971 0.164052 -0.658371 0.277111 0.699826 +0.196014 0.251559 0.17342 0.576635 0.19281 0.793925 +-0.0463292 -0.497298 0.0367737 -0.0446986 -0.980864 -0.189494 +-0.299806 -0.2135 -0.201461 -0.976319 -0.212644 -0.0397974 +0.288537 0.243026 0.0407597 0.841485 -0.0112898 0.540162 +0.236791 -0.00891816 0.0466209 0.759712 -0.644775 0.0842768 +-0.136159 0.188637 0.169346 -0.55225 -0.151341 0.819827 +-0.0487807 0.394424 0.0314825 -0.353581 0.930957 0.0910996 +0.219519 0.147056 0.171727 0.414689 0.281717 0.865256 +-0.101122 0.143111 0.169618 -0.601224 -0.145331 0.785753 +-0.0949763 0.122947 0.177801 -0.613228 0.0765649 0.786186 +-0.223285 -0.274797 0.0384607 -0.483723 0.262028 0.835077 +0.17678 -0.218616 0.0341698 0.99297 0.107654 -0.0492019 +0.027073 -0.498258 0.027914 0.0190172 -0.999818 -0.00134788 +-0.285369 -0.0748006 -0.204571 -0.890147 0.43077 0.148575 +0.16797 -0.178106 0.042907 0.962344 0.27102 0.0210085 +0.0439531 -0.163999 0.162056 -0.204657 0.352944 0.912987 +0.0237211 -0.163459 0.154698 -0.418975 0.349003 0.838246 +0.0344531 -0.17555 0.163662 -0.303788 0.299135 0.904561 +0.0886693 -0.45682 0.032462 0.735575 -0.132548 0.664349 +-0.173628 -0.395112 -0.253755 -0.45333 -0.407787 -0.792592 +0.098463 -0.215669 0.168114 0.360569 0.0770766 0.929542 +0.112005 -0.22574 0.162259 0.488633 0.0204788 0.872249 +-0.184313 0.265397 0.0519379 -0.911317 0.36459 0.191247 +0.0239264 -0.253963 0.16999 -0.276544 -0.0718463 0.958312 +0.254277 0.013815 0.0332908 0.845698 -0.53239 0.0368191 +-0.181862 0.279152 0.0369375 -0.900299 0.389898 0.193496 +0.0534693 -0.270538 0.170318 0.0467087 -0.267976 0.962293 +0.0259819 -0.291461 0.16292 -0.145395 -0.326387 0.933987 +-0.0233001 0.341117 0.170739 -0.227874 0.697323 0.679569 +0.200612 -0.0469742 0.027475 0.662688 -0.747456 0.0464141 +-0.0585342 0.337736 0.158644 -0.3695 0.692813 0.619257 +0.173644 0.307501 0.160648 0.550276 0.536492 0.639823 +0.2297 0.460656 0.016665 0.208884 0.0456148 0.976876 +0.288005 0.320668 0.0179965 0.00523518 0.33844 0.940973 +-0.0733367 0.379924 0.0589368 -0.439916 0.880888 0.17467 +-0.152343 0.183166 0.157142 -0.597973 -0.0927428 0.796132 +-0.285555 -0.344852 -0.0888009 -0.967315 -0.250618 -0.0386392 +-0.0852074 0.153089 -0.239161 -0.431311 0.00191377 -0.902201 +-0.0416646 0.394519 0.0514406 -0.327883 0.933618 0.144394 +0.0691295 -0.189509 -0.0801998 0.24417 0.492367 -0.835437 +-0.0762346 0.383394 0.0178992 -0.441778 0.895357 0.056285 +-0.19245 -0.452684 0.0469684 -0.86138 -0.184894 0.473117 +-0.11218 -0.0480371 0.0187353 -0.622207 -0.78025 -0.0637837 +0.232143 0.0379972 0.153536 0.806996 -0.401917 0.432689 +-0.166775 -0.49456 0.0217835 -0.320831 -0.94503 0.0631368 +-0.103199 -0.0267771 0.151656 -0.636817 -0.635381 0.436754 +0.141616 0.171857 -0.236896 0.448942 0.0633462 -0.891313 +0.250317 0.458028 0.0101065 0.231109 -0.106294 0.967104 +0.0887734 -0.176023 0.163732 0.307584 0.294373 0.904841 +0.0181087 -0.179756 0.157591 -0.473568 0.278132 0.835689 +0.0147798 -0.19933 0.161364 -0.477099 0.203623 0.854935 +0.123927 -0.213688 0.153285 0.626404 0.119546 0.770277 +0.0174603 -0.23625 0.167701 -0.38062 0.0392723 0.923897 +0.00486651 -0.250305 0.16221 -0.461295 0.000735794 0.887247 +0.11207 -0.247471 0.160416 0.489092 -0.175268 0.854442 +0.0136011 -0.270716 0.164905 -0.33529 -0.144657 0.930943 +0.064948 -0.282396 0.164794 0.171227 -0.387475 0.905839 +0.0442425 -0.290841 0.1636 0.0431542 -0.381907 0.923192 +-0.0476958 0.396307 -0.000673977 -0.353947 0.935264 -0.00133495 +0.0831664 0.350845 0.167728 0.13112 0.722278 0.67906 +-0.178017 -0.260876 0.0490423 -0.109251 0.387246 0.915481 +-0.0195587 0.352332 0.159812 -0.210947 0.746096 0.63154 +-0.0679195 0.321426 0.169595 -0.408279 0.617373 0.672427 +0.295096 0.24049 0.0251976 0.931086 -0.246655 0.268775 +0.0430824 0.279628 -0.237137 0.126723 0.450695 -0.883638 +0.152746 -0.308997 0.0124033 0.863975 -0.500885 -0.0515857 +-0.0390565 -0.0976648 0.052579 -0.698694 -0.708201 0.101382 +0.220759 0.224846 0.160219 0.600395 0.147577 0.785969 +0.226288 0.197164 0.159344 0.539418 0.0974925 0.836375 +-0.0834783 0.174538 -0.238914 -0.422149 0.076943 -0.903255 +0.23191 0.137495 0.167848 0.598048 0.223573 0.769645 +-0.13848 0.173626 0.16428 -0.484336 -0.250418 0.838278 +-0.231525 -0.434516 -0.01015 -0.79154 -0.496561 0.356218 +0.135272 0.0402369 -0.214815 0.411401 -0.414388 -0.811808 +-0.0405299 0.383671 -0.0944505 -0.353023 0.891898 -0.282653 +0.318082 0.430538 -0.00887002 0.785345 0.162858 0.597252 +-0.0770258 0.383438 0.00241809 -0.435766 0.900037 0.00646728 +-0.110766 0.0905054 0.163685 -0.645515 -0.00474341 0.763733 +-0.171827 0.0154042 0.0183424 -0.833993 -0.54904 0.0548776 +-0.16919 0.0144335 0.0383753 -0.850481 -0.514658 0.108667 +-0.125804 0.309396 0.128309 -0.662041 0.595157 0.455511 +-0.250978 0.0718296 -0.152129 -0.929972 -0.326519 0.168932 +-0.180454 0.0449359 0.063462 -0.88917 -0.411272 0.200577 +0.126723 -0.0567894 0.156029 0.378743 -0.827276 0.414932 +-0.251794 0.153966 0.00337369 -0.213216 0.309627 0.926645 +-0.0568417 0.0218419 -0.204685 -0.324597 -0.579913 -0.74722 +0.112267 -0.203018 0.159417 0.52245 0.170201 0.83551 +-0.00503937 -0.265828 0.156153 -0.513859 -0.0553472 0.856087 +0.239153 -0.00519258 -0.0158109 0.778146 -0.620157 -0.0994711 +-0.190956 0.250571 0.0442272 -0.943095 0.294486 0.154436 +0.0963394 0.370597 0.138965 0.194649 0.814378 0.546718 +0.121516 0.348197 0.156875 0.330063 0.712333 0.619387 +-0.0764181 0.329454 0.156016 -0.452253 0.661008 0.598778 +-0.162206 0.310902 0.0456915 -0.79268 0.535067 0.292166 +0.207391 0.258183 0.161714 0.653189 0.277908 0.704351 +-0.151374 0.324325 0.047609 -0.728729 0.627032 0.275292 +0.171247 -0.259722 0.00581719 0.963071 -0.181237 -0.199118 +-0.136053 0.145138 0.155826 -0.420182 -0.290586 0.859655 +0.298499 0.242124 0.00872405 0.941229 -0.322025 0.101919 +-0.145409 0.132264 0.145121 -0.520623 -0.187702 0.832899 +-0.00450247 0.40439 0.0521849 -0.187139 0.97138 0.146289 +0.202686 0.47172 -0.0182063 -0.577184 0.813436 -0.071979 +-0.188414 -0.438368 0.0542377 -0.804277 -0.0141618 0.594086 +-0.128059 0.125986 0.154841 -0.439258 -0.0906422 0.893776 +0.26274 0.0318185 -0.0191925 0.885654 -0.453554 -0.0995288 +0.214688 -0.032387 -0.0130989 0.692485 -0.71571 -0.0906782 +-0.117631 0.106824 0.157693 -0.529165 -0.0276317 0.848069 +-0.115399 0.0709058 0.159992 -0.60347 0.108379 0.789986 +0.178712 0.0734845 -0.201546 0.590291 -0.264929 -0.762476 +-0.128308 0.0851825 0.151726 -0.499317 -0.0202407 0.866183 +-0.237581 0.0966271 -0.0107526 -0.71889 -0.68066 0.141063 +0.0436966 -0.0755693 0.159189 -0.00144243 -0.849204 0.528063 +0.296831 0.281113 -0.0712265 0.829736 -0.266274 -0.490547 +0.0310821 -0.285781 -0.184688 0.953886 0.282037 -0.102748 +0.157267 -0.272598 -0.0268758 0.876816 -0.198277 -0.438042 +0.324253 0.383336 -0.0370719 0.986389 0.00379942 -0.164382 +0.032147 -0.133868 0.144608 -0.349795 0.400083 0.847099 +0.0356379 -0.148632 0.153297 -0.294411 0.402589 0.866743 +0.283807 0.105834 0.0493714 0.98797 -0.0989011 0.118885 +0.0834568 0.40884 0.0505912 0.0862788 0.97885 0.185494 +-0.297066 0.304092 -0.024639 -0.11784 0.0367579 0.992352 +0.105587 -0.267101 0.157832 0.427574 -0.342643 0.836527 +0.0866283 -0.273319 0.16306 0.291727 -0.370326 0.881904 +-0.248915 0.252553 -0.0268156 -0.0229762 0.0590708 0.997989 +-0.00109485 -0.326054 0.14256 -0.278581 -0.397096 0.874475 +0.00596991 -0.313631 0.150157 -0.257912 -0.359786 0.89668 +-0.282354 0.152984 -0.0148565 -0.817023 -0.42434 0.390397 +-0.00867901 -0.433543 0.14381 0.0732086 0.648465 0.757716 +0.026745 0.404691 0.0717265 -0.0782994 0.968547 0.236189 +-0.0196373 -0.445226 0.15263 -0.0756063 0.449629 0.89001 +-0.0486355 -0.457301 0.144649 -0.551124 0.131473 0.824001 +0.134057 -0.337889 -0.00886931 0.902143 -0.419336 -0.101463 +-0.00172344 -0.450182 0.153931 0.224795 0.334602 0.915155 +-0.0479387 -0.0916439 0.0343911 -0.607342 -0.794399 0.00808736 +-0.0156604 -0.465876 0.156704 -0.0466336 -0.028044 0.998518 +0.0240601 -0.469545 0.140656 0.698669 -0.0762293 0.711372 +0.127257 0.223524 -0.234121 0.404263 0.263384 -0.8759 +-0.00596181 -0.48296 0.153663 0.137461 -0.473348 0.870084 +0.0739192 0.413991 -0.0280466 0.0201786 0.99484 -0.0994305 +0.0554833 0.367821 0.150236 0.0219588 0.809531 0.586666 +-0.322869 0.287169 -0.0349695 -0.846031 0.0559911 0.530186 +0.000712905 0.366474 0.147017 -0.134264 0.813137 0.566375 +0.139932 0.343233 0.151601 0.418132 0.695837 0.583932 +-0.109751 0.292374 0.162533 -0.576096 0.491049 0.65344 +0.125361 0.242381 -0.228528 0.397366 0.324978 -0.85819 +0.0962844 0.387511 0.109438 0.199755 0.880388 0.430133 +-0.245162 0.1036 -0.0292346 -0.748036 -0.663502 -0.0143792 +-0.191802 0.0750757 0.067274 -0.910611 -0.325454 0.254692 +0.262846 0.250418 0.0714921 0.82231 0.401431 0.403312 +0.109137 0.234102 -0.238444 0.351802 0.30048 -0.886536 +-0.106214 0.361489 0.0544767 -0.552156 0.811119 0.192901 +0.0498229 -0.0672561 0.17672 0.0618666 -0.9168 0.394525 +-0.106831 0.367675 -0.0153547 -0.489115 0.871799 -0.027067 +-0.0404071 -0.490825 0.0177872 -0.267296 -0.909771 -0.317601 +0.133375 0.416764 -0.0453501 -0.385779 0.900997 -0.198444 +-0.102051 -0.49694 0.05816 -0.00153112 -0.999997 0.00180525 +0.105406 0.413663 -0.0309621 -0.0754981 0.98868 -0.129658 +-0.221845 -0.466723 -0.0400832 -0.78248 -0.582817 0.219203 +0.265383 0.0475946 -0.0500203 0.903779 -0.382928 -0.191179 +-0.131006 0.023828 0.152667 -0.781004 -0.149227 0.606436 +-0.121488 -0.496982 0.0547129 -0.00860175 -0.999958 -0.00321092 +-0.126231 -0.0120598 0.133751 -0.748872 -0.531254 0.396181 +-0.113554 -0.0273092 0.133571 -0.673586 -0.644517 0.361773 +0.21942 0.449433 -0.0832884 -0.209465 0.719179 -0.6625 +0.161986 -0.0374315 0.154393 0.516907 -0.756904 0.399879 +-0.254246 -0.191909 -0.0669395 -0.686997 0.666227 0.290131 +0.0775145 -0.0690406 0.1631 0.197677 -0.863933 0.463188 +0.147817 -0.429784 -0.0446106 0.80523 0.564273 0.182211 +0.0873558 -0.147567 0.152497 0.327868 0.393436 0.858901 +0.0191569 -0.150367 0.145713 -0.489636 0.376741 0.786335 +0.0971157 -0.163073 0.15512 0.420291 0.35419 0.835407 +0.00887131 -0.166893 0.146036 -0.593484 0.324365 0.73659 +0.10574 -0.182198 0.157978 0.481876 0.277187 0.831242 +0.00551042 -0.188294 0.151822 -0.595589 0.262138 0.759314 +-0.0160387 -0.211922 0.139953 -0.710934 0.234395 0.663048 +0.0803264 -0.404179 0.0618709 0.749628 -0.307402 0.586142 +0.120496 -0.264803 0.149665 0.568637 -0.319196 0.758133 +-0.0524006 0.388444 -0.0581745 -0.375536 0.906768 -0.191688 +0.0769041 -0.29167 0.15685 0.272956 -0.478643 0.834503 +-0.101704 -0.0441903 -0.0501125 -0.589232 -0.789982 -0.169514 +-0.0383403 -0.439584 0.144574 -0.368638 0.519255 0.771026 +-0.025643 -0.484411 0.151437 -0.216648 -0.504207 0.835966 +-0.0321584 -0.456176 0.154216 -0.313936 0.152377 0.937137 +-0.228043 -0.175525 -0.0565103 -0.500681 0.790723 0.352244 +-0.289785 -0.29548 -0.0578285 -0.982145 0.000609769 0.188127 +-0.282045 0.152068 -0.04116 -0.817214 -0.565153 -0.112975 +-0.069579 0.344506 0.1427 -0.431673 0.725692 0.535752 +-0.103737 0.307846 0.155273 -0.552916 0.568584 0.609094 +-0.119145 0.301883 0.145512 -0.621563 0.547747 0.560029 +0.0961005 -0.414442 0.0366307 0.758697 -0.24411 0.603978 +0.226113 0.251287 0.144842 0.735344 0.324386 0.595016 +-0.158004 0.232497 0.146076 -0.752699 0.22949 0.617072 +-0.286864 -0.262418 -0.0573633 -0.958985 0.182419 0.216957 +-0.203452 -0.321391 0.0568362 -0.360698 0.073468 0.929785 +-0.0412528 -0.0550913 0.171967 -0.340513 -0.817393 0.464671 +0.244909 0.143178 0.153948 0.751142 0.134745 0.646243 +-0.151423 0.149829 0.146536 -0.542941 -0.282137 0.790958 +0.256851 0.0305309 -0.0518598 0.861911 -0.466746 -0.198133 +-0.075228 -0.0586574 -0.070901 -0.51506 -0.820968 -0.246424 +-0.282158 -0.247515 -0.0529447 -0.920853 0.294688 0.255321 +0.0994292 -0.497629 -0.0263233 0.0338717 -0.996097 0.0815096 +0.226017 -0.0218388 0.0360489 0.722885 -0.688629 0.056809 +0.291791 0.446592 -0.0665865 0.580336 0.454893 -0.675487 +-0.144491 0.0527223 0.137841 -0.734918 -0.061932 0.675322 +0.238938 0.0342837 0.136474 0.820157 -0.426541 0.38132 +-0.115681 -0.154216 -0.0707541 0.111043 0.960921 0.253575 +-0.183842 0.0436689 0.042855 -0.889321 -0.426931 0.163824 +0.0717569 -0.0803147 0.148737 0.203053 -0.721992 0.661436 +-0.188236 0.0593691 0.0570743 -0.900717 -0.385079 0.201053 +0.0250221 -0.0774129 0.154513 -0.0989375 -0.856915 0.505874 +0.074248 -0.113847 0.140502 0.170028 0.315898 0.933434 +-0.234336 0.349064 -0.0763256 0.11354 0.921131 -0.372326 +-0.175602 0.0293546 0.0494934 -0.878257 -0.451483 0.15757 +0.00434752 -0.132866 0.123752 -0.695178 0.326627 0.640346 +0.150666 -0.0544877 -0.0939604 0.433298 -0.819341 -0.375411 +0.143841 -0.0733379 -0.0614907 0.503311 -0.774169 -0.383849 +0.153435 -0.237365 0.119984 0.849252 -0.0432531 0.526214 +-0.012177 -0.245598 0.150995 -0.6087 0.0688723 0.790405 +-0.202236 0.20615 0.0455496 -0.971525 0.200903 0.125607 +0.302938 0.358238 -0.0824612 0.781866 -0.00708288 -0.623406 +-0.0538176 -0.496465 -0.10859 0.0282291 -0.998601 0.0447093 +-0.00176602 0.328914 -0.203896 -0.130951 0.664961 -0.735309 +0.191251 -0.0320871 -0.0864429 0.578673 -0.748168 -0.324626 +-0.083588 -0.494255 -0.200803 0.102751 -0.917369 -0.384546 +0.245529 0.461549 -0.0742484 0.0380972 0.707279 -0.705907 +0.0513129 0.411362 0.0418314 -0.0193242 0.991384 0.129551 +-0.224555 0.0859739 -0.0778756 -0.78666 -0.601228 -0.140327 +0.000223266 -0.495811 0.137799 0.169825 -0.891799 0.419349 +0.277384 0.213037 0.0625546 0.938029 0.0765217 0.338003 +0.226164 0.00197594 -0.0847399 0.732563 -0.603735 -0.314414 +-0.0954942 0.321934 0.148269 -0.524381 0.64143 0.559993 +-0.06072 -0.49762 0.0523084 -0.0262511 -0.999382 -0.0233844 +0.225628 0.268146 0.133995 0.762633 0.41333 0.497543 +0.251976 0.223874 0.120582 0.862283 0.248231 0.441417 +-0.181236 -0.496218 -0.0764276 -0.0968135 -0.994978 0.0254054 +-0.201114 -0.37186 0.0562714 -0.450115 -0.115112 0.88552 +0.254002 0.131275 0.143091 0.852621 0.0751274 0.517101 +-0.145232 0.114252 0.14396 -0.591089 -0.0522337 0.804914 +-0.0605326 -0.05562 -0.099212 -0.396306 -0.838391 -0.374222 +0.149143 0.358457 0.120572 0.506058 0.752445 0.421582 +-0.143489 -0.013736 -0.0323718 -0.682271 -0.71915 -0.131644 +-0.288335 0.324457 -0.0943232 -0.464991 0.513312 -0.721314 +0.155705 -0.0608326 -0.0733306 0.478293 -0.808615 -0.342604 +-0.127412 0.00279368 0.147122 -0.774402 -0.384612 0.502369 +-0.0767849 -0.0420033 0.161551 -0.506621 -0.738135 0.445524 +0.121517 -0.0703729 -0.089775 0.348297 -0.825222 -0.444632 +0.16361 -0.167765 0.0587872 0.949497 0.283139 0.13523 +0.0201214 -0.0867587 0.139907 -0.226315 -0.712226 0.664466 +0.0596549 0.281591 -0.233245 0.183348 0.457727 -0.869982 +-0.2932 -0.280538 -0.0877687 -0.996628 0.0334272 0.0749293 +0.0579161 -0.106886 0.138916 0.00166623 0.107212 0.994235 +0.226581 0.436863 -0.0962333 -0.0598143 0.611463 -0.789009 +0.012204 0.298354 -0.228269 -0.0342325 0.537977 -0.842264 +-0.157383 0.302221 0.0767639 -0.788856 0.542369 0.289036 +-0.021091 -0.26183 0.144714 -0.642603 0.0166751 0.766018 +0.131589 -0.298965 0.113803 0.658821 -0.561362 0.500827 +0.0266154 -0.335807 0.139561 0.0804853 -0.53465 0.841232 +-0.239621 -0.351307 -0.22149 -0.722407 -0.376533 -0.579957 +-0.0265322 -0.428556 0.137487 -0.166125 0.708279 0.686107 +-0.172785 0.295826 0.0405799 -0.859672 0.443332 0.253812 +-0.10861 -0.457846 -0.235535 0.0363217 -0.514847 -0.856512 +-0.184773 -0.408526 -0.238624 -0.530186 -0.433288 -0.72881 +-0.10464 0.356896 0.0736636 -0.562228 0.781612 0.270153 +0.0463626 -0.0905321 -0.083551 -0.0438131 -0.798468 -0.600441 +-0.284477 -0.339875 -0.112849 -0.956986 -0.264402 -0.119454 +0.0133712 -0.483754 0.145706 0.470605 -0.484474 0.737439 +0.00312107 0.382717 -0.132452 -0.166679 0.897605 -0.408073 +0.0105751 0.376018 0.134663 -0.110729 0.845805 0.521874 +-0.0160042 0.362878 0.147422 -0.192058 0.797942 0.571316 +0.147847 0.102465 -0.229441 0.486216 -0.161322 -0.858819 +-0.1117 0.316392 0.13788 -0.590227 0.627562 0.507738 +-0.138163 0.27687 0.145943 -0.690244 0.442509 0.572494 +-0.151786 0.26264 0.138383 -0.753941 0.379844 0.535996 +0.246135 0.239978 0.121457 0.836642 0.325229 0.440745 +-0.124033 -0.496088 -0.0761227 -0.0470472 -0.998162 -0.0381991 +-0.192365 -0.494547 -0.129871 -0.30348 -0.951144 -0.0567973 +0.105693 -0.00595186 -0.196935 0.286841 -0.634358 -0.717853 +-0.0430538 -0.498263 0.0590496 -0.0262742 -0.999228 -0.0292152 +-0.0847431 -0.0367417 -0.113095 -0.452904 -0.812935 -0.366082 +-0.101121 -0.030571 -0.103916 -0.530739 -0.797726 -0.286268 +0.218075 0.00831971 0.145039 0.73206 -0.559044 0.389305 +-0.138432 0.00308173 0.128158 -0.804482 -0.434854 0.404612 +-0.057275 -0.498214 0.0909328 -0.085694 -0.995637 0.0369245 +-0.0173999 0.0155843 -0.214416 -0.243344 -0.584289 -0.774203 +-0.220851 -0.470714 -0.12528 -0.809197 -0.572996 -0.129902 +-0.0655395 0.366119 -0.112176 -0.405768 0.848677 -0.339265 +0.090436 -0.11981 0.138603 0.372037 0.356484 0.857034 +-0.185237 -0.496111 -0.113655 -0.157168 -0.98757 -0.00168616 +-0.289229 -0.235762 -0.115976 -0.959644 0.267802 0.0858259 +0.127172 -0.193816 0.145377 0.666924 0.236147 0.706715 +0.13734 -0.206157 0.138804 0.743271 0.167123 0.64778 +0.156562 -0.215784 0.113152 0.868975 0.109559 0.482576 +0.122299 -0.495878 -0.107335 0.132369 -0.875141 -0.46541 +-0.199923 -0.492422 -0.106745 -0.418463 -0.907953 -0.0225766 +-0.259421 -0.304984 -0.223807 -0.777838 -0.336446 -0.530822 +0.0908945 -0.313492 0.134725 0.391594 -0.617786 0.681905 +0.0793755 -0.0684616 -0.117018 0.158405 -0.876285 -0.455007 +0.0198839 -0.352127 0.130152 0.0738768 -0.522852 0.849216 +0.0589585 -0.497675 -0.120921 0.156003 -0.975607 -0.154444 +-0.0635352 -0.427409 -0.245571 0.294712 -0.544574 -0.785228 +0.0207949 -0.498104 -0.114993 -0.0227988 -0.99974 0.000329892 +-0.063501 -0.458314 0.133285 -0.72782 0.135844 0.672179 +0.0291834 -0.484518 0.129862 0.697313 -0.501152 0.512446 +-0.0448244 -0.487927 0.140439 -0.420564 -0.597727 0.682531 +-0.0266239 -0.150153 0.0527481 -0.94981 0.310043 0.0416438 +0.132182 0.364881 0.126698 0.407055 0.782328 0.471454 +-0.0489061 -0.0848184 0.0829694 -0.462034 -0.859156 0.219946 +-0.0627461 -0.0791039 0.0744857 -0.478687 -0.865271 0.148878 +0.214658 0.284159 0.135616 0.719029 0.488858 0.493979 +-0.176199 0.215551 0.126391 -0.849166 0.180361 0.496374 +0.251934 0.196024 -0.125806 0.874066 0.12229 -0.470163 +-0.165269 0.17865 0.146485 -0.718294 -0.0881697 0.690131 +-0.164071 0.16071 0.141121 -0.640901 -0.211423 0.737933 +-0.164459 0.140596 0.137066 -0.569124 -0.207036 0.79576 +-0.1607 0.122277 0.133683 -0.581463 -0.201926 0.788116 +0.0120339 -0.36546 -0.228634 0.755501 -0.297561 -0.583674 +-0.283702 -0.241739 -0.227176 -0.851022 -0.355969 -0.386067 +-0.0337572 0.374945 -0.125901 -0.333631 0.865514 -0.373598 +0.204078 0.363833 -0.131378 0.0957861 0.304544 -0.94767 +0.223661 0.386454 -0.122107 0.11899 0.325454 -0.938041 +-0.124387 -0.0224076 0.120632 -0.722901 -0.616107 0.312772 +-0.043995 -0.0496431 -0.125108 -0.320551 -0.831166 -0.454324 +0.119486 -0.0806352 0.122345 0.559427 -0.537192 0.631241 +-0.0372496 -0.064974 0.156311 -0.292322 -0.867687 0.402078 +-0.0422406 -0.0706578 0.138458 -0.30331 -0.888446 0.34448 +0.104009 -0.0906749 0.127593 0.479306 -0.279596 0.83192 +-0.0122533 -0.0801598 0.135841 -0.273134 -0.860445 0.430154 +0.0566462 -0.272686 -0.127858 0.662403 0.0271841 -0.748655 +-0.182843 0.25789 0.0728163 -0.9019 0.367456 0.227049 +0.0421548 -0.102633 0.137197 -0.220519 -0.0972295 0.970525 +0.0289132 -0.117886 0.135651 -0.418733 0.276907 0.864861 +-0.0671306 0.0633115 -0.226985 -0.365515 -0.416433 -0.832456 +0.114632 -0.140159 0.132098 0.603352 0.360399 0.711392 +-0.172295 0.272104 0.0864205 -0.854199 0.439129 0.278407 +-0.0268317 -0.301465 0.136513 -0.588962 -0.149777 0.79416 +0.220793 0.29982 0.0995334 0.741093 0.611536 0.277138 +-0.0272719 0.383013 -0.110916 -0.308993 0.892768 -0.327856 +0.251582 0.232451 -0.115619 0.836673 0.0688207 -0.543362 +0.210257 0.30806 0.108009 0.716301 0.631729 0.296364 +-0.0556239 -0.474071 0.139128 -0.600054 -0.191252 0.776761 +-0.000133423 -0.0625929 -0.125604 -0.170245 -0.868212 -0.466074 +0.0153932 -0.495271 0.130081 0.353416 -0.862977 0.361064 +-0.151543 -0.173118 -0.238453 0.128628 0.836618 -0.532471 +0.0626211 0.377285 0.135893 0.0413899 0.845377 0.532565 +-0.0677588 0.356156 0.126913 -0.42653 0.769904 0.474679 +-0.0039567 -0.244145 -0.22944 0.692215 0.487098 -0.532517 +-0.0375699 -0.175934 -0.14259 0.401535 0.909165 -0.110402 +0.199642 -0.0151844 0.139886 0.637556 -0.683816 0.354848 +0.150054 -0.0302328 -0.140839 0.427474 -0.756773 -0.494531 +-0.161412 0.247916 0.134021 -0.788971 0.320669 0.524114 +-0.181845 0.198333 0.121585 -0.868993 0.100815 0.484446 +-0.171047 0.198127 0.138348 -0.799988 0.0795452 0.59472 +-0.176284 0.132258 0.123757 -0.71683 -0.180972 0.673353 +-0.155799 0.0825307 0.127842 -0.726903 -0.110489 0.677794 +0.290699 0.292357 -0.0850549 0.762478 -0.210418 -0.611843 +-0.144574 0.0341498 0.137856 -0.796118 -0.124897 0.592112 +-0.0553182 -0.168213 -0.134409 0.368244 0.927074 -0.0702164 +0.0412025 -0.403843 -0.13519 0.911136 0.130883 -0.39077 +-0.184895 -0.370169 0.0634895 -0.331708 -0.0621415 0.941333 +0.00690076 -0.0893427 0.131494 -0.325639 -0.680527 0.656386 +0.0877296 -0.10222 0.132935 0.342967 0.0519449 0.93791 +-0.128779 -0.497686 -0.147907 0.0171871 -0.999615 0.0217824 +0.122665 -0.156105 0.133162 0.662949 0.339568 0.667227 +0.0336082 0.379283 -0.145156 -0.00365724 0.869253 -0.494354 +-0.159022 -0.351354 0.068734 -0.0498678 0.0677766 0.996453 +0.145827 -0.268862 0.121342 0.766564 -0.330134 0.55081 +0.0259334 -0.0459517 -0.162253 -0.0923355 -0.840706 -0.533561 +0.042212 -0.373328 0.110376 0.382251 -0.44866 0.807829 +0.0374095 -0.346174 0.130457 0.222728 -0.564782 0.794616 +0.0191357 -0.424304 0.124996 0.452579 0.55155 0.700689 +0.265886 0.305405 -0.111176 0.58528 -0.124756 -0.801176 +-0.0726855 -0.456173 0.11726 -0.733639 0.167114 0.65867 +0.0210424 -0.496861 0.113974 0.33964 -0.922967 0.181043 +-0.0140533 -0.49935 0.121883 0.0254248 -0.994188 0.104613 +0.136524 0.274554 0.199517 0.395003 0.248487 0.884436 +-0.0103742 0.373627 0.132762 -0.166918 0.840389 0.515639 +0.147214 -0.307793 0.0668742 0.787666 -0.574213 0.223298 +-0.126534 -0.46047 -0.233599 -0.110639 -0.517419 -0.84855 +0.319731 0.31419 -0.0162169 0.982114 -0.183664 0.0414732 +-0.177856 0.150294 0.127086 -0.754108 -0.118732 0.645929 +0.131029 -0.31998 0.0841898 0.690138 -0.640309 0.337216 +-0.0278713 -0.209215 -0.219798 0.570944 0.661715 -0.485959 +0.145107 -0.316459 0.0491865 0.793985 -0.586339 0.160606 +0.134226 -0.330902 0.0463236 0.772816 -0.604549 0.193068 +-0.0575322 -0.168533 -0.151941 0.382344 0.920136 -0.0846298 +-0.0575118 -0.170244 -0.169299 0.402926 0.904085 -0.142413 +-0.158127 -0.0007521 0.0494867 -0.819365 -0.563452 0.105652 +0.0648068 0.314328 -0.21151 0.195834 0.577451 -0.792591 +-0.229889 0.179363 -0.161388 -0.512371 -0.118526 -0.850546 +0.107068 0.391209 0.0952875 0.266504 0.886163 0.379065 +0.0238388 -0.10176 0.131233 -0.398823 -0.272274 0.875675 +0.224257 0.143373 -0.173135 0.765912 -0.0464559 -0.641265 +0.118292 -0.12443 0.120883 0.668991 0.271297 0.691989 +0.0900782 0.395356 0.0952483 0.167726 0.912513 0.373079 +0.121133 -0.296287 0.128367 0.577205 -0.548726 0.604759 +0.0968277 0.403977 0.0661015 0.158628 0.951153 0.264848 +-0.0381854 -0.316234 0.124509 -0.641121 -0.181818 0.745591 +-0.0241568 -0.321037 0.133711 -0.497138 -0.277756 0.822013 +-0.0127899 -0.338033 0.132784 -0.337158 -0.396856 0.853715 +0.000716067 -0.352473 0.129242 -0.146182 -0.464268 0.873548 +0.0487814 0.251264 -0.249033 0.138366 0.350933 -0.926121 +0.0124546 -0.367434 0.121549 0.0392972 -0.473491 0.879922 +-0.0803897 0.205579 -0.236 -0.427313 0.16218 -0.889439 +0.00193605 -0.410333 0.120962 0.111943 0.516267 0.84908 +-0.291355 -0.272694 -0.161876 -0.980222 -0.15227 -0.126408 +-0.134657 -0.497871 -0.164478 -0.0033028 -0.999769 -0.0212383 +-0.303956 -0.186228 -0.220091 -0.97647 -0.17008 -0.132589 +0.058707 -0.0377505 -0.17496 0.0728354 -0.799407 -0.596358 +0.125534 0.37508 0.114216 0.377034 0.823967 0.422993 +0.140158 0.370465 0.109123 0.463069 0.793899 0.39407 +0.059402 0.406742 0.0676402 0.0214277 0.974543 0.223174 +-0.173034 0.113272 0.122059 -0.670089 -0.198909 0.715133 +-0.199065 -0.02419 -0.226228 0.567427 0.170758 -0.805523 +-0.116023 -0.497266 -0.185768 -0.0165435 -0.995419 -0.0941655 +0.234941 0.0211206 0.128622 0.794221 -0.498779 0.347035 +-0.16597 0.0139577 0.0580707 -0.860336 -0.486638 0.151678 +-0.0648357 -0.0669988 0.121506 -0.438886 -0.859954 0.260496 +-0.0308 -0.0778034 0.127914 -0.291328 -0.897196 0.331916 +-0.195503 -0.467051 -0.187677 -0.676242 -0.502042 -0.53912 +-0.0138229 -0.496115 -0.184891 -0.00321276 -0.954083 -0.299527 +0.265945 0.05367 0.0838399 0.912061 -0.335981 0.235078 +0.246606 0.20848 0.136441 0.81465 0.192077 0.547222 +-0.0333717 -0.19803 0.107734 -0.818315 0.349012 0.456675 +0.148264 -0.205155 0.123733 0.818447 0.18398 0.54433 +-0.195214 -0.445472 -0.205032 -0.643491 -0.452886 -0.617101 +-0.00542099 0.0447699 -0.236764 -0.195923 -0.483456 -0.853162 +-0.0869282 0.299947 -0.19153 -0.45656 0.566807 -0.685772 +-0.118439 -0.497763 -0.16387 -0.00077982 -1 0.000593611 +0.0533803 -0.342298 0.127783 0.322191 -0.604736 0.728346 +0.0489931 -0.358208 0.116761 0.368907 -0.550867 0.748634 +-0.00154976 -0.380003 0.115689 -0.0919297 -0.246497 0.964774 +-0.0114626 0.0281103 -0.22517 -0.21812 -0.534809 -0.816335 +0.0371988 -0.486906 0.113345 0.722217 -0.585118 0.368836 +-0.0774314 -0.496885 -0.185205 0.0442833 -0.991911 -0.118962 +-0.0762395 -0.485531 0.113315 -0.502578 -0.534135 0.679791 +-0.0607848 -0.487869 0.127877 -0.546402 -0.602676 0.581573 +0.0815486 -0.034899 -0.17413 0.175591 -0.785343 -0.593636 +0.196324 0.061695 -0.181987 0.651608 -0.297426 -0.697815 +-0.0866142 0.364113 0.0874747 -0.509711 0.804649 0.304526 +-0.257353 -0.358999 -0.187826 -0.83 -0.376443 -0.411571 +-0.178728 0.230702 0.113829 -0.877065 0.262069 0.402587 +0.0997028 0.0435958 -0.230753 0.270883 -0.421598 -0.865377 +0.262261 0.136124 0.126649 0.903315 0.0631536 0.424303 +0.261083 0.119346 0.130755 0.904761 0.0128456 0.425725 +-0.166097 0.0547265 0.112562 -0.827605 -0.229927 0.512058 +0.18155 -0.0388897 0.12064 0.582713 -0.75252 0.306853 +-0.107399 -0.0443791 0.103332 -0.60799 -0.767697 0.202459 +-0.0194334 -0.0861564 0.118311 -0.437152 -0.77934 0.448919 +0.114364 -0.100232 0.11861 0.65512 -0.0378967 0.754574 +-0.00215479 -0.119272 0.111768 -0.751882 0.0205578 0.658977 +0.140422 0.0170296 -0.198211 0.429173 -0.532161 -0.729805 +0.159522 -0.198676 0.101059 0.886038 0.204765 0.415942 +0.0144799 -0.498957 0.0823907 0.0717182 -0.997162 0.0229051 +-0.0408007 -0.233811 0.117779 -0.777172 0.244278 0.579942 +0.0870303 0.0551983 -0.239785 0.23382 -0.390299 -0.890503 +-0.0427632 -0.336718 0.113845 -0.617859 -0.243658 0.747583 +-0.0902424 -0.162035 -0.188465 0.27319 0.931281 -0.241005 +-0.00584399 -0.365927 0.12118 -0.185919 -0.421419 0.887604 +-0.270489 -0.319646 -0.192826 -0.873087 -0.309748 -0.376531 +0.0156274 -0.387895 -0.208833 0.787 -0.408922 -0.461967 +0.0104382 -0.39462 0.114045 0.166938 0.0928003 0.981591 +-0.00657573 -0.395088 0.114171 -0.11025 0.186396 0.976269 +-0.151562 0.171476 -0.198736 -0.527086 0.0605741 -0.84765 +0.0642605 -0.440442 0.0698771 0.849744 -0.110707 0.51544 +-0.0569268 -0.371245 0.0916837 -0.646068 -0.201166 0.736294 +0.0109286 0.000905074 -0.210784 -0.157394 -0.628469 -0.761744 +0.149996 -0.296266 0.0836479 0.796684 -0.529691 0.29107 +0.13321 0.283619 -0.20487 0.426143 0.463905 -0.776656 +0.185805 0.212982 -0.201087 0.613574 0.234377 -0.754052 +-0.0369633 -0.0953348 0.0713093 -0.639647 -0.731829 0.235114 +-0.0228077 0.0426866 -0.23098 -0.241788 -0.495225 -0.834441 +0.0835419 0.315029 -0.20572 0.263275 0.577545 -0.77274 +-0.127051 -0.46411 0.114406 -0.0764874 -0.17247 0.982041 +-0.0866883 0.117573 -0.235353 -0.437699 -0.158564 -0.885029 +0.0452925 -0.474532 0.104954 0.889951 -0.208407 0.405652 +-0.241254 -0.439463 -0.112175 -0.872647 -0.472899 -0.121876 +-0.0703896 -0.47339 0.125073 -0.771989 -0.0939724 0.628651 +0.243871 0.0134088 0.0902742 0.81206 -0.527263 0.250106 +-0.174619 -0.497206 -0.129171 -0.0817719 -0.996596 -0.0104821 +0.161149 0.0972329 -0.22019 0.535542 -0.17801 -0.825534 +-0.047615 0.36262 0.132259 -0.339147 0.796686 0.500271 +0.17624 0.340721 0.114317 0.622837 0.692968 0.363138 +-0.169154 0.265294 0.104349 -0.837783 0.414931 0.354897 +0.247556 0.253203 0.105979 0.842562 0.393308 0.367963 +-0.190125 0.193073 0.105285 -0.915801 0.11542 0.384691 +0.117838 0.0399131 -0.222607 0.333906 -0.424271 -0.841725 +0.265655 0.187365 0.10505 0.927538 0.124867 0.352252 +-0.249164 -0.424501 -0.113042 -0.877305 -0.463069 -0.126108 +0.26087 0.0687764 0.117314 0.905284 -0.259523 0.336316 +-0.252969 -0.0265998 -0.202403 -0.772105 0.620264 -0.138299 +-0.144162 0.318569 0.0789502 -0.724918 0.616908 0.306461 +-0.150375 0.318814 0.0631595 -0.747207 0.601999 0.281564 +0.118938 -0.184187 0.149283 0.611256 0.273473 0.742683 +-0.096181 0.106878 -0.228241 -0.45883 -0.205913 -0.864335 +0.133749 -0.111277 0.0974993 0.827231 0.0976651 0.553308 +0.13163 -0.129431 0.107792 0.771388 0.269787 0.576347 +-0.0177992 -0.169849 0.115372 -0.818025 0.335359 0.467299 +0.143022 -0.176411 0.118238 0.795344 0.288733 0.532974 +-0.0377506 -0.188486 0.0900463 -0.829487 0.418683 0.369669 +-0.0442861 -0.207683 0.0963252 -0.796451 0.392235 0.460236 +0.156457 -0.255555 0.111153 0.858321 -0.189728 0.476747 +-0.0526351 -0.284822 0.11352 -0.736783 0.00611844 0.676102 +0.152277 -0.274557 0.106856 0.814239 -0.379719 0.439122 +0.0721791 -0.336907 0.122475 0.386942 -0.641239 0.662638 +0.178591 0.119373 -0.212206 0.586168 -0.120327 -0.801204 +0.0613542 -0.366448 0.103316 0.491988 -0.509818 0.705715 +-0.0833299 0.357524 -0.112211 -0.432485 0.833284 -0.344376 +-0.0808019 -0.325788 0.079291 -0.730504 -0.162908 0.663193 +-0.101717 0.345646 -0.115878 -0.462775 0.807962 -0.364741 +0.0188875 0.312452 -0.218846 -0.00167721 0.587289 -0.809376 +-0.105512 -0.496161 -0.125393 0.0213336 -0.998758 0.0450239 +-0.0203327 -0.403973 0.115066 -0.223166 0.450076 0.864655 +0.142739 0.233277 -0.223176 0.455826 0.29748 -0.838885 +0.142427 -0.108817 0.0814554 0.887683 0.0287353 0.459557 +-0.0454861 -0.41612 0.110835 -0.531918 0.634034 0.561305 +0.140972 -0.128019 0.0923452 0.851387 0.236103 0.468397 +-0.0699309 0.109048 -0.241621 -0.381984 -0.192834 -0.903827 +-0.123543 -0.44595 0.114201 -0.0572817 0.237086 0.969799 +0.134075 -0.0799154 0.107569 0.650345 -0.560328 0.512917 +-0.14263 -0.449287 0.1116 -0.344604 0.191183 0.919074 +0.157248 -0.0788829 0.0727256 0.738672 -0.574712 0.352235 +-0.192474 -0.392424 -0.242393 -0.552825 -0.405925 -0.727743 +-0.178571 0.0240698 -0.0166499 -0.808581 -0.588357 -0.00571833 +-0.096882 -0.465974 0.112175 0.0959228 -0.139759 0.985528 +0.155095 0.173998 -0.229646 0.490191 0.0758931 -0.868305 +-0.204484 -0.0726375 -0.221888 0.935046 -0.270076 -0.229668 +-0.110774 -0.478992 0.109167 0.0236628 -0.413449 0.91022 +-0.274316 0.15057 -0.0724821 -0.801493 -0.563167 -0.201126 +0.0940489 0.22585 -0.246614 0.312748 0.271296 -0.910268 +0.278379 0.146679 0.0782909 0.965496 0.0654726 0.252052 +0.212293 -0.0347872 0.04086 0.683618 -0.724095 0.0913923 +-0.271985 -0.0637647 -0.238931 -0.708706 0.596565 -0.376625 +-0.129601 -0.174199 -0.235261 0.12575 0.834136 -0.537033 +0.143161 0.211997 -0.229601 0.45142 0.221678 -0.864337 +-0.0153647 0.38977 0.0993741 -0.21336 0.910033 0.355412 +-0.0629766 0.366267 0.113627 -0.402872 0.813648 0.41913 +-0.119959 -0.496141 -0.113543 0.0381273 -0.998527 0.0385916 +0.0849253 0.0335318 -0.229672 0.212074 -0.459075 -0.862713 +-0.123835 -0.496996 -0.131256 0.0277621 -0.998951 0.0364112 +-0.101237 -0.444038 -0.243403 0.0707718 -0.532314 -0.843584 +-0.170598 0.248842 0.117351 -0.840338 0.339351 0.422698 +0.141235 0.13833 -0.237288 0.451578 -0.0500737 -0.890825 +0.209226 0.316978 0.0896798 0.720265 0.644878 0.255637 +-0.229283 -0.346083 -0.236054 -0.656934 -0.367697 -0.658207 +0.196801 0.333093 0.0831278 0.715292 0.651408 0.253031 +0.18364 0.292737 0.163876 0.580881 0.469485 0.664952 +-0.187963 0.142174 0.109923 -0.84902 -0.0951566 0.519722 +0.19793 0.323827 0.10298 0.706142 0.648124 0.28513 +0.10342 0.113409 -0.251748 0.336239 -0.130491 -0.932693 +-0.180755 0.0852372 0.10335 -0.81977 -0.239402 0.520255 +0.268831 0.0799812 0.101444 0.940945 -0.191126 0.279451 +0.017924 -0.304189 0.156422 -0.180383 -0.360294 0.915232 +-0.236385 0.0987634 -0.0671557 -0.781418 -0.608392 -0.138726 +0.223535 -0.0109275 0.0955027 0.716671 -0.652588 0.245989 +-0.0486453 -0.0747307 0.120606 -0.348077 -0.897579 0.270545 +0.125919 -0.0939693 0.10802 0.74909 -0.182853 0.636733 +-0.122589 -0.443867 -0.243717 -0.0822579 -0.509794 -0.856355 +0.0808244 0.215239 -0.253894 0.26081 0.225732 -0.938628 +-0.00704127 -0.136498 0.1102 -0.819815 0.277632 0.500824 +-0.0377037 -0.216926 0.113347 -0.794979 0.310019 0.521437 +-0.0408749 0.157793 -0.255976 -0.279279 0.0173445 -0.960053 +0.0320274 0.12138 -0.265612 -0.00818586 -0.130473 -0.991418 +0.0898124 -0.327012 0.121706 0.427043 -0.659368 0.618764 +0.0669138 -0.352282 0.110878 0.440708 -0.601195 0.666589 +0.0375929 -0.389575 0.105472 0.439463 -0.201859 0.875286 +0.228375 0.411716 -0.111233 0.0571069 0.44186 -0.895264 +0.0360196 -0.428602 0.112883 0.692795 0.324753 0.643871 +0.0481816 -0.440015 0.0998902 0.861989 0.104289 0.496084 +-0.0918773 -0.435472 0.107447 0.0642312 0.454585 0.888385 +-0.241995 -0.271336 -0.261619 -0.594399 -0.330946 -0.732915 +-0.130673 -0.433649 0.106926 -0.183534 0.612663 0.768739 +-0.0726276 -0.438542 0.108226 -0.399786 0.477234 0.782572 +-0.160681 -0.447139 0.0991284 -0.627603 0.289033 0.722893 +-0.107296 -0.404285 -0.267578 -0.011679 -0.463592 -0.885972 +0.00246408 0.164615 -0.265482 -0.139999 0.0180279 -0.989988 +-0.0727165 -0.454458 -0.230336 0.29 -0.523665 -0.801046 +0.232195 0.00193365 0.101186 0.766916 -0.583446 0.267266 +-0.0859635 -0.451041 0.110394 -0.0317353 0.126734 0.991429 +-0.154504 -0.464863 0.105571 -0.525299 -0.180927 0.83146 +-0.0659043 -0.354243 0.0878885 -0.696714 -0.191144 0.691414 +-0.0867421 -0.292197 0.0789387 -0.6693 -0.0178694 0.742778 +-0.291837 -0.154546 -0.265204 -0.820461 -0.0581672 -0.568736 +-0.0498706 -0.225213 0.0998735 -0.779796 0.33448 0.529189 +0.262309 0.40651 -0.10516 0.392888 0.3006 -0.869068 +-0.0950927 -0.483205 0.107529 -0.115002 -0.42593 0.897417 +-0.0738009 -0.248819 -0.280268 0.281115 0.38904 -0.877281 +-0.164935 0.0380426 0.104254 -0.866192 -0.3315 0.373925 +-0.0806391 -0.469883 0.109808 -0.410595 -0.0440715 0.910752 +-0.0451439 -0.497892 0.121909 -0.22755 -0.941177 0.249814 +-0.121896 -0.360388 -0.283914 -0.126352 -0.290249 -0.948573 +0.270487 0.100124 0.106009 0.946938 -0.0787888 0.311611 +-0.0533164 0.383416 0.0825887 -0.36929 0.887853 0.274485 +0.157759 0.361714 0.102414 0.556011 0.74907 0.360202 +-0.099866 0.35205 0.0944112 -0.557223 0.757176 0.340863 +-0.104099 -0.258516 -0.290469 0.103747 0.257055 -0.960812 +0.243117 0.274457 0.0878807 0.810437 0.507826 0.292069 +-0.178938 0.245114 0.101329 -0.884342 0.324182 0.335925 +-0.136444 -0.276345 -0.294002 -0.0750425 0.0601806 -0.995363 +-0.19569 0.152584 0.0969672 -0.914092 -0.0259097 0.404679 +-0.0515072 -0.0600031 0.154985 -0.374054 -0.832322 0.409052 +-0.193507 0.326583 -0.105847 0.123471 0.830545 -0.543093 +-0.06356 -0.257179 0.096416 -0.742503 0.186762 0.64328 +0.20382 0.461757 -0.0551036 -0.47434 0.791374 -0.385654 +0.135539 -0.263709 0.136894 0.69741 -0.286134 0.657075 +-0.0348819 -0.0819308 0.110811 -0.387094 -0.86674 0.314516 +-0.0169978 -0.145835 0.0968083 -0.888034 0.29465 0.352954 +0.19291 0.0768084 -0.190673 0.642183 -0.249769 -0.724718 +0.161629 -0.265317 0.0945524 0.887769 -0.292739 0.355204 +-0.0232271 -0.386848 0.109585 -0.322977 0.0122842 0.946327 +-0.0360761 -0.398251 0.105075 -0.511835 0.291746 0.808028 +0.182182 0.15113 0.184805 0.402076 0.233017 0.885459 +0.109964 0.17472 -0.250686 0.349913 0.0782076 -0.933512 +0.268178 0.141901 0.111553 0.931292 0.0699101 0.357501 +0.199815 0.111038 -0.193451 0.6657 -0.149311 -0.731129 +0.151406 0.384762 0.0590187 0.522174 0.740877 0.422416 +0.0233478 -0.358072 -0.215983 0.844651 -0.238305 -0.479349 +0.044716 -0.488843 0.0933642 0.704441 -0.638843 0.30926 +0.0710958 -0.243948 -0.109375 0.598284 0.278068 -0.751488 +-0.0594325 -0.496756 0.111374 -0.288416 -0.925842 0.244197 +-0.246558 0.108194 -0.160318 -0.895651 0.427442 -0.122888 +-0.05033 0.377611 0.100971 -0.348754 0.863017 0.365477 +0.174979 0.351105 0.0945819 0.636785 0.704669 0.312964 +-0.142343 0.186606 -0.203042 -0.535223 0.115289 -0.836806 +-0.123348 -0.184715 -0.248306 0.148723 0.749011 -0.64565 +0.216309 0.00554854 -0.111533 0.69683 -0.588353 -0.410206 +-0.255002 -0.323636 -0.218625 -0.779133 -0.338374 -0.527688 +0.137967 -0.0924972 0.0922865 0.808182 -0.257455 0.529678 +-0.0080889 -0.10219 0.110205 -0.630644 -0.45665 0.627502 +-0.120943 0.348988 0.0594337 -0.608633 0.757524 0.236057 +-0.0125259 -0.127675 0.0963596 -0.894092 0.0678027 0.442721 +0.018025 -0.328089 -0.233159 0.819433 -0.0544687 -0.570581 +0.0820434 -0.344314 0.108133 0.463018 -0.651874 0.600563 +0.120861 -0.0358689 0.1984 0.395966 -0.765782 0.506744 +-0.0998456 -0.424016 0.0982713 -0.080251 0.652668 0.753382 +-0.274998 0.321655 -0.103523 -0.353187 0.551748 -0.755535 +0.00733037 -0.497871 -0.130132 -0.0280203 -0.999576 0.0079791 +0.257069 0.0513045 -0.084505 0.877036 -0.361034 -0.316959 +-0.0728958 -0.495132 0.100737 -0.190542 -0.940823 0.280261 +-0.12751 -0.494724 0.0906434 -0.112415 -0.933712 0.339919 +0.120151 0.392477 0.0815206 0.337037 0.873549 0.351167 +-0.0924473 -0.496855 0.0372666 0.00682905 -0.999444 -0.032623 +-0.140975 -0.182612 -0.249544 0.134143 0.764896 -0.630032 +-0.0798383 -0.0613824 0.112259 -0.50211 -0.832217 0.235161 +0.262711 0.204132 0.106252 0.91474 0.165154 0.368749 +-0.0802751 -0.0657235 0.0930578 -0.499503 -0.846767 0.182979 +-0.174713 0.0528873 0.0940299 -0.873829 -0.323963 0.362589 +-0.163686 0.0240784 0.0907726 -0.871505 -0.413251 0.264014 +0.185861 -0.0425184 0.102612 0.595632 -0.753698 0.27778 +0.285135 0.110866 -0.00779144 0.994038 -0.0884484 -0.0637562 +0.159581 -0.0622871 0.101297 0.566782 -0.754858 0.330072 +0.0177537 0.411532 0.0176725 -0.116451 0.990905 0.0674247 +0.162554 -0.187348 0.086541 0.914134 0.252863 0.31689 +-0.225509 -0.30515 -0.259295 -0.562653 -0.318608 -0.762831 +0.167158 0.294485 0.175171 0.507973 0.44833 0.735502 +-0.0642633 -0.293395 0.100474 -0.726939 -0.0192833 0.686431 +-0.0510902 -0.321408 0.111109 -0.688758 -0.153861 0.708476 +-0.0742657 -0.0582879 0.131982 -0.481029 -0.818027 0.315347 +0.177516 0.233793 -0.200147 0.585808 0.295721 -0.754571 +-0.214392 0.226555 -0.16654 -0.280402 0.177908 -0.943252 +0.170221 0.220008 -0.210812 0.557992 0.258682 -0.788497 +-0.089274 -0.409048 0.0904926 -0.0369251 0.637758 0.769352 +0.018159 -0.308974 -0.232296 0.834174 0.0890013 -0.544272 +-0.118865 -0.420738 0.094082 -0.0896291 0.744328 0.661772 +-0.198423 0.115667 0.081209 -0.928601 -0.158477 0.335538 +0.261776 0.221911 0.0989799 0.902981 0.226561 0.365097 +-0.0821643 -0.496985 0.0504199 -0.0137175 -0.999841 -0.0114024 +-0.169477 -0.461572 0.0931349 -0.764673 -0.0848733 0.638805 +-0.144142 -0.484139 0.100938 -0.339619 -0.635269 0.693609 +-0.151833 -0.495308 0.0684129 -0.219744 -0.967633 0.12409 +-0.0580745 0.18708 -0.248309 -0.347728 0.102229 -0.932006 +0.0658371 0.402896 0.081973 0.050249 0.95366 0.296659 +-0.0908749 -0.494303 0.0979953 -0.114776 -0.901143 0.418053 +0.160533 -0.291112 0.000812704 0.906328 -0.384337 -0.175654 +0.186861 0.338034 0.0979974 0.686966 0.66663 0.289278 +0.253468 0.255705 0.0885048 0.844272 0.421632 0.330804 +-0.225373 0.0367814 -0.163324 -0.964635 -0.249399 -0.0853163 +-0.0407199 -0.498856 0.0802992 -0.0350321 -0.999236 -0.0173353 +0.0305137 -0.351166 -0.203541 0.920369 -0.161155 -0.356301 +0.267081 0.0672401 -0.0718326 0.919197 -0.283446 -0.273379 +0.25898 0.0428741 0.0930772 0.881976 -0.393273 0.259719 +-0.11096 -0.0477881 0.0724989 -0.623099 -0.774354 0.110102 +-0.0706391 0.159029 -0.245519 -0.383035 0.0300334 -0.923246 +0.175259 -0.0544626 0.0922871 0.584573 -0.76201 0.278595 +0.159856 0.240282 -0.210136 0.518733 0.319092 -0.793156 +0.121927 -0.024992 0.21234 0.407999 -0.691255 0.596409 +-0.0366048 0.131814 0.253152 -0.80028 0.329576 0.50093 +0.159718 -0.171857 0.0815978 0.914819 0.280152 0.290897 +-0.0256457 -0.156881 0.0815278 -0.903511 0.357854 0.235813 +0.0180815 -0.373751 -0.215463 0.801485 -0.330613 -0.498313 +0.166854 -0.204924 0.0865302 0.93275 0.172686 0.316474 +-0.0545113 -0.242079 0.102643 -0.768901 0.247048 0.58971 +0.171713 -0.240588 0.0775268 0.961935 -0.0661925 0.265141 +0.165615 -0.272678 0.0745739 0.901283 -0.361263 0.239119 +-0.0773283 -0.26531 0.0842822 -0.690142 0.170456 0.703313 +-0.034784 0.257965 0.218962 -0.256063 0.276696 0.926213 +-0.172274 0.0204634 -0.0759839 -0.708774 -0.702368 -0.0657183 +0.0956277 -0.335562 0.107334 0.49689 -0.675045 0.545358 +0.0485123 -0.40305 0.0955735 0.63787 -0.11869 0.760943 +0.0468956 -0.42321 0.0974396 0.764107 0.0784139 0.640306 +0.0567576 -0.432965 0.0836685 0.843304 -0.0444322 0.535598 +-0.133447 -0.0245796 0.086224 -0.731279 -0.661256 0.167247 +0.235842 -0.00126703 0.0821622 0.767427 -0.60231 0.219723 +-0.0222045 -0.0943109 0.10097 -0.623812 -0.647704 0.437423 +0.00540314 -0.498915 0.0512017 0.00349168 -0.999786 -0.0203725 +-0.0720449 -0.496446 -0.105112 -0.000474417 -0.999996 -0.00269795 +0.225871 0.021751 -0.116327 0.738904 -0.5223 -0.425703 +0.0458448 -0.435608 -0.156527 0.753492 0.461376 -0.468383 +0.0529552 0.398909 0.093505 0.00645408 0.931706 0.363155 +-0.0758015 0.0298932 -0.201823 -0.371363 -0.551566 -0.746903 +-0.0897018 0.368839 0.0675558 -0.503768 0.832795 0.2295 +-0.137731 0.316806 0.0965774 -0.702242 0.618225 0.353064 +-0.103816 -0.151931 -0.0869337 0.141163 0.978218 0.152193 +0.268433 0.203539 0.0912547 0.931444 0.145379 0.333582 +-0.199962 0.166097 0.0850174 -0.952696 0.0451314 0.300557 +-0.19697 0.133887 0.091637 -0.914913 -0.0942209 0.3925 +0.246547 0.00953277 0.071426 0.811219 -0.551228 0.19512 +-0.0143907 -0.225348 -0.22332 0.637624 0.579994 -0.506994 +-0.0123695 -0.497386 -0.138357 -0.0303753 -0.999362 0.0187844 +0.00992574 -0.438349 -0.196122 0.471196 0.248712 -0.846237 +0.148275 -0.141361 0.085856 0.888839 0.265345 0.373574 +0.169741 -0.257391 0.0767145 0.944789 -0.20528 0.255409 +-0.0775058 -0.283898 0.0866823 -0.68831 0.0437101 0.724099 +0.27858 0.0739919 0.0474824 0.969027 -0.227099 0.0970168 +0.0698772 -0.374977 0.0901248 0.591616 -0.452654 0.667154 +0.0619328 -0.393788 0.0865704 0.651082 -0.288015 0.702239 +0.229713 0.285628 0.10442 0.781444 0.540237 0.312233 +-0.139647 -0.266059 0.0530903 -0.00804302 0.338912 0.940784 +-0.0710909 -0.0366709 0.175966 -0.493085 -0.713163 0.498263 +-0.0982194 0.344299 0.112622 -0.554476 0.726944 0.405103 +-0.117256 0.344866 0.0800273 -0.612065 0.730559 0.302754 +-0.0102368 -0.499731 0.101016 0.0127946 -0.999905 0.00511768 +0.123179 0.259235 -0.22262 0.393334 0.380514 -0.836957 +0.214333 -0.0136351 -0.0809335 0.689957 -0.658422 -0.300732 +-0.0549585 0.386989 0.0652124 -0.379199 0.905223 0.191778 +-0.176431 -0.496119 -0.0582907 -0.0714656 -0.997089 0.0265587 +-0.162441 0.284846 0.0936319 -0.806508 0.497464 0.31949 +0.144782 0.286844 0.191587 0.413296 0.332088 0.847882 +0.150782 0.267271 0.194541 0.406413 0.204229 0.890572 +0.277413 0.179747 0.0709666 0.963769 0.0836739 0.253276 +0.187118 -0.0271245 -0.104241 0.573679 -0.728254 -0.374886 +0.280044 0.100521 0.0697344 0.974315 -0.103852 0.199814 +0.0261631 -0.371608 -0.201062 0.87743 -0.291395 -0.381058 +-0.171321 0.0289471 0.0698964 -0.879614 -0.431192 0.200882 +0.14863 -0.123548 0.0740371 0.927575 0.162708 0.336348 +-0.0630703 -0.22975 0.0844098 -0.730565 0.371887 0.57269 +-0.0700925 -0.246107 0.0849911 -0.710552 0.281927 0.644697 +-0.0600819 0.319508 -0.190258 -0.37078 0.651556 -0.661813 +0.132626 0.104944 -0.237943 0.433927 -0.151442 -0.888128 +0.108226 -0.33513 0.0943175 0.579528 -0.671781 0.461366 +0.0950389 -0.358212 0.079263 0.633843 -0.589431 0.500813 +-0.111939 -0.432594 0.107429 0.00806308 0.596067 0.802894 +0.0839997 -0.371178 0.0789932 0.65213 -0.488165 0.580018 +0.076262 -0.388111 0.0758336 0.685291 -0.369026 0.62785 +-0.181521 0.0120629 -0.12211 -0.267785 -0.653473 0.708 +-0.0492565 -0.0100227 0.224906 -0.449501 -0.616354 0.646573 +-0.0507053 -0.407961 0.0971252 -0.591819 0.438882 0.676116 +-0.0566574 0.113661 -0.247493 -0.330629 -0.166268 -0.928999 +0.058771 -0.415368 0.0839389 0.751153 -0.137107 0.645733 +-0.0601367 -0.399127 0.083391 -0.49487 0.275998 0.823971 +0.132442 -0.308504 0.100455 0.675617 -0.607763 0.417332 +-0.131841 -0.411807 0.0798579 -0.162192 0.602975 0.781099 +-0.176679 -0.448963 0.0813044 -0.831899 0.193967 0.519923 +-0.217829 0.126603 0.0271331 -0.728247 0.129045 0.673056 +0.0271015 -0.497275 -0.16142 0.127132 -0.983156 -0.13131 +-0.0229869 -0.163316 0.0984655 -0.868195 0.356389 0.345289 +-0.1007 -0.473706 -0.225317 0.100693 -0.563579 -0.819902 +-0.0565894 0.132484 -0.250122 -0.329273 -0.0896103 -0.939973 +0.00639151 -0.499168 0.0972138 0.0694095 -0.997366 0.0210343 +-0.0778197 -0.496907 0.0835666 -0.0575625 -0.995874 0.0701525 +0.0995373 0.304483 -0.207153 0.316688 0.540611 -0.77939 +0.0991042 0.319272 -0.196296 0.312324 0.593137 -0.742052 +-0.197752 0.20109 0.0780057 -0.956252 0.175442 0.234098 +-0.190608 0.0975277 0.0913764 -0.88513 -0.217235 0.411525 +0.0871815 -0.454594 -0.125958 0.310105 0.248761 -0.91758 +-0.125452 -0.0356431 0.0701995 -0.679411 -0.725879 0.107242 +0.176187 -0.0376852 -0.0984067 0.522778 -0.774582 -0.355985 +0.16907 -0.0707517 0.0616569 0.712494 -0.663591 0.228032 +-0.0253433 -0.102888 0.08331 -0.777066 -0.520982 0.353195 +-0.0203822 -0.119609 0.0796063 -0.924892 -0.188138 0.330423 +-0.102724 -0.496705 0.020341 0.0503183 -0.997277 -0.0539141 +-0.0323364 -0.17233 0.0834096 -0.860936 0.422174 0.283829 +-0.0565727 -0.212824 0.08069 -0.749005 0.447149 0.488927 +0.213773 -0.0233323 0.087806 0.67432 -0.704416 0.221566 +-0.103507 -0.171127 -0.221645 0.216723 0.863019 -0.456321 +-0.0642147 -0.336459 -0.286182 0.262037 -0.174549 -0.949141 +-0.116873 -0.403894 0.0762708 -0.101462 0.530926 0.841322 +-0.0332238 -0.414398 -0.239297 0.483242 -0.512016 -0.710153 +-0.175977 -0.171757 -0.243269 0.260791 0.825038 -0.5013 +0.174912 -0.0282281 -0.118464 0.528114 -0.737032 -0.421757 +-0.142855 -0.00909878 0.0980027 -0.794435 -0.557834 0.240196 +0.0566499 -0.233299 -0.116512 0.579412 0.400335 -0.709939 +0.0528842 -0.472585 0.088449 0.901484 -0.210997 0.377898 +-0.168499 -0.486618 0.07477 -0.630817 -0.710746 0.311303 +-0.0542706 0.338341 -0.172694 -0.372171 0.732747 -0.569711 +0.246623 0.034266 0.118266 0.842587 -0.433977 0.318923 +0.207706 0.324898 0.0728297 0.725949 0.64603 0.235889 +0.232204 0.291438 0.085862 0.769015 0.583597 0.260825 +-0.185582 0.178863 0.11734 -0.868999 0.0189225 0.494452 +0.279293 0.130854 0.0773685 0.970462 0.0177315 0.240601 +-0.202103 0.146938 0.0785469 -0.959021 -0.0221745 0.282467 +0.274968 0.0833887 0.0808968 0.958245 -0.179991 0.222195 +0.216325 -0.0262881 0.068989 0.681842 -0.712591 0.165244 +-0.238094 -0.307206 -0.247739 -0.644434 -0.336414 -0.686681 +-0.196684 0.186874 0.0898298 -0.94513 0.115762 0.305497 +-0.0238388 -0.499533 0.0905143 -0.0203352 -0.999686 -0.0146472 +-0.0232783 -0.129157 0.0619551 -0.988178 -0.0429866 0.147162 +0.169121 -0.195524 0.0718763 0.948707 0.225499 0.221596 +-0.0424991 -0.183407 0.0706783 -0.80115 0.511706 0.310348 +0.22835 0.196829 -0.162601 0.779388 0.15027 -0.608254 +0.201611 0.311129 0.12145 0.694533 0.622701 0.360372 +0.119713 -0.322254 0.0987958 0.609116 -0.663197 0.434911 +0.0343431 0.386403 0.120349 -0.0406326 0.881441 0.470543 +-0.142192 -0.496459 0.0514227 -0.0671773 -0.997663 0.0124943 +-0.027708 -0.499591 0.110933 -0.0342811 -0.999012 0.0282716 +-0.147483 -0.384268 0.0708817 -0.0675397 0.103188 0.992366 +-0.0360255 -0.0274844 -0.164124 -0.304954 -0.751725 -0.584734 +-0.0990015 -0.396393 0.0763902 -0.146973 0.541393 0.827824 +-0.11364 -0.384512 0.0688066 -0.00968647 0.270371 0.962708 +-0.292012 -0.251558 -0.104836 -0.980857 0.17534 0.084704 +0.0262074 -0.497192 0.0980562 0.294301 -0.946301 0.133795 +0.27448 0.199509 0.074645 0.948432 0.0993364 0.301014 +-0.162728 -0.421027 0.0736755 -0.494868 0.386418 0.778323 +-0.0431326 -0.273595 0.123422 -0.730524 0.0339673 0.682042 +-0.305859 0.193524 -0.034963 -0.915688 -0.379653 0.131831 +-0.0829206 -0.343172 -0.288537 0.134449 -0.22122 -0.965912 +-0.132237 -0.49681 0.0718356 -0.0595903 -0.995545 0.0730692 +-0.260709 -0.346175 -0.192303 -0.837003 -0.35524 -0.416211 +-0.021701 0.394024 0.0820623 -0.240625 0.931642 0.272291 +-0.0142014 0.399392 0.0681191 -0.220299 0.951475 0.214857 +0.148344 0.379239 0.0766511 0.514511 0.791285 0.330373 +0.0518872 0.413143 0.0231734 -0.0194462 0.996733 0.0783964 +0.253698 0.266065 0.0722118 0.798255 0.499565 0.336487 +0.28279 0.121001 0.061712 0.982845 -0.0256861 0.182634 +0.0665553 0.413542 0.0181106 0.0180019 0.997481 0.0686054 +0.140148 -0.145406 0.104159 0.813793 0.303258 0.495758 +-0.183814 0.0604011 0.07702 -0.893682 -0.350965 0.279563 +-0.00741194 0.224062 -0.256698 -0.15486 0.213102 -0.964679 +-0.023753 -0.18771 0.117413 -0.809174 0.324349 0.489934 +-0.146527 -0.0101035 0.0808756 -0.796312 -0.581024 0.168223 +-0.231383 -0.40174 -0.194125 -0.758864 -0.436911 -0.482943 +-0.0246924 -0.499012 0.0713185 -0.0201114 -0.999438 -0.0268011 +-0.0339526 -0.166576 0.0642977 -0.860504 0.481448 0.166555 +-0.0323884 0.240243 0.224019 -0.247022 0.190901 0.950019 +0.173117 -0.210654 0.0669211 0.969942 0.146115 0.194586 +-0.0688581 -0.216678 0.0671928 -0.675933 0.494752 0.546201 +-0.0778366 -0.234253 0.0704583 -0.652277 0.399499 0.644155 +-0.0859167 -0.253552 0.0727462 -0.632381 0.275284 0.724095 +-0.0910508 -0.273519 0.0736057 -0.641717 0.107972 0.759303 +0.158378 -0.289356 0.0708154 0.847365 -0.482756 0.221177 +-0.20048 0.16189 -0.174164 -0.428541 -0.0200059 -0.903301 +0.12277 -0.338429 0.0622126 0.725232 -0.624216 0.290504 +-0.121648 -0.315571 0.064099 0.0428523 0.133485 0.990124 +-0.151133 -0.335241 0.0667097 0.0370357 0.121983 0.991841 +-0.166632 -0.322398 0.0650484 -0.052972 0.134093 0.989552 +-0.180546 -0.351887 0.0653097 -0.248306 0.0157999 0.968553 +0.109181 -0.345238 0.0778342 0.64637 -0.645765 0.406441 +-0.0138063 -0.18001 -0.103105 0.26093 0.947325 -0.185716 +0.116798 0.0882365 -0.241526 0.368146 -0.230102 -0.900845 +0.0835879 -0.276816 -0.105572 0.649187 0.013008 -0.760518 +-0.197029 -0.354081 0.0595089 -0.377715 -0.0383993 0.925125 +-0.0433428 -0.493565 -0.191555 0.0328433 -0.834976 -0.549305 +-0.081447 -0.346342 0.0724656 -0.63191 -0.148084 0.760763 +-0.168699 -0.38214 0.0675342 -0.240556 -0.0211616 0.970405 +-0.293196 0.249794 -0.0222389 -0.00595191 0.0803417 0.99675 +0.174438 -0.0361475 0.139586 0.56037 -0.746659 0.35845 +-0.162695 -0.398716 0.0693994 -0.304446 0.0902751 0.948242 +-0.00708132 -0.497785 0.0217931 -0.0321553 -0.995597 -0.0880473 +-0.178108 -0.436397 0.0690151 -0.745095 0.27773 0.606382 +-0.168498 0.0739741 0.115715 -0.750706 -0.174794 0.637093 +0.255375 0.238955 0.101957 0.871414 0.323375 0.368873 +0.0556728 -0.452538 0.0848854 0.898615 -0.0423748 0.436687 +-0.266033 0.275597 -0.132147 -0.489339 0.282089 -0.825211 +-0.0464231 0.0324678 -0.216613 -0.298818 -0.538693 -0.787729 +-0.10335 -0.446324 0.11399 0.111756 0.186998 0.975983 +0.216428 0.294611 0.119981 0.73346 0.571227 0.368422 +0.105871 -0.299167 0.138099 0.454881 -0.564232 0.689003 +-0.287667 -0.276181 -0.17929 -0.954471 -0.218409 -0.203182 +-0.125412 0.32171 0.110442 -0.6555 0.646572 0.390211 +0.220261 0.127015 -0.175725 0.749339 -0.103187 -0.654098 +0.0513381 0.38606 0.121476 0.00754139 0.879547 0.475753 +-0.0694078 0.0818021 -0.23373 -0.381657 -0.31904 -0.867497 +0.00261415 -0.499137 0.115304 0.0838525 -0.992783 0.0857309 +-0.0877437 0.0887112 -0.227522 -0.430198 -0.288544 -0.855378 +0.0615122 -0.00260378 0.250316 0.16982 -0.328268 0.929194 +-0.0251007 -0.148391 0.0676357 -0.946721 0.285135 0.149725 +-0.0572157 -0.198093 0.0630524 -0.711561 0.569012 0.412196 +-0.0961519 0.168276 -0.233119 -0.465282 0.0524068 -0.88361 +-0.15082 -0.318203 0.0642408 0.0474249 0.158876 0.986159 +0.00240618 0.076759 -0.252868 -0.13561 -0.326937 -0.935266 +0.0384601 0.188224 -0.265209 0.0548255 0.115912 -0.991745 +-0.185083 -0.320665 0.0624699 -0.210284 0.105869 0.971891 +-0.171313 0.155711 -0.18782 -0.461011 -0.00525394 -0.887379 +-0.0154419 -0.495593 0.142263 -0.00539853 -0.861931 0.506997 +-0.113386 -0.331379 0.064828 0.0124478 0.0724438 0.997295 +-0.250386 0.131565 -0.108858 -0.812186 -0.519966 -0.264553 +0.1593 -0.152021 0.0556534 0.954917 0.275707 0.110092 +0.145808 0.33248 -0.161462 0.377527 0.582189 -0.72009 +-0.110052 -0.366944 0.0666684 0.0821238 0.132792 0.987736 +-0.102938 -0.347306 0.0641908 -0.0717196 -0.0130724 0.997339 +-0.147745 0.00565275 0.110081 -0.82792 -0.456859 0.325313 +-0.0908065 -0.362922 0.0628198 -0.260871 0.0413035 0.96449 +-0.0932881 0.189452 -0.232334 -0.45365 0.12519 -0.882343 +0.0979683 -0.0666031 -0.112823 0.233407 -0.867128 -0.440012 +-0.0962866 -0.311024 -0.294916 0.0702199 -0.0647252 -0.995429 +0.230243 0.00694942 0.116826 0.766675 -0.563937 0.306896 +-0.0941258 0.212329 0.199393 -0.507256 -0.0266787 0.861382 +0.245205 0.161888 0.149791 0.74979 0.130669 0.648646 +0.117899 0.107718 -0.245194 0.384828 -0.145113 -0.911509 +-0.175594 0.185591 -0.184553 -0.401971 0.085691 -0.911634 +-0.0497914 -0.496358 -0.132246 -0.0076379 -0.999724 0.0222294 +-0.108593 0.176758 -0.22554 -0.500018 0.0812455 -0.862196 +0.0286238 0.174554 -0.266703 0.00443745 0.0680128 -0.997675 +0.00936686 -0.499244 0.0674296 0.0261414 -0.999623 -0.00842851 +0.256652 0.0225358 0.0632131 0.858698 -0.485589 0.163834 +-0.228662 0.181675 -0.00674231 -0.314523 0.37886 0.870368 +-0.0379448 -0.195774 -0.211229 0.531 0.733552 -0.424193 +0.0185221 -0.498134 -0.00484222 -0.159526 -0.984829 -0.0682885 +-0.193462 0.229972 0.067105 -0.947764 0.262897 0.180633 +0.279493 0.195374 0.0577585 0.969744 0.0425726 0.240382 +0.27048 0.0543893 0.0657234 0.929332 -0.322699 0.179465 +0.161894 0.344752 0.128573 0.551834 0.710115 0.437282 +-0.177117 -0.139883 -0.139294 -0.173121 0.982775 -0.064664 +0.179603 -0.0577503 0.0721974 0.632805 -0.741017 0.224613 +-0.0693802 -0.0773184 0.0593165 -0.506693 -0.85847 0.0793133 +-0.0505108 -0.0878642 0.0626848 -0.527081 -0.839494 0.132045 +-0.157343 0.212781 -0.188477 -0.467942 0.215133 -0.857174 +-0.0814495 -0.39737 0.0777716 -0.0918619 0.479461 0.872742 +0.0316154 -0.4554 0.131164 0.770003 0.133455 0.623927 +0.194499 0.000492389 -0.136458 0.614958 -0.620089 -0.48715 +0.166842 -0.18153 0.0644075 0.946114 0.27162 0.176327 +-0.0837858 -0.222396 0.0560195 -0.55798 0.526905 0.641116 +-0.000838205 0.0590895 -0.245196 -0.166067 -0.411648 -0.896085 +-0.0933636 -0.241306 0.0608869 -0.557703 0.387493 0.734041 +0.138576 -0.28604 0.118113 0.703374 -0.476529 0.527433 +-0.140515 -0.285835 0.0578326 -0.0250511 0.214048 0.976502 +-0.153814 0.00633526 0.0926834 -0.842437 -0.481337 0.242103 +-0.154145 -0.298886 0.0608261 0.0219261 0.199424 0.979668 +0.21034 0.0102701 -0.127117 0.677905 -0.574758 -0.458365 +-0.172503 -0.306873 0.0623211 -0.0807516 0.171738 0.981828 +0.191009 -0.0130494 0.157931 0.614265 -0.674716 0.40919 +0.274464 0.117284 0.0954263 0.958612 -0.0208943 0.283949 +-0.130771 -0.370556 0.06842 0.0691166 0.112708 0.991221 +-0.195069 0.342052 -0.0741485 0.192312 0.946622 -0.258693 +0.16611 0.271543 -0.190967 0.528643 0.409529 -0.74352 +-0.0912497 -0.328818 0.0657544 -0.487462 -0.0476269 0.871844 +-0.208396 -0.33738 0.0552641 -0.414271 -0.00870353 0.910112 +0.251678 0.108135 -0.127468 0.860038 -0.1208 -0.495724 +0.0988463 -0.368332 0.0632079 0.71999 -0.490423 0.491019 +-0.189411 -0.385712 0.0599461 -0.412714 -0.119395 0.903002 +-0.180132 -0.399013 0.0626596 -0.427937 -0.050201 0.902413 +0.0185136 0.242827 -0.254205 -0.0229411 0.303882 -0.952433 +-0.179703 -0.476355 0.0613296 -0.828716 -0.493116 0.264702 +0.0445939 0.408104 0.0609389 -0.0267953 0.980551 0.194428 +0.0958909 -0.483935 0.0149691 0.550666 -0.574335 0.605728 +-0.0302803 0.380751 0.110508 -0.276196 0.872035 0.404067 +0.129528 0.394454 -0.100413 -0.0958983 0.860799 -0.499828 +0.165906 0.37113 0.0657319 0.605653 0.732455 0.310958 +0.221498 0.312892 0.0624982 0.7324 0.640491 0.230999 +-0.103186 0.317889 -0.161871 -0.484259 0.674242 -0.557577 +0.0154419 0.409793 -0.0428356 -0.123086 0.982224 -0.141723 +0.0301468 -0.0704789 0.170189 -0.0311723 -0.911978 0.409054 +-0.208911 0.158448 0.0461209 -0.986061 0.0525471 0.157866 +-0.208609 0.126129 0.0470482 -0.952011 -0.0376778 0.303737 +-0.15788 0.103267 0.130212 -0.663042 -0.156819 0.731972 +0.258731 0.0985194 0.13472 0.902849 -0.0641811 0.42514 +-0.0566211 -0.0855938 0.0465232 -0.536719 -0.842745 0.0414076 +-0.0262953 -0.120855 0.0326388 -0.960091 -0.279394 -0.0128165 +0.177588 -0.233631 0.0466775 0.998583 -0.0181884 0.0500199 +-0.101212 -0.259814 0.0631259 -0.580319 0.218629 0.784494 +-0.173677 -0.416734 0.0658401 -0.511413 0.131762 0.849174 +0.0593571 0.07619 -0.253383 0.123052 -0.320256 -0.939305 +-0.270954 0.184219 -0.123881 -0.785381 -0.304157 -0.539133 +0.045793 -0.119934 0.142716 -0.190506 0.352686 0.916144 +0.0195155 0.159468 -0.267096 -0.0529703 0.0122748 -0.998521 +0.17218 -0.264014 0.0566157 0.954122 -0.271307 0.126662 +-0.127638 -0.29706 0.0611814 0.0158394 0.193964 0.980881 +0.166399 -0.279667 0.0550078 0.901826 -0.413678 0.124821 +-0.109285 0.365114 -0.0335622 -0.477138 0.87315 -0.0997456 +-0.201624 -0.292531 0.0532622 -0.334364 0.201995 0.920543 +0.190005 0.412681 -0.105581 -0.257072 0.580005 -0.772986 +0.109846 -0.499017 -0.0604664 0.00183563 -0.999833 0.01819 +0.0282332 -0.291901 -0.204389 0.931532 0.222027 -0.288015 +-0.212203 -0.307388 0.0513879 -0.419027 0.132288 0.898285 +-0.215885 -0.373333 0.0473101 -0.549607 -0.180455 0.815701 +0.280062 0.0876521 0.058722 0.974586 -0.172621 0.142774 +-0.0398245 0.322387 -0.197832 -0.306992 0.652845 -0.692495 +0.165915 0.185808 -0.221734 0.531528 0.122215 -0.838177 +0.0599903 -0.487368 0.0593987 0.705 -0.620325 0.343762 +0.136459 0.396077 0.0550409 0.356613 0.823701 0.440844 +0.0280515 0.376748 0.136381 -0.0571826 0.845018 0.531672 +-0.202029 0.194988 0.0619462 -0.971956 0.163159 0.169355 +-0.263112 -0.39659 -0.113467 -0.895197 -0.423472 -0.138903 +0.273954 0.0568592 0.0464228 0.946074 -0.311752 0.088062 +-0.060337 0.253088 -0.232839 -0.374192 0.320279 -0.870288 +-0.265587 -0.396856 -0.0574534 -0.89023 -0.449004 0.0767181 +0.248589 0.00741855 0.0533856 0.818077 -0.565213 0.106225 +0.195763 0.257915 -0.173847 0.633785 0.340446 -0.69456 +0.158352 -0.0877403 0.0552997 0.869301 -0.444318 0.216556 +-0.0279157 -0.109407 0.0652386 -0.872185 -0.44037 0.212996 +-0.19154 0.22997 -0.171396 -0.243079 0.237867 -0.940389 +0.11118 0.380312 0.115724 0.293775 0.850654 0.435987 +-0.0598943 -0.190472 0.045257 -0.627723 0.694749 0.351124 +-0.0712876 -0.205563 0.0521628 -0.60861 0.623529 0.49072 +0.00725933 -0.0239883 -0.186531 -0.173734 -0.720841 -0.670973 +-0.194853 -0.161004 -0.238759 0.489844 0.804209 -0.336602 +-0.00933059 -0.197255 -0.162223 0.613543 0.741492 -0.271579 +-0.23263 0.0862933 -0.116513 -0.769829 -0.273174 0.576835 +-0.138207 -0.310731 0.0619899 -0.0159035 0.143461 0.989528 +0.157521 -0.237146 -0.0320833 0.857377 0.0436926 -0.512831 +-0.190032 -0.276389 0.0526156 -0.219439 0.289404 0.931714 +-0.213761 -0.225017 -0.287038 -0.0134347 -0.0459182 -0.998855 +0.11037 -0.3537 0.0614856 0.725832 -0.569898 0.385206 +0.139637 -0.189149 0.1295 0.766808 0.259223 0.587204 +0.16632 0.148305 0.193368 0.410034 0.208529 0.887912 +0.127547 -0.0530354 -0.119385 0.345825 -0.834822 -0.428342 +0.114894 0.347265 -0.163371 0.314569 0.682173 -0.660065 +-0.0520566 -0.227543 -0.258184 0.428948 0.556401 -0.711633 +-0.186576 -0.469872 0.0486393 -0.850194 -0.427526 0.307234 +0.0681821 -0.471218 0.0569368 0.839057 -0.225252 0.495223 +0.18981 0.43471 -0.0844112 -0.411753 0.705967 -0.576255 +0.265226 0.0406549 -0.0336463 0.898355 -0.417016 -0.138042 +-0.0978368 -0.496552 0.0794379 -0.0202602 -0.996693 0.0786927 +-0.128235 0.267945 0.161787 -0.636545 0.375565 0.673618 +0.056735 -0.495534 0.0406154 0.323354 -0.926465 0.192627 +0.0775824 0.406123 0.0661425 0.0810739 0.969394 0.231739 +0.109121 -0.0569559 -0.12539 0.279098 -0.850154 -0.446477 +0.181375 0.359383 0.0582934 0.692402 0.662626 0.285494 +-0.137504 0.336594 0.0544315 -0.668672 0.698307 0.255431 +-0.0183009 0.399263 -0.0621071 -0.26509 0.943345 -0.199569 +0.252768 0.277784 0.0556571 0.7182 0.579612 0.385017 +-0.0124842 -0.176928 0.127728 -0.766298 0.31589 0.559465 +0.274723 0.271001 0.0405634 0.387593 0.479185 0.787498 +-0.143819 0.233668 0.160764 -0.681484 0.195314 0.705288 +0.27429 0.246081 0.055966 0.764498 0.274351 0.58333 +0.11983 0.153497 0.211554 0.457206 0.413013 0.787644 +0.0713249 -0.498609 -0.0301588 0.0189439 -0.999577 0.0220622 +0.066813 0.269532 0.221362 0.13252 0.279974 0.950817 +0.282836 0.18958 0.0417192 0.990225 0.00816867 0.139238 +0.0740798 -0.262241 0.170079 0.180256 -0.26189 0.948115 +-0.178345 -0.141341 -0.117839 -0.190356 0.973941 0.123301 +-0.0284014 -0.179356 0.101759 -0.845666 0.365686 0.388746 +0.156718 -0.139762 0.0418352 0.974971 0.220402 0.0292246 +-0.0244178 -0.133909 0.0434984 -0.999875 -0.00152515 0.0157532 +-0.0449904 0.350182 -0.16284 -0.355411 0.773548 -0.524697 +0.10628 -0.151854 0.144562 0.517484 0.369644 0.771734 +0.0890301 0.276952 -0.227496 0.283836 0.444678 -0.849528 +-0.252503 0.306718 -0.12299 -0.267969 0.531427 -0.803603 +-0.221009 -0.322531 0.0485689 -0.498238 0.0481092 0.865704 +-0.222969 -0.430063 -0.181053 -0.767959 -0.449599 -0.45618 +-0.196441 -0.402869 0.0532746 -0.553788 -0.183072 0.812283 +0.0752385 -0.432953 0.0556629 0.795274 -0.187909 0.576394 +-0.213084 -0.418912 0.0323002 -0.70434 -0.326378 0.630383 +-0.279417 0.290526 -0.117818 -0.546845 0.308225 -0.778433 +-0.164408 -0.493543 0.0548734 -0.411461 -0.904836 0.109412 +-0.0415357 -0.499028 0.101062 -0.0634617 -0.997815 0.0184017 +0.264836 0.262893 0.0553555 0.663207 0.507168 0.550397 +-0.0355566 -0.0885457 0.0918445 -0.514103 -0.797319 0.316198 +0.116013 -0.0635155 -0.10752 0.30832 -0.850514 -0.426103 +-0.116222 -0.47339 -0.226245 -0.0163659 -0.560874 -0.827739 +-0.17857 0.0460918 -0.198347 0.104079 0.0853965 -0.990896 +0.168916 0.376509 0.0486374 0.637637 0.614122 0.465052 +-0.140267 -0.166421 -0.223953 0.0973515 0.892236 -0.44095 +0.103159 -0.0734548 -0.0961175 0.267202 -0.843138 -0.466606 +-0.15912 0.244976 -0.176697 -0.40234 0.365174 -0.839506 +0.261511 0.280937 0.0404047 0.465808 0.591457 0.658181 +0.180454 0.0575732 -0.193912 0.596718 -0.314534 -0.738238 +0.285535 0.156035 0.0298516 0.996329 0.0578798 0.0630828 +-0.213724 0.109911 0.0324045 -0.825179 -0.146179 0.54563 +0.26824 0.0387442 0.0173914 0.913121 -0.407665 0.00431391 +0.268503 0.0416643 0.0378048 0.916065 -0.397468 0.0533322 +0.31929 0.320229 -0.0378763 0.965886 -0.184818 -0.181401 +0.237428 -0.00964724 0.0256757 0.766807 -0.641567 0.0199638 +-0.133532 -0.0299337 0.0514774 -0.706725 -0.705471 0.0533869 +-0.076963 -0.169102 -0.197802 0.335639 0.890783 -0.306354 +-0.193878 -0.153735 -0.216904 0.383074 0.903169 -0.19375 +0.284471 0.177119 0.0250551 0.997897 0.0291815 0.0578738 +-0.0152857 -0.0549261 -0.132637 -0.232115 -0.843123 -0.485043 +0.13569 0.165871 0.20205 0.370507 0.198274 0.90742 +-0.206011 -0.463642 -0.175952 -0.738219 -0.484763 -0.469081 +0.175942 -0.213921 0.0501633 0.987957 0.135992 0.0738098 +0.13683 -0.254368 -0.0583531 0.709294 -0.00783031 -0.704869 +-0.102633 -0.231712 0.0491472 -0.462256 0.458961 0.758732 +-0.258985 -0.224627 -0.270575 -0.569961 -0.354006 -0.741501 +-0.293712 -0.0998587 -0.240375 -0.884929 0.375307 -0.275762 +0.206151 -0.0175784 0.121967 0.653933 -0.690509 0.309143 +-0.149006 -0.250678 0.0455367 -0.0245522 0.447017 0.894188 +0.289294 0.462905 -0.0560717 0.515662 0.559878 -0.64856 +-0.218992 -0.291793 0.0451517 -0.460293 0.190893 0.867 +0.154368 -0.306062 0.0331469 0.853281 -0.517774 0.0618242 +-0.0313713 -0.496934 -0.173031 -0.0161888 -0.995935 -0.0886107 +0.114741 -0.303852 -0.074414 0.713025 -0.167103 -0.680935 +-0.201177 -0.43564 0.0391518 -0.777633 -0.20496 0.594373 +0.081282 -0.446674 0.043543 0.77489 -0.156056 0.612529 +0.0706326 -0.482948 0.045212 0.711273 -0.521766 0.47101 +-0.0891941 -0.0504143 0.127283 -0.545372 -0.783999 0.296504 +0.249768 0.0929692 0.151216 0.870372 -0.0756088 0.486556 +-0.141484 0.294131 0.123049 -0.723951 0.536662 0.433461 +0.070442 0.412221 0.0351312 0.0344094 0.992975 0.113207 +0.153704 0.411838 0.034081 -0.0894173 0.626908 0.773945 +0.0684615 0.385587 0.121303 0.0666775 0.879154 0.47185 +-0.127196 -0.494929 -0.199065 -0.0705094 -0.95238 -0.296649 +-0.149112 0.00211449 -0.0872195 -0.625238 -0.770931 -0.121419 +0.191997 0.352862 0.0455047 0.72323 0.619785 0.30464 +0.202303 0.339651 0.04949 0.725533 0.637324 0.259655 +-0.0161251 0.125213 0.277874 -0.583951 0.0877318 0.807034 +-0.0448203 -0.0575321 -0.109348 -0.334279 -0.845214 -0.416979 +0.083216 -0.0756643 -0.102436 0.183541 -0.862767 -0.471112 +0.279169 0.0718781 0.031978 0.969778 -0.240753 0.0395962 +0.0416162 -0.347855 -0.156575 0.995899 -0.00824192 -0.0900922 +0.171781 -0.194653 0.0538926 0.969212 0.226366 0.0968862 +0.089633 -0.30036 0.146274 0.358659 -0.548756 0.755136 +-0.122376 -0.236229 0.0411327 -0.296523 0.448326 0.843254 +-0.114654 -0.220851 0.0355847 -0.341528 0.549196 0.76272 +-0.177338 -0.233114 0.0339817 -0.109728 0.523997 0.844622 +0.0442267 -0.137328 -0.0585726 -0.203727 0.0586302 -0.977271 +-0.204324 -0.248032 0.0362825 -0.317254 0.445622 0.837121 +-0.210969 -0.0234806 -0.14628 0.0164869 -0.413205 0.910489 +-0.232227 -0.336601 0.0412834 -0.608461 -0.0356948 0.792781 +0.168651 -0.0220978 -0.135671 0.507398 -0.708425 -0.490593 +0.122617 -0.346784 0.0449563 0.791956 -0.550505 0.264101 +-0.241559 -0.35085 0.0318267 -0.68899 -0.130609 0.712905 +-0.0644554 -0.0708743 0.107334 -0.436523 -0.872857 0.218101 +0.11768 0.322387 -0.185193 0.358523 0.599078 -0.715938 +-0.195574 -0.466561 0.0324266 -0.809896 -0.461851 0.36161 +-0.0203445 0.345067 -0.182119 -0.238112 0.737007 -0.632553 +0.0712808 -0.492437 0.0312361 0.470372 -0.807453 0.356049 +-0.0760281 0.305589 0.17783 -0.442958 0.540489 0.715304 +0.0849413 0.344465 -0.179436 0.251907 0.691787 -0.676738 +0.13836 0.404486 0.0402776 0.0858422 0.816249 0.571287 +-0.0281952 -0.241921 0.135636 -0.717231 0.140318 0.682561 +-0.210609 0.00523563 -0.135441 -0.355875 -0.271935 0.894094 +0.252473 0.112438 0.147502 0.863974 0.0203682 0.503124 +0.171227 0.406417 0.0340188 0.279338 0.207594 0.937483 +0.0939795 -0.0553695 0.183851 0.283721 -0.858991 0.426189 +-0.129839 0.347171 0.0402719 -0.609188 0.768546 0.195516 +0.102373 -0.455136 0.0191046 0.684465 -0.129683 0.717419 +0.0868131 0.0139458 -0.218121 0.208872 -0.532569 -0.820209 +-0.0845612 0.272466 -0.212102 -0.454114 0.426206 -0.782387 +0.0981987 -0.285133 0.152474 0.382912 -0.471947 0.794131 +-0.201018 -0.375061 -0.245125 -0.561541 -0.383039 -0.733453 +0.292653 0.271721 0.0342615 0.541178 0.189625 0.819249 +-0.181836 -0.37874 -0.256427 -0.483918 -0.361669 -0.796881 +0.287328 0.223535 0.0365723 0.940155 -0.185313 0.285951 +-0.211512 0.160913 0.0254296 -0.955862 0.13636 0.260257 +-0.0955608 0.282458 -0.198957 -0.484454 0.486799 -0.726864 +-0.0892555 -0.0276035 0.168627 -0.586651 -0.641643 0.494099 +-0.150029 -0.0133023 0.024168 -0.749083 -0.662458 -0.00495592 +0.0112609 -0.0771021 -0.100871 -0.137507 -0.881783 -0.451166 +-0.166685 0.258595 -0.16717 -0.288137 0.459001 -0.840414 +0.185094 -0.059872 0.0319396 0.662606 -0.747953 0.0389759 +-0.0645096 -0.0809324 0.0288447 -0.526176 -0.849991 -0.0255729 +0.159459 -0.0890395 0.0356881 0.897375 -0.441077 0.0130047 +-0.300915 -0.115515 -0.233142 -0.955188 0.239196 -0.17436 +-0.0854707 -0.208344 0.0409152 -0.453048 0.673083 0.584557 +0.0413163 -0.366163 -0.149564 0.980247 -0.0870525 -0.177591 +0.176925 -0.23813 0.0299273 0.996372 -0.0478034 -0.0704075 +0.17552 -0.253109 0.0426004 0.985158 -0.16991 0.0243819 +-0.000791848 -0.494518 0.00317354 -0.0671673 -0.985686 -0.154636 +-0.0522422 0.351234 0.145895 -0.351443 0.751318 0.558577 +0.105058 0.025903 -0.219747 0.282523 -0.477734 -0.831836 +-0.0838496 0.347573 0.124591 -0.496953 0.736081 0.45959 +0.0968716 -0.19636 0.165907 0.363871 0.184426 0.913009 +-0.113431 0.33798 0.101242 -0.607398 0.704349 0.36737 +-0.010929 -0.497395 -0.168036 -0.0122569 -0.998929 -0.0446054 +-0.0304269 -0.174229 -0.0962542 0.306815 0.945417 -0.10978 +0.184398 0.423559 0.0292399 0.154689 0.160264 0.974878 +0.114566 0.370097 0.1313 0.307078 0.806947 0.504519 +-0.111081 0.10938 -0.220446 -0.499848 -0.191089 -0.84477 +0.164698 0.428046 0.026711 -0.283489 0.588127 0.757457 +0.283433 0.110278 -0.0267514 0.990555 -0.0857623 -0.106988 +-0.29291 0.286757 -0.107751 -0.686311 0.189258 -0.702252 +0.00449469 0.408217 0.0329803 -0.160024 0.981775 0.102517 +-0.117136 0.357063 0.0393478 -0.570096 0.806019 0.159134 +-0.16156 0.321573 0.028348 -0.711913 0.596949 0.369908 +-0.0307002 -0.49809 0.133035 -0.152223 -0.92476 0.34878 +-0.171942 0.308838 0.024578 -0.797128 0.428208 0.425706 +-0.00400711 -0.163296 0.13173 -0.733761 0.321774 0.598378 +0.248446 0.293362 0.039619 0.601755 0.642433 0.474522 +0.137983 -0.0266679 0.197813 0.45051 -0.724488 0.521687 +0.0888763 -0.0851359 0.137753 0.326737 -0.529268 0.783019 +-0.0325068 -0.475503 -0.201365 0.00711507 -0.361107 -0.932497 +0.286595 0.142313 0.0172792 0.999496 0.0266773 0.017194 +-0.210686 0.14247 0.0369573 -0.956908 0.0919413 0.27545 +-0.121603 0.0945276 -0.210053 -0.504959 -0.249868 -0.826186 +0.191916 0.280818 0.164087 0.605598 0.417045 0.677735 +-0.202624 0.0756407 0.02941 -0.835338 -0.457705 0.304494 +-0.139325 -0.0241225 0.0151226 -0.698136 -0.714203 -0.0501902 +0.0513552 0.337204 -0.1958 0.129837 0.677181 -0.724271 +-0.108815 0.158259 -0.226503 -0.501242 0.0178018 -0.865124 +-0.0274866 -0.114606 0.0500433 -0.925682 -0.371396 0.0719585 +-0.0535407 0.12275 0.226474 -0.851696 0.30457 0.42644 +-0.13873 0.0161522 0.138658 -0.804946 -0.305765 0.508498 +-0.2739 -0.0766493 -0.252835 -0.668439 0.536939 -0.51467 +0.241494 0.224681 0.13753 0.792909 0.239404 0.560339 +-0.0486348 -0.176992 0.0353646 -0.630236 0.750965 0.197111 +-0.0742119 -0.195965 0.034308 -0.500458 0.743878 0.442931 +-0.20471 -0.465191 0.0105851 -0.812236 -0.49143 0.314276 +0.175182 -0.223302 0.0160606 0.981406 0.0815759 -0.173744 +-0.235087 -0.288738 0.0344974 -0.584239 0.187588 0.789605 +-0.229086 -0.305224 0.0417801 -0.54764 0.122145 0.82775 +0.0690307 0.340876 -0.188146 0.197716 0.684547 -0.701643 +0.230884 0.230621 0.14852 0.728946 0.237633 0.642004 +-0.105164 -0.156518 -0.181791 0.218981 0.953959 -0.204962 +-0.132507 0.293017 0.137779 -0.682055 0.524435 0.509675 +0.137955 -0.0160569 0.211036 0.450138 -0.651054 0.611151 +0.0133711 -0.498336 0.0144034 -0.0555589 -0.997089 -0.0522255 +0.00296378 0.0317147 -0.230756 -0.170638 -0.520941 -0.836363 +0.197024 0.440878 0.0256069 0.049798 0.225121 0.973057 +0.0926889 -0.0176267 0.233887 0.266706 -0.490144 0.829835 +0.0867875 -0.428707 0.0421997 0.754132 -0.213902 0.620911 +0.120468 0.411383 0.0255196 -0.0546458 0.960368 0.273327 +-0.0340192 0.357805 0.146989 -0.2737 0.774092 0.57085 +0.0121789 0.339988 -0.195202 -0.0633249 0.706464 -0.704911 +0.145688 -0.304458 -0.0287185 0.860055 -0.357983 -0.363531 +0.162489 -0.0419846 -0.107267 0.466752 -0.796215 -0.384947 +0.215517 0.328879 0.0385864 0.714152 0.631143 0.302731 +0.23795 0.322119 0.0164532 0.39606 0.560618 0.727217 +0.281207 0.302467 0.0251084 0.0295861 0.377727 0.925444 +0.133818 -0.111991 -0.0309563 0.795912 -0.197612 -0.572253 +-0.292179 0.190132 -0.0890547 -0.852329 -0.387955 -0.350751 +0.292282 0.227656 0.0180558 0.943885 -0.301963 0.133786 +0.148239 -0.221814 0.127911 0.812516 0.0713707 0.578554 +0.0202619 0.351953 -0.18306 -0.0315396 0.757699 -0.651841 +0.0813615 -0.217705 -0.0911776 0.444344 0.377261 -0.812547 +-0.0221534 -0.0944315 -0.0457067 -0.452332 -0.778429 -0.435252 +0.154104 0.0483736 -0.208239 0.483079 -0.372012 -0.792617 +-0.00563516 -0.197504 0.145335 -0.669765 0.254098 0.697745 +-0.186815 0.0419848 0.0214317 -0.87192 -0.467925 0.144226 +-0.181446 0.0291749 0.00477181 -0.84528 -0.531156 0.0580861 +0.153981 -0.124718 0.0318642 0.995821 0.0843752 -0.0349538 +0.0532495 0.350647 -0.18194 0.122567 0.732757 -0.669361 +0.170942 -0.222041 0.0808179 0.956361 0.0628486 0.285349 +-0.00927577 -0.0732213 0.154297 -0.189154 -0.900948 0.390529 +-0.0723318 -0.41484 0.0884432 -0.106794 0.641471 0.759678 +0.2189 0.0869353 0.192801 0.707469 0.0523236 0.704805 +-0.0630878 -0.183862 0.0253649 -0.511652 0.805494 0.298984 +-0.195899 -0.478964 -0.174787 -0.64702 -0.615247 -0.450373 +0.226693 0.0230864 0.147768 0.773722 -0.488918 0.402882 +-0.140708 -0.236291 0.0380549 -0.072416 0.488523 0.869541 +-0.222598 -0.255292 0.0316203 -0.463689 0.381033 0.799879 +-0.245942 -0.300665 0.0276276 -0.681168 0.112973 0.723359 +-0.236708 -0.31833 0.0376019 -0.626257 0.0435084 0.778402 +-0.249028 -0.317633 0.026459 -0.706288 0.033424 0.707135 +-0.255548 -0.34901 0.0169997 -0.77558 -0.148138 0.613621 +-0.0197614 0.0303455 0.267963 -0.241878 -0.40945 0.879685 +-0.186528 0.125096 0.109253 -0.823541 -0.144849 0.548451 +-0.0987861 0.144429 -0.23209 -0.474091 -0.0308108 -0.879936 +-0.131227 0.0636624 0.15158 -0.611134 0.0442546 0.790289 +-0.131763 0.0438137 0.151838 -0.726229 0.0449511 0.685982 +-0.296929 -0.202313 -0.232721 -0.907805 -0.281414 -0.310961 +0.233233 0.212797 0.150953 0.693924 0.157691 0.702569 +-0.0324432 0.270315 -0.235844 -0.261704 0.404329 -0.876373 +-0.154443 0.217339 0.154381 -0.711787 0.124476 0.691278 +0.126505 0.35792 0.141534 0.363819 0.755898 0.544292 +0.0372008 -0.308314 0.155396 0.0471595 -0.4699 0.881459 +-0.235539 0.123419 -0.163057 -0.738411 0.595642 -0.316165 +-0.0159222 -0.496973 -0.122923 -0.0316775 -0.999479 0.00612031 +-0.28701 -0.101419 -0.189925 -0.716694 0.154382 0.680086 +0.124904 -0.234166 0.153954 0.62699 -0.0417873 0.777906 +0.229999 0.316751 0.0313785 0.65585 0.633106 0.411142 +0.0634142 -0.125806 0.147153 0.0161488 0.408884 0.912444 +0.0692497 -0.144088 0.155257 0.0830726 0.412187 0.907304 +0.0470979 0.309597 -0.218885 0.127365 0.569378 -0.81215 +-0.0234278 -0.0572384 0.180336 -0.269389 -0.834595 0.480501 +-0.0990289 -0.00537382 -0.154584 -0.408174 -0.731032 -0.546797 +-0.209405 -0.158763 -0.0804877 -0.323911 0.922063 0.211854 +0.137574 0.111494 0.244267 0.539317 0.577844 0.612563 +-0.031617 -0.370288 -0.263226 0.454594 -0.335013 -0.825294 +-0.00506031 -0.091051 0.12311 -0.428137 -0.669999 0.606465 +0.244064 0.125999 0.158228 0.773959 0.11912 0.621931 +0.245416 0.179415 0.145945 0.7637 0.135628 0.631164 +0.069183 -0.422017 0.0679759 0.78947 -0.207955 0.577487 +-0.235393 0.121497 0.0167888 -0.544494 -0.0505982 0.837237 +-0.0356744 0.146136 0.240569 -0.772626 0.438147 0.45943 +-0.230688 -0.0789284 -0.263277 0.532438 0.216278 -0.818373 +0.271231 0.0498125 -0.0172383 0.927802 -0.363462 -0.0841423 +0.0745687 0.103603 -0.258441 0.209405 -0.20079 -0.956992 +0.0489977 -0.474638 -0.172161 0.757975 -0.132197 -0.638747 +0.156937 -0.144477 0.0229679 0.965976 0.228983 -0.120236 +-0.0228534 -0.139202 0.00159545 -0.970575 0.0856048 -0.225067 +-0.182528 -0.47772 -0.192372 -0.573847 -0.604418 -0.55261 +-0.0909076 -0.19785 0.023078 -0.30719 0.780917 0.543877 +-0.187075 -0.219596 0.0236994 -0.179686 0.58509 0.790812 +0.0486422 -0.453011 -0.167615 0.776898 0.289048 -0.559357 +-0.206201 -0.221477 0.0183767 -0.3359 0.566243 0.752689 +-0.236572 -0.271276 0.0281458 -0.592425 0.264142 0.761093 +0.174345 -0.257548 0.0248695 0.979404 -0.185046 -0.0807841 +-0.0469772 0.008258 -0.19762 -0.306771 -0.632319 -0.711382 +0.115337 -0.371688 0.0271932 0.89184 -0.311533 0.327977 +-0.247822 -0.377833 0.0154037 -0.761156 -0.298892 0.575592 +0.111885 -0.390199 0.0236157 0.881179 -0.205296 0.425884 +0.152945 0.154397 -0.231367 0.484251 0.000740773 -0.874929 +0.0930185 -0.469418 0.0254919 0.692074 -0.24187 0.680098 +0.0994655 -0.468137 -0.123441 0.189274 -0.0123898 -0.981846 +0.0362969 -0.37499 -0.167465 0.945547 -0.209567 -0.249043 +-0.219043 -0.157555 -0.107423 -0.396492 0.905023 0.154039 +0.203673 0.302523 -0.146719 0.470944 0.260824 -0.842723 +0.139349 -0.0419292 -0.130581 0.381207 -0.804571 -0.455354 +-0.186337 -0.490199 -0.00878823 -0.433221 -0.885662 0.1671 +-0.0453985 -0.0644137 -0.0942964 -0.35414 -0.854003 -0.381136 +0.200618 0.290621 0.148026 0.656954 0.495384 0.568337 +-0.124692 -0.496369 0.0182181 -0.0192641 -0.999741 -0.0121098 +0.0252219 0.357038 0.162767 -0.0580003 0.765367 0.640975 +-0.0940768 -0.1883 -0.243407 0.274374 0.725974 -0.630619 +0.305863 0.47144 -0.025072 0.8286 0.549785 -0.105637 +-0.0527936 -0.449304 -0.225084 0.405687 -0.537494 -0.739268 +0.225038 0.446383 0.0164372 0.323855 -0.134709 0.936467 +0.127962 0.288922 0.198372 0.360062 0.342524 0.867775 +0.21797 0.415213 0.0121421 0.407037 -0.187786 0.8939 +-0.0600439 0.391144 0.0115149 -0.392247 0.919363 0.0302212 +-0.290718 0.167546 -0.0159025 -0.80206 -0.303758 0.514228 +0.192186 0.380715 0.0208386 0.602283 0.0958123 0.792512 +-0.14251 0.343484 -0.0641094 -0.280721 0.929699 -0.238445 +0.19534 0.360839 0.026233 0.712038 0.450307 0.538726 +0.211641 0.34819 0.0168995 0.609804 0.457639 0.647075 +-0.259314 -0.331159 0.0155576 -0.791262 -0.0437165 0.609912 +0.0170081 -0.133428 0.136172 -0.544062 0.378261 0.748942 +0.0092533 -0.254834 -0.218992 0.807577 0.40963 -0.42429 +0.243086 0.306582 0.0276503 0.499522 0.641691 0.581988 +0.301938 0.308717 0.0202569 0.456112 0.219125 0.862523 +-0.244864 -0.0672825 -0.264046 -0.0122099 0.511962 -0.858921 +0.261391 0.155505 0.124494 0.900387 0.095856 0.424398 +0.295658 0.289584 0.0281053 0.449276 0.205917 0.869339 +0.308692 0.292942 0.0158153 0.826222 -0.021202 0.562946 +0.183128 -0.0423505 -0.0755284 0.551854 -0.775051 -0.30782 +0.219718 0.0442194 0.178987 0.766253 -0.337777 0.546592 +0.155681 0.223135 -0.21924 0.498509 0.271552 -0.823255 +0.00625335 -0.384425 -0.22483 0.714716 -0.396072 -0.576461 +-0.226633 0.107544 0.0208984 -0.646248 -0.264728 0.715739 +-0.0220342 -0.203937 -0.203195 0.605389 0.692277 -0.392754 +-0.21649 0.0912581 0.021669 -0.741096 -0.460702 0.488396 +-0.208488 0.0747315 0.0126435 -0.775324 -0.56819 0.275741 +0.274212 0.0544489 0.0264121 0.944593 -0.327415 0.0233277 +0.248155 0.00414768 0.0166673 0.815031 -0.579416 0.00118845 +-0.278295 -0.355529 -0.122639 -0.936394 -0.312721 -0.159287 +0.157548 -0.0909801 0.0150017 0.889202 -0.444965 -0.106427 +0.274312 0.096467 0.0904809 0.960451 -0.106123 0.257433 +-0.110172 -0.197086 0.0149366 -0.177534 0.756132 0.629878 +-0.122386 -0.207726 0.0222768 -0.208211 0.642705 0.737278 +-0.129629 -0.194725 0.00878059 -0.0974972 0.723009 0.683924 +-0.167986 -0.219299 0.0257166 -0.0673935 0.584985 0.808239 +0.174568 -0.241424 0.0115664 0.981273 -0.055333 -0.184505 +-0.26132 -0.291091 0.00899631 -0.789059 0.120953 0.602293 +0.124176 -0.445322 -0.117349 0.270431 0.406563 -0.872682 +-0.241041 -0.394654 0.0148141 -0.753959 -0.368388 0.543909 +-0.249344 0.325426 -0.0199902 -0.221848 -0.0079822 0.975049 +-0.195407 -0.476708 0.0132636 -0.717047 -0.64817 0.256356 +-0.183595 -0.482343 0.0289655 -0.674828 -0.705704 0.215845 +-0.0596048 -0.0491406 0.167104 -0.427134 -0.779227 0.458652 +-0.00751695 -0.0947243 -0.0573171 -0.363896 -0.779611 -0.509692 +-0.0278693 -0.497355 0.0297093 -0.106133 -0.987539 -0.116199 +0.231378 0.0526339 -0.13614 0.779257 -0.342981 -0.524522 +0.249003 0.489867 0.00568434 -0.0704576 0.705358 0.705341 +0.219025 0.476303 0.0114124 -0.276954 0.678714 0.680179 +-0.275187 -0.237823 -0.0426463 -0.865292 0.378571 0.328563 +0.120671 0.118542 0.252226 0.531936 0.580452 0.616539 +-0.185099 0.212707 0.109426 -0.903739 0.187924 0.384629 +0.17558 -0.0259245 0.157103 0.559301 -0.725213 0.401558 +0.204861 0.344306 0.0321327 0.713841 0.597876 0.364658 +-0.138154 0.278593 -0.16945 -0.501922 0.525779 -0.686754 +-0.0935111 0.374755 0.0127668 -0.478744 0.876575 0.049202 +-0.180234 -0.162978 -0.228392 0.274722 0.894538 -0.352604 +-0.24614 0.238394 -0.15214 -0.45906 0.13306 -0.878384 +-0.111565 0.363842 0.0182376 -0.523732 0.847518 0.0861334 +-0.138216 0.348539 0.00300733 -0.498713 0.857117 0.128979 +0.0250959 -0.494472 -0.178055 0.287543 -0.882448 -0.372297 +0.28982 0.337719 0.0125078 -0.0434176 0.277741 0.959674 +-0.0838937 -0.1746 -0.217613 0.310939 0.844349 -0.43634 +0.306108 0.324886 0.0146231 0.465024 0.167832 0.869244 +-0.107724 0.246016 -0.209894 -0.50947 0.310774 -0.802409 +0.250426 0.335175 0.00763794 0.00937449 0.353544 0.935371 +0.151608 0.327984 0.159468 0.466631 0.630362 0.620403 +0.220908 0.058094 -0.153651 0.741877 -0.318078 -0.590293 +0.211011 0.141668 -0.18742 0.715928 -0.0410232 -0.696968 +-0.207996 0.346548 -0.0659309 0.207643 0.959872 -0.188494 +0.286671 0.128353 0.00322254 0.999405 -0.0210276 -0.0273293 +-0.246295 0.137781 0.00990077 -0.389225 0.15643 0.907763 +0.142325 0.0567661 -0.219015 0.446373 -0.349666 -0.823702 +-0.22899 0.0931957 0.0055214 -0.686737 -0.626553 0.368542 +0.0147234 -0.498188 -0.0961245 -0.0218087 -0.999712 -0.0100084 +0.0185731 0.41234 -0.000880496 -0.117553 0.992797 0.0231298 +0.143622 0.295404 -0.191213 0.444752 0.50062 -0.742681 +0.142747 0.317388 0.175366 0.423855 0.561685 0.710533 +-0.291561 -0.259726 -0.176946 -0.975711 -0.181603 -0.122511 +0.152048 -0.140673 0.00423734 0.933199 0.181957 -0.309891 +-0.036782 -0.165621 0.0236996 -0.711684 0.699734 0.0622779 +-0.0785329 -0.188429 0.0152187 -0.344799 0.848973 0.400448 +-0.248808 -0.21984 -0.0161688 -0.652037 0.541552 0.53063 +0.0915803 0.196309 0.219463 0.462381 -0.0248853 0.886332 +-0.250384 -0.282474 0.0195764 -0.696898 0.189157 0.691775 +-0.265728 -0.344136 0.00260972 -0.858304 -0.131499 0.496006 +-0.259647 -0.36485 0.00514208 -0.822161 -0.254158 0.509367 +0.118194 -0.384514 0.00927765 0.945585 -0.136231 0.295482 +0.121988 -0.415913 -0.000240009 0.862325 0.095173 0.49733 +0.214129 0.203834 -0.177134 0.722038 0.185199 -0.666605 +0.135721 0.145876 0.206693 0.435505 0.418313 0.797088 +0.0930314 -0.0715785 0.151154 0.277328 -0.806203 0.522614 +-0.0431381 0.372224 0.118803 -0.323534 0.838936 0.437621 +0.121567 -0.0996562 -0.0503931 0.573925 -0.467852 -0.672105 +-0.255933 -0.211951 -0.0352055 -0.696869 0.575688 0.427734 +0.0803541 -0.494413 0.0144683 0.355224 -0.880122 0.314964 +-0.121169 0.174845 0.174449 -0.475501 -0.320405 0.819292 +-0.0787503 -0.494943 0.0195037 0.200173 -0.922025 -0.331361 +0.0934772 -0.348293 0.0933267 0.55259 -0.651417 0.519904 +-0.0985222 -0.490179 -0.0141786 0.397188 -0.917292 -0.0285757 +-0.116029 -0.0147061 0.147769 -0.716007 -0.531089 0.453077 +0.0752021 0.137814 0.272392 0.544401 0.447734 0.709339 +0.276506 0.286783 0.0318741 0.168079 0.436406 0.883911 +-0.198457 -0.061996 -0.212326 0.905721 -0.364821 -0.215815 +0.0215077 -0.117486 -0.0540812 -0.385914 -0.38219 -0.839643 +-0.192848 -0.00639585 -0.217305 0.487554 0.261543 -0.832998 +0.176444 0.44268 0.0191379 -0.406304 0.644588 0.647629 +0.252646 0.426868 0.00334563 0.177389 -0.160035 0.971042 +0.172861 0.447348 0.000297222 -0.61859 0.77135 0.149549 +0.238885 0.412824 0.003849 0.248061 -0.144192 0.957953 +0.0357888 0.412177 0.0291748 -0.0589828 0.993976 0.0923718 +-0.247814 -0.286551 -0.248685 -0.670141 -0.339528 -0.660024 +-0.171444 0.325705 0.00991104 -0.569128 0.632945 0.524856 +0.227989 0.369083 0.00344096 0.256461 0.036999 0.965846 +-0.148376 0.20085 0.161291 -0.645936 -0.00664617 0.763363 +0.0402396 0.199164 0.235104 0.124296 0.225191 0.966354 +0.176479 0.277197 0.177791 0.524698 0.339787 0.780536 +0.223488 0.354111 0.00656229 0.367823 0.236691 0.899269 +0.241775 0.3533 0.00287999 0.108157 0.182753 0.977192 +0.122853 -0.0671403 0.1382 0.400266 -0.793781 0.457929 +-0.129357 0.344421 -0.0784377 -0.404342 0.869647 -0.283234 +0.0221111 -0.429622 -0.182384 0.659451 0.306284 -0.686523 +-0.21056 0.17821 0.017959 -0.95553 0.202374 0.214495 +0.119964 -0.0284805 -0.165048 0.332128 -0.752533 -0.56867 +0.00463469 -0.0789336 0.146698 -0.169991 -0.866073 0.470127 +-0.123073 -0.0345198 -0.0166166 -0.624363 -0.769878 -0.132135 +-0.0615938 -0.423844 0.102718 -0.425442 0.6519 0.627714 +-0.0101599 -0.216557 -0.206102 0.670611 0.624258 -0.400728 +0.158092 -0.15797 0.00922978 0.925933 0.267353 -0.266779 +-0.14033 -0.206332 0.0177235 -0.0989388 0.631209 0.769276 +-0.238198 -0.25392 0.0200578 -0.593111 0.366827 0.716699 +0.0313554 -0.37481 -0.184842 0.914725 -0.264487 -0.30549 +0.133665 -0.337054 0.0261123 0.832018 -0.540448 0.125149 +0.0943408 -0.254695 0.166687 0.324134 -0.232179 0.917077 +-0.211828 -0.450098 0.0115866 -0.829674 -0.398827 0.390614 +0.05691 -0.252822 -0.124532 0.644537 0.218886 -0.732572 +-0.278584 -0.347543 -0.135529 -0.934039 -0.302582 -0.189776 +0.135398 -0.222809 0.143541 0.725094 0.0600135 0.68603 +0.157013 -0.0484189 0.139034 0.49792 -0.786538 0.365284 +0.13371 0.404978 -0.0818529 -0.259177 0.875884 -0.407008 +0.28325 0.487718 -0.00237521 0.443743 0.621777 0.645357 +0.221982 0.331302 0.0221894 0.624798 0.591 0.510241 +-0.156897 -0.497476 -0.123267 0.00263947 -0.99989 0.0145988 +-0.0332489 -0.170501 -0.0566752 0.186093 0.980413 -0.0645006 +0.283256 0.436127 0.00187856 0.0836025 -0.0743058 0.993725 +-0.0251951 -0.164605 -0.0257196 -0.309592 0.873065 -0.376709 +0.0128986 -0.217633 0.163745 -0.454388 0.128018 0.881557 +-0.00209686 -0.166492 -0.0514709 -0.381496 0.809493 -0.446297 +0.291526 0.417172 0.000991615 0.0450759 0.00238643 0.998981 +-0.0746029 -0.157272 -0.0911624 0.274091 0.961041 -0.0356886 +-0.050296 -0.166658 -0.0528907 0.169896 0.982321 0.0786129 +-0.147753 -0.015513 0.0422658 -0.761264 -0.646329 0.0523046 +0.258962 0.409183 0.000411388 0.0739349 -0.0683559 0.994918 +-0.138835 -0.143464 -0.147021 0.24147 0.965653 -0.095949 +-0.0139995 -0.173792 -0.0638015 -0.0103969 0.979 -0.203595 +0.31553 0.384969 0.000665313 0.57377 0.117595 0.81053 +0.30088 0.399545 0.00182497 0.130263 0.0962847 0.986793 +-0.210441 -0.00637382 -0.223494 0.0394875 0.54999 -0.834237 +0.232469 0.383515 0.00287331 0.230244 -0.0378587 0.972396 +-0.0409224 -0.176478 -0.157747 0.430616 0.893329 -0.128578 +0.249026 0.373695 0.000906112 0.052653 0.0465741 0.997526 +-0.296469 -0.216163 -0.17261 -0.978085 0.0108072 0.207926 +-0.0458805 -0.167335 -0.0881686 0.356391 0.930163 -0.0882118 +0.112428 -0.234105 -0.0766454 0.586376 0.160008 -0.794079 +-0.114475 -0.149734 -0.127338 0.205181 0.976889 -0.0599093 +0.309088 0.341734 0.0100213 0.450311 0.137501 0.882221 +-0.103521 -0.152259 -0.143647 0.225395 0.972166 -0.0639613 +-0.151727 -0.143251 -0.161348 0.094917 0.973589 -0.207644 +0.311075 0.283873 0.00419476 0.957478 -0.202026 0.205964 +-0.173064 -0.1437 -0.159875 -0.125756 0.963676 -0.235616 +0.304995 0.260937 0.00709843 0.950975 -0.274844 0.141798 +-0.190535 0.290013 0.004021 -0.777635 0.0433678 0.627219 +0.284853 0.183275 0.00797379 0.999962 -0.00733085 0.00475162 +-0.00458385 -0.345254 -0.253489 0.617248 -0.191205 -0.763181 +-0.240639 0.106437 0.00666474 -0.68832 -0.526548 0.498962 +0.0367675 -0.440502 -0.17498 0.703823 0.410153 -0.580007 +0.258897 0.0205974 0.0120134 0.865676 -0.500499 -0.0102695 +0.156114 -0.0868418 -0.00548078 0.811137 -0.551943 -0.193431 +0.077018 -0.492153 -0.124494 0.330256 -0.793518 -0.511136 +0.0290234 -0.406501 -0.165666 0.899459 -0.0485671 -0.434297 +0.152096 -0.124585 0.0135976 0.980483 0.0574947 -0.188008 +-0.107703 -0.153056 -0.162135 0.221223 0.968108 -0.117592 +-0.155057 -0.15951 -0.210047 0.0480366 0.939132 -0.340181 +-0.037204 -0.164489 0.00203326 -0.563655 0.825467 0.029951 +-0.0660207 -0.17936 0.00488206 -0.387998 0.890004 0.23948 +-0.133179 -0.153476 -0.19087 0.108839 0.947353 -0.301124 +-0.106672 -0.162688 -0.205031 0.209077 0.917207 -0.339143 +-0.00926597 -0.478354 -0.0569518 -0.188355 -0.877513 0.441014 +0.0111618 -0.0655588 0.178369 -0.109513 -0.89755 0.427096 +-0.176193 -0.205654 0.0141104 -0.12024 0.660482 0.741151 +0.125526 0.0568426 -0.227381 0.377258 -0.358106 -0.854071 +-0.217625 -0.211255 0.00426493 -0.417474 0.619878 0.66443 +-0.245864 -0.4278 -0.0405202 -0.847735 -0.496616 0.186328 +-0.0987625 -0.152029 -0.122802 0.23623 0.969671 -0.0627212 +-0.0799192 0.0720048 -0.224949 -0.407288 -0.365202 -0.837105 +-0.12613 -0.145625 -0.111796 0.202447 0.979275 0.00589836 +-0.0950804 -0.0104153 0.180172 -0.664114 -0.491679 0.56321 +0.0396235 -0.341793 -0.175058 0.984165 -0.0485379 -0.170477 +-0.0355498 -0.489039 -0.0781098 -0.190333 -0.922719 0.335205 +0.00110816 -0.211496 -0.172164 0.737715 0.600316 -0.308865 +0.224641 0.215303 -0.161705 0.759064 0.20421 -0.618158 +0.118329 0.333689 -0.174943 0.344736 0.637664 -0.68887 +-0.122023 0.28488 -0.177719 -0.535982 0.520928 -0.664347 +0.312869 0.447787 -0.00885366 0.775275 0.257045 0.576955 +0.311194 0.414972 -0.00157209 0.485524 0.0761743 0.870898 +-0.191452 -0.145105 -0.148003 -0.248923 0.961142 -0.119349 +-0.062794 0.389939 -0.00635697 -0.401904 0.915501 -0.0182225 +0.110715 -0.214557 -0.073069 0.527167 0.24698 -0.813078 +0.312625 0.362338 0.00489261 0.478611 0.117406 0.870142 +-0.157161 0.338167 0.00291988 -0.458348 0.841451 0.286143 +-0.170188 0.338399 -0.00948413 -0.232749 0.889829 0.39247 +-0.185703 0.323666 0.00199611 -0.401321 0.495531 0.770319 +-0.192601 -0.144343 -0.126423 -0.314695 0.947506 0.0565557 +-0.0484407 -0.485676 -0.0189216 -0.164463 -0.978818 0.121927 +-0.200499 0.304416 -0.00257534 -0.535034 -0.0221787 0.844539 +-0.20244 0.232616 -0.00273344 -0.896063 0.220048 0.385551 +-0.0420549 -0.48375 -0.0593508 -0.0285746 -0.996729 0.0755928 +0.293377 0.228064 -0.0109274 0.938963 -0.341337 -0.0428775 +-0.219168 0.166209 0.00568739 -0.635519 0.381202 0.671417 +-0.133437 0.205469 0.173316 -0.595912 -0.0281009 0.802558 +-0.247446 0.183632 -0.0100675 -0.0207902 0.375751 0.926488 +-0.119871 -0.148838 -0.091879 0.157919 0.973146 0.167476 +-0.270247 0.15271 -0.000432452 -0.521278 -0.0376939 0.852554 +-0.0858395 0.313993 0.164046 -0.482872 0.589991 0.647106 +-0.0380547 0.332202 0.174105 -0.28192 0.664216 0.692343 +-0.0825114 -0.482243 -0.00949307 0.324376 -0.944495 -0.0520431 +0.103057 0.351067 0.162295 0.234593 0.720001 0.653119 +0.0582495 -0.4692 -0.160015 0.830076 0.0503189 -0.555375 +0.169952 0.13112 -0.219903 0.557463 -0.0880271 -0.825522 +0.0139696 0.346657 0.173528 -0.0852303 0.721992 0.686632 +0.146136 0.191946 -0.231886 0.462141 0.142911 -0.875216 +-0.176571 0.319853 -0.112186 0.0661186 0.827802 -0.55711 +-0.0595385 -0.483333 -0.0528262 0.100686 -0.994613 -0.0246349 +0.0590887 -0.249529 0.174552 0.038969 -0.138001 0.989665 +-0.0901911 -0.492754 0.00426083 0.368308 -0.887745 -0.276148 +-0.0506999 -0.173547 0.014061 -0.497103 0.850202 0.173336 +-0.13347 0.00811262 -0.151407 -0.0529666 -0.873887 -0.483234 +-0.197088 -0.208844 0.0117634 -0.257917 0.651193 0.713741 +0.0244132 -0.467384 -0.195512 0.530441 -0.0141139 -0.847604 +-0.263709 -0.25479 -0.0077619 -0.771839 0.32651 0.545578 +-0.268958 -0.324134 0.000121706 -0.868142 -0.0208891 0.495876 +0.141752 -0.325736 0.00587119 0.85863 -0.510901 -0.0416481 +-0.26389 -0.375657 -0.00997081 -0.861672 -0.335655 0.380602 +0.035413 -0.479625 -0.184861 0.631947 -0.339767 -0.696564 +-0.11977 0.212077 0.183257 -0.568465 -0.00460497 0.822695 +0.20625 0.238595 0.167392 0.592787 0.13016 0.794771 +-0.300179 0.245691 -0.10219 -0.830693 -0.0734848 -0.551859 +-0.00435397 0.34519 0.171807 -0.153969 0.714955 0.682006 +0.108736 -0.485328 0.00403068 0.474387 -0.60987 0.634835 +0.0276179 0.127393 0.294955 0.0335026 0.0483813 0.998267 +0.0901983 -0.495384 -0.000161038 0.251961 -0.926998 0.277832 +0.0488131 0.097934 0.288047 0.0760689 -0.185484 0.979699 +0.113045 0.215482 -0.242526 0.363892 0.231216 -0.902287 +0.0258588 0.0967616 0.287737 -0.103447 -0.341416 0.934202 +0.00623884 0.145934 0.288072 -0.354383 0.38215 0.853449 +0.0809192 -0.224763 0.173543 0.194727 0.0129677 0.980772 +0.298621 0.480909 -0.011437 0.735137 0.603716 0.308384 +0.0812104 -0.206368 0.172306 0.205337 0.117294 0.971637 +0.306584 0.46421 -0.00863326 0.778614 0.357774 0.515517 +0.121154 -0.283019 -0.0721601 0.703358 -0.0974913 -0.704119 +0.161489 0.115291 -0.223445 0.53139 -0.126911 -0.837567 +0.030876 -0.0644508 0.184158 -0.045184 -0.910406 0.411242 +0.073652 0.0532831 0.27765 0.0239174 -0.39495 0.918391 +-0.0307129 0.402145 -0.0129243 -0.30031 0.953473 -0.0265134 +0.323505 0.366349 -0.00809462 0.925214 0.0217587 0.378822 +0.041357 0.152749 0.285577 0.241612 0.549735 0.799634 +-0.00216024 0.121106 0.286293 -0.475994 -0.0465764 0.878214 +0.0289011 0.254544 -0.249942 0.0392622 0.359335 -0.932382 +0.177127 -0.00459778 0.187821 0.586543 -0.625881 0.514043 +0.134528 0.153934 -0.240829 0.428617 0.00371885 -0.903479 +0.1257 0.0240427 -0.210368 0.364999 -0.484992 -0.794706 +-0.204303 0.216746 0.00970041 -0.955007 0.222603 0.195986 +0.0456832 0.0639411 0.278637 -0.144294 -0.369694 0.917881 +-0.213312 0.1845 0.00215864 -0.797626 0.29393 0.526686 +0.0540522 0.0479255 0.272874 -0.18444 -0.525307 0.830683 +0.160049 0.204021 -0.222174 0.512778 0.193428 -0.836448 +-0.00880205 0.0459353 0.276114 -0.110727 -0.291127 0.950255 +-0.257914 0.168868 -0.00334007 -0.0600869 0.345495 0.936495 +-0.145968 -0.00782131 -0.0496809 -0.670747 -0.72704 -0.146668 +0.0386729 -0.360218 -0.169579 0.968024 -0.146687 -0.203503 +0.119617 0.275819 -0.216022 0.383161 0.435093 -0.81479 +-0.0216191 -0.435536 -0.212166 0.529754 -0.397216 -0.749386 +0.0363742 0.0468181 0.266084 0.0647551 -0.474622 0.877805 +0.0496439 0.344907 0.176858 0.0194849 0.699483 0.714384 +0.0230073 0.0317664 0.264587 0.249025 -0.411592 0.876686 +0.206717 -0.0418324 0.00777585 0.673404 -0.738768 -0.0273483 +-0.168382 -0.171894 -0.0245341 -0.102721 0.850544 0.515774 +0.00113951 0.0297256 0.2699 0.0799664 -0.468266 0.879961 +0.147841 -0.0915004 -0.0215278 0.794409 -0.503865 -0.339167 +-0.0248901 0.137814 0.267648 -0.713964 0.299426 0.632929 +0.0116486 -0.0575933 0.194228 -0.145166 -0.860355 0.488586 +0.139711 -0.124108 -0.0192113 0.861065 -0.0449404 -0.506504 +0.254454 0.213889 -0.115606 0.876742 0.127127 -0.463857 +0.127541 -0.0410204 0.184477 0.403339 -0.789421 0.462745 +0.157108 -0.173885 -0.00646125 0.879583 0.263402 -0.396172 +0.258416 0.172306 -0.11822 0.89627 0.0670973 -0.438404 +-0.164975 -0.191162 0.00141382 -0.088689 0.726681 0.681226 +0.00985293 0.0158373 0.258746 0.114187 -0.531017 0.839632 +0.163918 -0.212391 -0.0143949 0.890502 0.176392 -0.419395 +0.0874649 0.0288999 0.262208 0.0522174 -0.604174 0.795139 +-0.263286 -0.273437 0.00141925 -0.785375 0.210448 0.582149 +0.103996 0.13114 0.254021 0.534877 0.616272 0.578028 +0.122448 -0.363842 0.0107614 0.936378 -0.305903 0.172106 +0.122008 -0.378543 -0.00546169 0.985338 -0.0777071 0.151888 +0.105233 0.116611 0.265904 0.473602 0.455381 0.753877 +0.129361 -0.411252 -0.0182952 0.906389 0.290528 0.306679 +-0.0560464 0.088287 0.244539 -0.808542 0.219779 0.545854 +0.119447 0.0560777 0.267301 0.404131 -0.234158 0.884222 +-0.154985 0.0909047 -0.192241 -0.185278 -0.0596391 -0.980875 +0.0545125 0.0347673 0.260632 -0.125599 -0.526825 0.840643 +0.0473751 0.171763 0.256062 0.291017 0.81593 0.499567 +-0.111523 -0.496951 0.00231683 0.112292 -0.991951 -0.0585181 +0.0377647 0.165295 0.273817 0.188006 0.80503 0.562655 +0.0289906 0.172917 0.260599 0.0333146 0.867687 0.495994 +-0.0152708 0.153859 0.266656 -0.597078 0.602782 0.529293 +0.109485 0.414945 -0.0121747 -0.0960589 0.995347 0.00758761 +-0.0389276 0.112911 0.258651 -0.755879 0.214606 0.618539 +0.12307 0.0864671 0.26691 0.487118 0.14586 0.86107 +-0.105071 0.368647 0.00163088 -0.493337 0.86949 0.024608 +0.130339 0.101896 0.257171 0.533008 0.386696 0.752574 +-0.186084 0.335902 -0.00966328 -0.146003 0.775004 0.614859 +-0.201233 0.340584 -0.0170468 0.00339142 0.777957 0.628308 +0.201832 0.00328792 0.165669 0.675065 -0.59026 0.442585 +-0.20212 0.322873 -0.00450872 -0.304024 0.341473 0.889362 +-0.204239 0.284105 -0.00938548 -0.59677 -0.107431 0.795188 +0.0139194 0.227944 -0.258145 -0.0550919 0.241303 -0.968885 +-0.10843 0.0216801 0.18134 -0.779634 -0.0996474 0.618257 +-0.250643 -0.301428 -0.237761 -0.716682 -0.340575 -0.608585 +0.287358 0.209449 -0.0129997 0.972523 -0.225935 -0.0561418 +-0.208845 0.203637 0.000532431 -0.876326 0.243927 0.415393 +-0.00386915 0.164714 0.261231 -0.441986 0.786875 0.43067 +-0.286522 0.184625 -0.0100051 -0.429837 0.0711299 0.9001 +-0.251087 -0.148566 -0.171289 -0.0482658 0.537536 0.841858 +-0.0588993 -0.0781179 -0.0201142 -0.519106 -0.844509 -0.131654 +0.0645046 0.164669 0.254557 0.472766 0.723446 0.503109 +-0.0449544 0.046562 0.259989 -0.608756 -0.157959 0.777473 +0.0343722 -0.357924 -0.188427 0.942953 -0.179684 -0.280273 +-0.082441 -0.181974 -0.00266465 -0.144541 0.920508 0.363005 +-0.249861 -0.235665 -0.00337516 -0.668711 0.454741 0.588248 +0.214548 0.104402 0.192907 0.602642 0.26451 0.752899 +0.150702 -0.308149 -0.00758471 0.872623 -0.44852 -0.193283 +0.145438 0.0955517 0.249444 0.575371 0.347257 0.740514 +-0.275655 -0.334262 -0.014411 -0.913536 -0.0961251 0.395236 +0.0566155 0.237377 -0.252697 0.162595 0.307761 -0.937468 +0.127624 -0.447745 -0.00283405 0.689318 0.0329957 0.723707 +-0.141266 0.155084 -0.206182 -0.546055 0.0059224 -0.837729 +0.102481 0.0327548 0.262512 0.198603 -0.527846 0.825794 +0.134066 0.305227 0.188028 0.371608 0.457022 0.808108 +0.102174 -0.495607 -0.011069 0.175589 -0.943298 0.281705 +0.00519471 -0.491575 -0.0145081 -0.250365 -0.909428 -0.332051 +0.0578924 0.0151936 0.25319 0.05944 -0.267497 0.961723 +-0.232611 -0.387409 -0.204703 -0.742819 -0.423237 -0.51874 +0.0186525 -0.271785 -0.214473 0.87702 0.310577 -0.366577 +0.152961 0.0752985 0.248854 0.596371 0.0734619 0.79934 +0.025531 -0.274608 -0.195521 0.927125 0.321856 -0.191961 +0.0723259 -0.0637082 0.178206 0.182309 -0.899372 0.397358 +-0.0182099 -0.000459777 0.247603 -0.152326 -0.630777 0.760866 +0.31329 0.457235 -0.0262922 0.909288 0.411801 -0.0601233 +-0.241974 0.34187 -0.0906769 0.00699688 0.82393 -0.566648 +0.0855196 0.195201 -0.256286 0.277386 0.141553 -0.950274 +0.0514574 0.414544 0.00302113 -0.0192021 0.998858 0.04374 +-0.047879 0.395762 -0.0189187 -0.360456 0.931192 -0.0543359 +-0.0929768 0.374472 -0.0280211 -0.459294 0.884038 -0.0867531 +0.0321875 -0.0119235 0.245649 -0.190814 -0.467187 0.863323 +0.229631 0.0481832 0.166532 0.803602 -0.335269 0.49175 +-0.00081306 0.173708 0.246823 -0.353664 0.692344 0.628952 +0.059623 0.190228 0.233383 0.294382 0.28792 0.911286 +-0.218091 0.297598 -0.0149483 -0.438162 -0.197814 0.87686 +0.310184 0.274937 -0.00885202 0.962427 -0.270604 0.0225424 +0.0402112 0.182462 0.242985 0.168265 0.648253 0.7426 +-0.0553877 0.106586 0.235931 -0.842789 0.2955 0.449873 +-0.0666095 0.0771132 0.232402 -0.850271 0.227459 0.47466 +0.193728 0.22681 -0.189334 0.636148 0.272139 -0.721981 +-0.0835892 0.289429 0.184002 -0.470721 0.459541 0.753156 +-0.29846 0.19774 -0.016388 -0.586373 -0.0540085 0.808239 +-0.278071 0.201231 -0.0139108 -0.0144076 0.266167 0.963819 +-0.238102 0.200782 -0.0159252 -0.136573 0.298861 0.944473 +0.00222667 0.187801 0.239061 -0.200362 0.391152 0.898251 +-0.0185441 0.177805 0.236042 -0.418216 0.328787 0.846755 +-0.26317 0.125268 -0.0120096 -0.788847 -0.582175 0.196959 +-0.219448 0.0826445 0.00328644 -0.704557 -0.650487 0.283665 +-0.0277922 0.162201 0.235786 -0.640618 0.421472 0.641849 +0.183057 0.0921622 0.220973 0.573589 0.312972 0.756997 +0.0985119 0.207372 -0.249908 0.32427 0.196997 -0.925225 +0.143102 -0.10623 -0.0175171 0.873573 -0.233323 -0.427119 +-0.0411022 -0.0935026 -0.00152427 -0.669412 -0.727387 -0.150986 +-0.267032 -0.125195 -0.179032 -0.128238 0.102604 0.986422 +-0.0155464 -0.119525 -0.0208886 -0.780343 -0.387044 -0.491185 +-0.0151723 -0.137128 -0.014704 -0.864288 0.022397 -0.502498 +0.147926 0.0445308 0.24738 0.529579 -0.302613 0.792446 +-0.0636672 -0.0303651 0.191135 -0.48492 -0.679207 0.550937 +-0.0235059 -0.15524 -0.00825123 -0.748754 0.582768 -0.31583 +-0.234763 0.303202 -0.129751 -0.16393 0.56737 -0.806981 +-0.0694677 -0.176572 -0.0157032 -0.219369 0.937101 0.271513 +-0.136457 -0.182406 -0.00625967 -0.0335461 0.798582 0.600951 +0.037723 -0.028138 0.23509 -0.131101 -0.613912 0.778411 +-0.184527 -0.194552 0.00141385 -0.190082 0.720147 0.667276 +-0.273113 -0.288385 -0.00974686 -0.873061 0.0945426 0.478358 +-0.276745 -0.313055 -0.0147551 -0.908465 -0.00340583 0.417948 +-0.270077 -0.354712 -0.00907051 -0.891492 -0.207123 0.402917 +-0.268084 -0.381548 -0.029133 -0.894359 -0.379984 0.236081 +-0.29365 -0.229058 -0.213241 -0.925552 -0.306297 -0.222566 +0.140478 -0.442628 -0.0162356 0.756223 0.231206 0.612103 +0.0295167 0.233324 0.232163 0.028726 0.133051 0.990693 +0.00824108 0.228754 0.232452 -0.0594443 0.131512 0.989531 +0.0208194 0.246192 0.230118 -0.0203527 0.204437 0.978668 +0.0576339 0.211279 0.231237 0.192005 0.0831854 0.977862 +0.0400239 0.218786 0.233223 0.0863137 0.0960333 0.991629 +-0.0279215 0.22476 0.227762 -0.23345 0.101249 0.967083 +-0.255549 0.346721 -0.0829393 -0.0426053 0.843925 -0.534767 +0.173733 0.246725 0.185906 0.464957 0.0348564 0.884647 +0.095305 0.18016 0.217156 0.514171 0.162436 0.842166 +-0.041218 0.153833 0.227097 -0.704416 0.253003 0.663164 +0.159746 0.0882326 0.240986 0.600681 0.267923 0.753259 +0.217284 0.481749 -0.00915814 -0.500492 0.862803 0.0712693 +-0.0782342 0.0458152 0.222619 -0.821273 0.0282437 0.569837 +0.320159 0.438637 -0.024964 0.957409 0.288366 0.0145736 +-0.00194374 0.319545 0.195489 -0.144303 0.591799 0.793064 +0.127855 0.417951 -0.0096776 -0.304159 0.951984 0.0348325 +-0.0351231 -0.0145747 0.228071 -0.315966 -0.67708 0.664626 +0.324208 0.417952 -0.0197647 0.971375 0.138716 0.192843 +-0.0629558 0.389167 -0.0248792 -0.39873 0.91368 -0.0787559 +-0.134991 0.351782 -0.0120872 -0.45524 0.889749 0.033218 +-0.153283 0.34371 -0.0138498 -0.341143 0.931082 0.129257 +-0.239323 0.345539 -0.0217005 -0.0704661 0.617546 0.783372 +-0.180433 0.342417 -0.0248469 0.0321285 0.97298 0.228643 +0.0628509 -0.0408539 0.22334 0.121821 -0.769001 0.627532 +0.0245133 0.285697 0.217543 -0.0233704 0.400686 0.915917 +-0.0215206 0.270685 0.21812 -0.201475 0.340787 0.918298 +-0.238721 0.308647 -0.0206621 -0.280641 -0.185924 0.941633 +-0.209782 0.260992 -0.0150838 -0.564238 0.00536325 0.825594 +-0.315882 0.24243 -0.0259916 -0.69268 -0.0732521 0.717515 +-0.216311 0.239592 -0.0172459 -0.509187 0.124946 0.851538 +-0.00500587 0.264369 0.223387 -0.128624 0.303365 0.944153 +-0.0181405 0.252199 0.22462 -0.188656 0.246919 0.950495 +-0.227345 0.220856 -0.0186311 -0.288316 0.213022 0.933539 +-0.0226483 0.207105 0.229984 -0.235188 0.0656493 0.96973 +-0.0530019 0.208433 0.220289 -0.39027 -0.00673088 0.920676 +-0.216374 -0.137024 -0.220585 0.939673 0.339177 0.044422 +-0.0290655 0.188614 0.229319 -0.340983 0.0841011 0.9363 +0.163519 -0.165688 0.02552 0.953579 0.279294 -0.112618 +0.00857035 -0.0260015 0.229382 -0.157402 -0.612399 0.77472 +-0.0460211 0.189451 0.22264 -0.41088 -0.0280537 0.911258 +0.285911 0.140672 -0.0135165 0.99734 0.014486 -0.0714294 +-0.224157 0.0820098 -0.0168873 -0.722792 -0.680642 0.119576 +-0.069575 0.0896291 0.217015 -0.865088 0.263637 0.426753 +-0.00796255 -0.0263704 0.225328 -0.184083 -0.684375 0.70551 +0.0557685 0.287508 0.216062 0.0774834 0.393419 0.916088 +0.225634 -0.0194505 -0.0246108 0.728105 -0.673796 -0.125942 +0.0996443 -0.0503879 -0.142436 0.243957 -0.83941 -0.48567 +0.0406204 0.278605 0.22062 0.0286166 0.35695 0.933685 +-0.00617896 0.29523 0.210034 -0.15288 0.463051 0.873047 +0.011576 0.275215 0.221376 -0.0692439 0.349808 0.934259 +-0.292987 -0.0936906 -0.203897 -0.906838 0.32249 0.271377 +-0.0567736 0.178341 0.215914 -0.509296 -0.106689 0.853953 +-0.27327 -0.268381 -0.0160193 -0.860182 0.205602 0.466706 +0.155476 -0.289362 -0.0186778 0.885996 -0.325614 -0.330131 +0.126124 -0.356817 -0.00551262 0.95666 -0.291021 0.0104024 +0.123408 -0.371866 -0.0203383 0.998598 -0.0486322 -0.0209073 +-0.272414 -0.364852 -0.0223455 -0.913896 -0.283447 0.290606 +0.125172 -0.392641 -0.0198485 0.980774 0.153786 0.120134 +-0.0526944 0.140367 0.21761 -0.762959 0.163871 0.625331 +-0.206448 -0.476807 -0.15975 -0.721532 -0.588765 -0.364345 +0.133093 -0.476772 -0.00971502 0.587234 -0.294955 0.753762 +-0.106647 0.00308332 0.176257 -0.733788 -0.353836 0.579961 +0.0101973 0.293007 0.213569 -0.0838398 0.442105 0.893037 +0.118602 -0.496621 -0.0233321 0.145718 -0.957628 0.248424 +-0.131297 -0.495754 -0.000402802 -0.0363721 -0.999237 -0.0142572 +0.286843 0.493176 -0.0185566 0.510512 0.859481 -0.0258745 +-0.0545357 0.283722 0.202219 -0.345115 0.421417 0.838632 +0.235021 0.49005 -0.0239105 -0.375483 0.908789 -0.181972 +0.0968391 0.250812 0.218643 0.290957 0.103693 0.9511 +0.0993785 0.269495 0.214627 0.266153 0.231263 0.935778 +-0.0803413 0.202511 0.206491 -0.478761 -0.088011 0.873523 +0.325142 0.350044 -0.0225808 0.99806 -0.0620838 0.00477569 +-0.06588 0.216004 0.214535 -0.428906 0.00891286 0.903305 +-0.0651598 0.195165 0.213695 -0.459647 -0.0933784 0.883179 +-0.257066 0.344188 -0.0232745 -0.112282 0.469244 0.875901 +-0.277227 0.346224 -0.0272202 -0.146185 0.487723 0.860672 +0.115083 0.174939 0.2082 0.397814 0.165038 0.9025 +-0.259001 0.30852 -0.0246436 -0.0896672 -0.104177 0.990508 +-0.081452 0.00313258 0.205238 -0.667037 -0.408701 0.622917 +0.199903 0.108028 0.201229 0.486331 0.417731 0.767452 +0.187245 0.0569986 0.219438 0.652428 -0.161309 0.740484 +-0.250865 0.291494 -0.0259674 -0.0973472 -0.0942528 0.990777 +-0.0891199 0.038654 0.207252 -0.825732 0.0439867 0.562345 +-0.0241989 -0.0274116 0.219475 -0.262063 -0.704693 0.659341 +-0.22019 0.275763 -0.0203497 -0.401487 -0.0988595 0.910514 +0.064074 0.305391 0.206385 0.0887283 0.492315 0.865883 +-0.104125 -0.0149348 0.164847 -0.680067 -0.520685 0.516135 +-0.226919 0.25445 -0.0237809 -0.30649 0.0377658 0.951124 +-0.0647646 0.251375 0.210122 -0.395465 0.232354 0.888605 +-0.235989 0.236648 -0.0241834 -0.171645 0.153746 0.973088 +0.15039 0.13851 0.202713 0.423162 0.443953 0.789835 +-0.21537 -0.293865 -0.270122 -0.464 -0.286729 -0.838147 +0.194366 0.0936946 0.212116 0.564202 0.290177 0.772964 +-0.0758574 0.0706785 0.217804 -0.867899 0.26651 0.419195 +0.101093 0.143238 -0.254703 0.331821 -0.0186283 -0.943158 +0.00640628 0.307448 0.204964 -0.108277 0.523638 0.845032 +0.113861 0.258394 0.211895 0.342349 0.124857 0.93124 +0.11747 0.225318 0.210526 0.420288 -0.117882 0.899701 +0.123582 0.209873 0.203885 0.435933 -0.125311 0.891212 +0.0898237 0.108862 -0.255567 0.278474 -0.165499 -0.946077 +-0.0849371 0.0672588 0.199462 -0.873817 0.287947 0.391829 +-0.2121 -0.0998785 -0.212562 0.93562 -0.331733 0.120698 +0.277334 0.0786376 -0.0387779 0.966044 -0.212384 -0.147144 +-0.0878234 0.0196559 0.206511 -0.757448 -0.201576 0.620999 +0.163611 -0.0685834 -0.039078 0.588524 -0.766623 -0.256766 +-0.0293722 -0.103067 -0.0147984 -0.750889 -0.610666 -0.251501 +0.140017 -0.155261 -0.0255186 0.781671 0.233342 -0.578396 +-0.0304676 -0.0384738 0.203891 -0.303435 -0.74714 0.591362 +-0.00966769 -0.163239 -0.0355755 -0.495567 0.70501 -0.507321 +0.151933 -0.185967 -0.0229419 0.815551 0.25297 -0.520463 +-0.0015052 -0.0484203 0.203781 -0.219482 -0.782143 0.583164 +0.157025 -0.218513 -0.0290646 0.835273 0.159489 -0.526195 +-0.271854 -0.248368 -0.0248625 -0.832861 0.339312 0.437275 +0.0812628 0.304587 0.204509 0.153221 0.475404 0.866322 +-0.219275 0.131556 -0.171217 -0.495327 0.589307 -0.638254 +-0.0810419 0.242214 0.204295 -0.469814 0.171649 0.865917 +0.138903 -0.426486 -0.0254897 0.828526 0.414458 0.376523 +-0.0506793 0.310031 -0.203861 -0.338894 0.602908 -0.722256 +0.19058 0.121013 0.196596 0.323956 0.571657 0.75383 +-0.0729727 -0.16182 -0.145692 0.347849 0.935145 -0.067118 +0.197274 0.0203046 0.190611 0.674309 -0.479058 0.56197 +0.294146 0.481747 -0.0316058 0.616211 0.700288 -0.360389 +0.0543083 0.31894 0.198413 0.0531826 0.576976 0.815028 +0.323217 0.411924 -0.0380121 0.96749 0.11783 -0.223785 +0.0422666 0.332077 0.188824 0.0099858 0.650688 0.75928 +-0.0319106 0.30381 0.199018 -0.251495 0.52455 0.813386 +0.114318 0.411397 -0.0454839 -0.135735 0.969846 -0.202422 +-0.0734267 0.279891 0.19542 -0.431446 0.407949 0.804632 +-0.0495569 0.300897 0.19426 -0.328435 0.51247 0.793413 +-0.0312322 0.400839 -0.031117 -0.309995 0.945454 -0.100101 +-0.229504 -0.109176 -0.187006 0.611789 -0.261683 0.746483 +0.136022 0.195613 0.198237 0.402083 0.0229791 0.915315 +-0.142387 0.348314 -0.0288729 -0.363915 0.931339 -0.013185 +-0.0934398 0.191306 0.197151 -0.505231 -0.187129 0.842451 +0.0925249 0.129796 -0.256965 0.302405 -0.0665618 -0.950853 +-0.0944123 0.17288 0.19043 -0.52383 -0.33969 0.781161 +-0.067058 0.133129 0.204258 -0.75003 0.137897 0.646869 +-0.0838081 0.0883785 0.19115 -0.837921 0.135388 0.528733 +-0.0230548 0.288792 0.209903 -0.204952 0.438999 0.8748 +-0.00563039 -0.0578948 0.187541 -0.20055 -0.846765 0.492715 +-0.0950624 0.252157 0.193386 -0.523446 0.238516 0.817994 +-0.0954442 0.233714 0.197322 -0.515731 0.122518 0.847945 +0.134113 0.227569 0.202423 0.427602 -0.140771 0.892939 +-0.240412 0.271358 -0.0262836 -0.147378 -0.0470333 0.987961 +0.166409 0.166705 0.190765 0.397827 0.192416 0.897056 +-0.310762 0.258155 -0.0236364 -0.420986 0.0353301 0.906379 +0.305935 0.264805 -0.0289161 0.939486 -0.317039 -0.129817 +-0.107101 0.0409229 0.181243 -0.770016 0.213803 0.601136 +-0.246503 -0.424465 -0.128433 -0.867311 -0.461016 -0.18771 +-0.0803862 -0.0230166 0.183978 -0.573224 -0.60786 0.549473 +-0.0721569 -0.0147797 0.200486 -0.570093 -0.563497 0.597884 +-0.309682 0.210839 -0.0248014 -0.785512 -0.157077 0.59858 +-0.265931 0.128623 -0.031273 -0.789023 -0.611444 -0.0598294 +0.272341 0.0585193 -0.0347163 0.936704 -0.321661 -0.138275 +-0.018859 -0.048572 0.195749 -0.265965 -0.789143 0.553639 +0.164214 0.233667 0.190877 0.427808 -0.126976 0.894906 +-0.0428989 -0.0890278 -0.0171313 -0.607093 -0.781318 -0.144845 +-0.120322 0.193089 0.180645 -0.53933 -0.167439 0.82528 +-0.15452 -0.178646 -0.0124041 -0.0553218 0.807596 0.587136 +-0.211894 -0.183114 -0.0257077 -0.378841 0.76777 0.516728 +-0.106929 0.201299 0.190671 -0.527981 -0.109522 0.842164 +0.19269 0.160139 0.177007 0.383731 0.239946 0.891727 +-0.0638793 0.151076 0.206353 -0.66691 -0.07327 0.741528 +0.0245669 -0.498504 0.05006 0.0470886 -0.99889 0.00130142 +-0.224783 -0.457012 -0.0276624 -0.801636 -0.533629 0.269479 +-0.177146 -0.0208556 -0.164749 0.701218 -0.594571 0.39342 +0.193535 0.00719141 0.182172 0.647439 -0.571869 0.503775 +0.209127 0.018678 0.173206 0.712921 -0.510147 0.481139 +0.0782791 -0.0546427 0.194882 0.229996 -0.866887 0.442277 +0.0105838 -0.48598 -0.0308141 -0.563995 -0.816252 -0.125069 +0.0433325 -0.0603735 0.194063 0.0148322 -0.895218 0.445381 +-0.0974132 -0.493422 -0.0330539 0.354888 -0.920607 0.1629 +-0.126597 0.241025 0.174215 -0.614467 0.20117 0.762863 +-0.118732 0.230623 0.182335 -0.58073 0.125034 0.804437 +0.055684 -0.498797 -0.0315822 0.00406057 -0.999937 0.010426 +0.0218396 -0.498008 -0.0236355 -0.308553 -0.949682 -0.0538432 +0.160052 0.214808 0.187843 0.397916 -0.165859 0.902305 +-0.108468 0.162017 0.174606 -0.473819 -0.418127 0.775027 +0.265229 0.486173 -0.0436774 0.115061 0.815443 -0.567286 +0.302177 0.465966 -0.041381 0.69723 0.530629 -0.481979 +-0.0925371 0.156593 0.182679 -0.59522 -0.329313 0.732985 +-0.232703 -0.414943 -0.179283 -0.787527 -0.441082 -0.430404 +0.228374 0.0944793 0.182019 0.734573 0.0789768 0.673918 +-0.122741 0.358227 -0.0218747 -0.475916 0.87878 -0.03536 +0.0688367 0.387527 -0.124951 0.102434 0.893354 -0.437522 +-0.226754 0.352278 -0.0396106 0.155142 0.973134 0.170123 +-0.243593 -0.386682 -0.187821 -0.795845 -0.419164 -0.436959 +0.0268373 -0.0565644 0.200183 -0.0924711 -0.867083 0.489505 +-0.312913 0.334157 -0.0359745 -0.716958 0.419504 0.556766 +0.00659569 0.33346 0.185342 -0.109814 0.663572 0.740009 +0.12599 0.321956 0.180467 0.329157 0.584979 0.741252 +0.160274 0.281415 0.185786 0.453375 0.327513 0.828967 +0.181832 0.258674 0.180127 0.491651 0.195626 0.848534 +-0.11947 0.25648 0.174655 -0.595566 0.294632 0.747324 +-0.0450284 0.19426 -0.252069 -0.305666 0.110242 -0.945735 +-0.0848789 0.107104 0.185805 -0.753307 0.0977348 0.650366 +0.147586 -0.0802691 -0.0418698 0.62393 -0.694533 -0.358241 +0.133712 -0.0453376 0.17136 0.412746 -0.795548 0.443558 +-0.0335564 -0.0942153 -0.030638 -0.586483 -0.764646 -0.267123 +0.0643244 0.348679 0.172273 0.0579475 0.713493 0.698262 +0.197261 0.178003 0.171684 0.341519 0.12547 0.931462 +-0.163957 0.300961 0.0598665 -0.818128 0.511175 0.263376 +-0.00223001 -0.13371 -0.0319821 -0.716086 -0.0699874 -0.694495 +-0.0128234 -0.0386295 0.211371 -0.236912 -0.73284 0.637822 +-0.011911 -0.149717 -0.0242628 -0.719361 0.361638 -0.593074 +-0.224385 -0.382627 -0.218986 -0.683393 -0.416576 -0.599532 +-0.163192 0.332713 -0.0871511 -0.0285074 0.922626 -0.384642 +-0.174628 -0.182026 -0.0108249 -0.14165 0.784169 0.604164 +0.147411 -0.0289343 0.185403 0.46682 -0.740987 0.482719 +0.148273 -0.244685 -0.0473805 0.778265 0.0159028 -0.627734 +-0.0362411 -0.0473788 0.188016 -0.330842 -0.78574 0.522643 +0.152113 -0.0131511 0.202341 0.494957 -0.653263 0.572944 +-0.281457 -0.303321 -0.0261371 -0.939094 0.0113796 0.343471 +-0.282694 -0.326871 -0.0323898 -0.958044 -0.0867914 0.273166 +0.061516 -0.231458 0.17562 0.0357394 -0.0214663 0.999131 +-0.1324 0.224805 0.172907 -0.619304 0.112117 0.777105 +-0.198421 0.30684 -0.129809 0.01015 0.677881 -0.735102 +0.135823 -0.218219 -0.0545929 0.678398 0.182061 -0.71178 +-0.0364726 0.0177338 -0.209663 -0.282027 -0.586787 -0.75904 +0.232189 0.122442 0.172069 0.66377 0.208372 0.718325 +-0.0953279 0.0738423 -0.217995 -0.441581 -0.356445 -0.823379 +-0.196439 -0.492983 -0.061522 -0.348126 -0.934337 0.0763098 +0.226629 0.0609962 0.178338 0.788101 -0.249071 0.562904 +0.312675 0.447416 -0.0410894 0.841911 0.369417 -0.39334 +0.164046 0.439604 -0.0307296 -0.601359 0.789996 -0.119473 +0.148954 0.427763 -0.0346494 -0.556338 0.820561 -0.131025 +0.112031 0.193975 0.207592 0.430558 -0.0128249 0.902472 +-0.287887 0.356205 -0.0426455 -0.259541 0.925588 0.275545 +-0.161107 0.343631 -0.0299899 -0.150669 0.987313 0.0501139 +-0.325311 0.27633 -0.0491707 -0.999189 -0.0374324 0.0148334 +0.221533 0.030203 0.165163 0.769328 -0.440056 0.463125 +0.287661 0.218158 -0.0307565 0.94536 -0.284133 -0.159884 +-0.0531331 -0.0435023 0.181776 -0.408229 -0.761653 0.503224 +-0.0994392 0.0573671 -0.207752 -0.436242 -0.426068 -0.792565 +0.0330122 -0.274089 0.168916 -0.119984 -0.229018 0.965999 +0.167962 0.0818837 -0.2119 0.554081 -0.230182 -0.800007 +0.136549 -0.0957219 -0.0373846 0.718419 -0.463992 -0.518252 +-0.0360612 -0.086335 -0.0480252 -0.44005 -0.843216 -0.308776 +0.115457 0.337147 0.171282 0.287877 0.661816 0.692189 +0.0385941 0.0865858 -0.258308 0.0207874 -0.282917 -0.958919 +0.129891 -0.131342 -0.0329125 0.755318 -0.008573 -0.655303 +0.00294963 -0.150309 -0.0392033 -0.635384 0.361715 -0.682239 +-0.183247 -0.16675 -0.0372685 -0.175731 0.881134 0.439 +-0.189636 -0.176661 -0.022867 -0.220071 0.813943 0.537648 +0.0146739 0.0641159 -0.249576 -0.0891497 -0.373779 -0.923224 +-0.0774065 -0.169662 -0.0355448 -0.00880983 0.943795 0.330413 +0.203555 0.222619 0.170028 0.487689 -0.0111876 0.872946 +0.208722 0.162056 0.171114 0.321007 0.228497 0.919099 +-0.286317 -0.276295 -0.0465213 -0.961359 0.104299 0.254775 +0.217355 0.18114 0.16534 0.380975 0.100173 0.919143 +-0.127102 0.16001 0.164331 -0.375058 -0.374308 0.848072 +-0.0973701 0.369032 -0.0485973 -0.454458 0.875037 -0.166667 +0.135628 -0.414345 -0.0367709 0.849921 0.511895 0.124893 +-0.110004 0.125493 0.16374 -0.580286 0.0154274 0.814266 +0.239374 0.0877179 0.167637 0.82282 -0.0653997 0.564526 +0.259875 0.191841 -0.111037 0.901852 0.104699 -0.419167 +-0.0946973 0.0920122 0.178864 -0.694929 0.0239596 0.718679 +-0.136545 -0.494592 -0.0442528 -0.0425566 -0.999087 0.00382002 +0.0857557 -0.498435 -0.0358235 0.015428 -0.999309 0.0338151 +0.28516 0.478085 -0.0448777 0.421117 0.686321 -0.592979 +-0.119622 0.0327279 0.16737 -0.772012 0.0491103 0.633708 +0.319665 0.429361 -0.0391817 0.924705 0.242449 -0.293494 +0.17588 -0.0163265 0.173388 0.570785 -0.688337 0.447657 +-0.2448 0.355058 -0.0366727 0.0950232 0.94174 0.322639 +-0.273522 0.357547 -0.0563745 -0.0547265 0.986196 -0.156277 +-0.14353 0.346864 -0.0462872 -0.307167 0.943639 -0.123259 +-0.210999 0.349591 -0.0480739 0.204108 0.978725 -0.0209314 +-0.267299 -0.0930153 -0.17857 -0.317165 -0.0713509 0.945683 +-0.321558 0.317162 -0.0428383 -0.935921 0.220264 0.274838 +0.312278 0.284031 -0.0267097 0.956373 -0.272151 -0.106226 +-0.316844 0.22467 -0.0356333 -0.928552 -0.224109 0.295917 +0.283648 0.199466 -0.0299906 0.983232 -0.121208 -0.136248 +0.280932 0.18785 -0.0432882 0.983891 -0.0224438 -0.177355 +0.237354 -0.00523532 0.0632638 0.762294 -0.629139 0.151964 +0.279079 0.11145 -0.055667 0.974899 -0.0883509 -0.204366 +0.0620028 -0.161926 0.163337 -0.0061155 0.359345 0.933185 +0.255471 0.0223195 -0.035251 0.852183 -0.502464 -0.145991 +0.080066 -0.189007 0.169759 0.206293 0.21162 0.955333 +-0.047018 -0.0838014 -0.0338939 -0.532382 -0.82989 -0.16689 +0.132934 -0.0857846 -0.0532761 0.549432 -0.669625 -0.499727 +0.0329949 -0.190151 0.167408 -0.308512 0.229004 0.923243 +0.123842 -0.114292 -0.0409738 0.672176 -0.21456 -0.708621 +0.0304333 -0.20716 0.169901 -0.313193 0.144279 0.938666 +0.128526 -0.146111 -0.0364791 0.703932 0.162235 -0.691491 +0.0143636 -0.136973 -0.0454631 -0.548364 0.0277415 -0.83578 +0.116324 -0.15759 -0.0489423 0.545886 0.22491 -0.807109 +0.0403753 -0.238487 0.17459 -0.158638 -0.0276327 0.98695 +-0.205061 -0.0686834 -0.18214 0.686159 -0.559369 0.465072 +-0.102423 0.107878 0.172456 -0.661667 0.0171007 0.749603 +0.146616 -0.208452 -0.0400016 0.755169 0.218425 -0.61807 +-0.255992 -0.202232 -0.0505221 -0.7005 0.617431 0.357879 +-0.117459 0.0512298 0.163833 -0.671197 0.213822 0.70977 +0.110555 -0.0636075 0.155077 0.321517 -0.839175 0.438647 +0.113597 -0.0535756 0.172596 0.33997 -0.83502 0.432623 +0.130965 -0.334748 -0.0312405 0.898766 -0.350629 -0.26321 +0.00872761 -0.0720532 0.163209 -0.106959 -0.906678 0.408037 +0.173872 0.101178 -0.21243 0.573751 -0.166235 -0.801982 +0.0789142 -0.159648 0.160461 0.214835 0.367551 0.904849 +0.16135 -0.473022 -0.0356527 0.852767 -0.0954278 0.513501 +-0.0886283 0.254851 -0.218003 -0.46558 0.335066 -0.819125 +-0.19271 -0.492802 -0.0426732 -0.350958 -0.931333 0.0971925 +0.182021 0.0731374 0.225987 0.640289 0.0382588 0.76718 +-0.00126249 -0.211766 0.15345 -0.601146 0.192356 0.775643 +-0.0399815 0.344815 0.160227 -0.290444 0.714966 0.635977 +0.192795 0.268019 0.170318 0.584135 0.318316 0.746633 +0.206731 0.276306 0.15246 0.668054 0.413213 0.618836 +-0.10076 -0.498805 -0.0491581 0.162062 -0.973013 0.164261 +0.273701 0.472234 -0.0576314 0.29035 0.687534 -0.665578 +-0.117194 0.144995 0.160052 -0.388637 -0.245057 0.888205 +-0.101926 0.0760152 0.171822 -0.683714 0.0717993 0.72621 +0.173822 0.442665 -0.0505987 -0.573614 0.778668 -0.25425 +0.243483 0.048955 0.141539 0.841194 -0.357195 0.405961 +-0.11571 -0.00252489 0.16007 -0.742356 -0.414508 0.526395 +0.0906515 0.411101 -0.0416738 -0.000594038 0.985418 -0.170152 +-0.201056 -0.0482499 -0.16468 0.474943 -0.559714 0.67908 +-0.000398747 -0.23106 0.157844 -0.542922 0.107118 0.832923 +0.00476161 -0.285369 0.158501 -0.375341 -0.207775 0.903299 +-0.126923 0.354365 -0.0421676 -0.439931 0.890707 -0.114461 +-0.173967 0.343179 -0.0415713 0.0500893 0.998327 -0.0288747 +-0.305883 0.348325 -0.0482729 -0.642276 0.763101 0.071815 +-0.00682678 0.281146 0.216559 -0.147176 0.391514 0.908326 +-0.321201 0.311168 -0.0599596 -0.950192 0.183227 -0.252118 +0.312207 0.304381 -0.0513032 0.925316 -0.229574 -0.301804 +0.002479 0.356546 0.160465 -0.12512 0.767361 0.62889 +0.304704 0.270862 -0.0441978 0.91875 -0.307411 -0.247784 +0.049748 0.324434 -0.207225 0.13061 0.622271 -0.771829 +-0.28924 0.165218 -0.0501804 -0.83885 -0.524904 -0.144246 +-0.260015 0.125154 -0.0509454 -0.780653 -0.608262 -0.143519 +-0.0291774 -0.0575996 -0.120669 -0.284682 -0.844364 -0.453879 +0.216659 0.267404 0.146918 0.711268 0.376879 0.593346 +-0.149913 0.16428 0.155444 -0.541112 -0.274425 0.794914 +0.234064 0.155497 0.161104 0.577151 0.181887 0.796124 +0.233749 0.17899 0.157181 0.581931 0.138917 0.801285 +0.240689 0.0585674 0.154417 0.838769 -0.297023 0.456338 +0.246395 0.076921 0.153092 0.862822 -0.178141 0.473079 +-0.0970975 -0.165856 -0.0400102 0.0863262 0.927572 0.363536 +0.215365 0.0153204 0.158845 0.731788 -0.531533 0.426566 +0.0152845 0.327238 -0.207219 -0.0291143 0.645373 -0.763313 +-0.0907214 -0.0360502 0.153985 -0.565745 -0.70388 0.429518 +0.139735 -0.271954 -0.0539359 0.764036 -0.115056 -0.634831 +-0.0578794 -0.0654771 0.13612 -0.40082 -0.852315 0.33601 +-0.283132 -0.345146 -0.0466749 -0.9662 -0.20223 0.159878 +-0.0248803 -0.0209591 -0.177715 -0.290278 -0.721138 -0.629046 +-0.279862 -0.363277 -0.0595648 -0.949713 -0.30417 0.0743339 +-0.272191 -0.38102 -0.0492779 -0.913827 -0.386978 0.123157 +0.152178 0.00805908 -0.183276 0.465771 -0.582626 -0.666036 +-0.234452 -0.447558 -0.0420512 -0.837432 -0.506313 0.205802 +0.00937635 -0.102222 -0.0583027 -0.375047 -0.662643 -0.648262 +-0.113407 0.359932 -0.0517238 -0.464305 0.868996 -0.171074 +0.0556678 -0.300959 0.157097 0.17096 -0.48404 0.858183 +0.0758841 0.369713 0.145725 0.099356 0.813288 0.573316 +0.0370305 0.366765 0.151432 -0.0303294 0.804969 0.592541 +0.089692 0.361433 0.153839 0.161308 0.777212 0.608211 +0.10919 0.361263 0.147056 0.270077 0.771344 0.57627 +-0.0852171 0.335778 0.140615 -0.495707 0.697084 0.518024 +0.158116 0.336487 0.144409 0.512556 0.676409 0.528921 +0.0690219 0.00334053 -0.214117 0.120548 -0.590121 -0.798264 +0.0503154 0.411489 -0.0458328 -0.0161751 0.986643 -0.162092 +0.101573 0.408221 -0.0569972 -0.0238486 0.975192 -0.220073 +-0.0386451 0.391944 -0.0663759 -0.331233 0.920286 -0.208227 +0.320684 0.395828 -0.0492918 0.93912 0.0553525 -0.339103 +-0.0487767 0.393562 -0.0375826 -0.364167 0.922182 -0.13024 +-0.113088 -0.496762 0.0377083 -0.00435614 -0.999926 -0.0113336 +-0.254747 0.357312 -0.0510108 0.0856845 0.995572 -0.0386472 +-0.290751 -0.0854661 -0.222722 -0.896206 0.435791 -0.0830752 +0.170553 0.321986 0.149884 0.554595 0.615491 0.559996 +-0.0394215 0.291026 0.204338 -0.284883 0.457477 0.842352 +0.319241 0.354627 -0.053648 0.940464 -0.0574584 -0.335 +0.243499 0.106569 0.162217 0.811459 0.052068 0.582085 +-0.0241143 -0.065006 0.16455 -0.251923 -0.874087 0.415339 +-0.190852 0.344499 -0.0552914 0.180408 0.977863 -0.106004 +-0.191661 0.345092 -0.0388348 0.16027 0.986256 0.0401716 +-0.31723 0.331607 -0.0542858 -0.895521 0.422843 -0.13873 +0.244599 0.218833 -0.131393 0.843435 0.168012 -0.510284 +0.0249037 0.305467 0.207493 -0.0362649 0.498967 0.865862 +-0.0867345 -0.0666458 0.0592781 -0.541969 -0.837632 0.0681293 +0.129105 -0.249637 0.147549 0.662107 -0.182941 0.726738 +-0.0771943 -0.0631632 -0.0428391 -0.553116 -0.81933 -0.150869 +0.114634 -0.283124 0.144178 0.511965 -0.462142 0.724097 +0.116746 -0.136876 -0.044853 0.58501 0.0340814 -0.81031 +0.0299775 -0.130539 -0.0536744 -0.376045 -0.0810233 -0.923052 +0.0431611 -0.0404509 0.224716 -0.0428354 -0.738566 0.672819 +-0.0369535 -0.471864 0.150955 -0.402264 -0.172954 0.899039 +0.164901 0.130767 0.199816 0.419982 0.508748 0.751526 +-0.199709 -0.16494 -0.0506211 -0.269331 0.886728 0.375733 +0.140971 -0.190845 -0.0396804 0.723555 0.267763 -0.636216 +0.174158 0.331169 0.133429 0.594016 0.667237 0.449377 +0.136295 -0.235974 -0.0573385 0.676981 0.105392 -0.728415 +0.18739 0.306793 0.147891 0.620164 0.55751 0.551887 +0.126663 -0.351325 -0.023607 0.956354 -0.252574 -0.146948 +-0.141244 0.260576 0.152807 -0.696844 0.349907 0.626079 +-0.303413 -0.13527 -0.205045 -0.935617 0.130611 0.327966 +-0.165706 0.216082 0.141647 -0.77893 0.155627 0.607493 +0.251579 0.188957 0.134944 0.837172 0.14382 0.527692 +0.17379 0.118619 0.20658 0.379737 0.642434 0.665641 +0.224349 0.00759339 0.131358 0.747278 -0.563837 0.351658 +-0.00846581 0.00247137 -0.207005 -0.226483 -0.629809 -0.742998 +0.00589148 -0.486922 -0.0505419 -0.592509 -0.760642 0.265249 +-0.0805907 -0.486869 -0.0480277 0.333731 -0.918717 0.211145 +0.155362 0.0679003 -0.215861 0.501894 -0.297005 -0.812337 +0.255259 0.478251 -0.0554775 0.036273 0.778953 -0.626032 +0.051085 -0.136221 0.150881 -0.139072 0.416299 0.898529 +0.141336 -0.237281 0.137318 0.761956 -0.0612994 0.644721 +-0.00684042 -0.298495 0.150137 -0.420721 -0.229346 0.877721 +0.138633 0.41361 -0.0647132 -0.410214 0.854359 -0.319053 +0.033095 0.319399 -0.213141 0.0541901 0.608315 -0.791844 +-0.268721 -0.0513125 -0.221145 -0.7599 0.612691 -0.217167 +0.288326 0.230331 -0.0456187 0.90516 -0.324618 -0.274425 +-0.316697 0.239147 -0.0661619 -0.936915 -0.190372 -0.293171 +-0.303619 0.19268 -0.0549533 -0.892961 -0.424603 -0.149444 +0.277325 0.194395 -0.0599538 0.967855 -0.0128146 -0.251181 +-0.294532 0.178134 -0.0620104 -0.855586 -0.481307 -0.190569 +0.274091 0.0799286 -0.0578364 0.953762 -0.206308 -0.218576 +-0.252762 -0.405608 -0.143064 -0.865211 -0.436033 -0.247559 +-0.105931 -0.0372986 -0.0667763 -0.584353 -0.789441 -0.187923 +0.160145 -0.0655691 -0.0541119 0.539596 -0.785427 -0.303217 +-0.0865912 -0.054136 -0.0556744 -0.575013 -0.799602 -0.173196 +0.0179923 0.365991 0.150807 -0.0804436 0.804026 0.589128 +-0.124028 0.285821 0.154227 -0.628749 0.473053 0.617167 +0.00118448 -0.0416307 -0.161951 -0.195724 -0.81791 -0.541032 +0.174299 0.0547464 0.230241 0.633729 -0.170909 0.754439 +0.182724 -0.0598552 0.0512945 0.671206 -0.730191 0.127686 +0.103928 -0.131067 -0.0523783 0.418414 -0.0423492 -0.907269 +-0.0828862 -0.0476424 0.14407 -0.524215 -0.762737 0.378722 +0.0141688 -0.0358085 -0.174426 -0.145601 -0.781952 -0.606095 +-0.254801 -0.410186 -0.124207 -0.882142 -0.442256 -0.161973 +0.0541634 -0.0866948 0.145616 0.0389008 -0.587178 0.808522 +-0.0981775 -0.157204 -0.0667503 0.0777965 0.963859 0.254803 +0.0367706 -0.0878265 0.143578 -0.149016 -0.642973 0.751252 +-0.273801 -0.216183 -0.0724207 -0.85129 0.468159 0.236924 +0.114732 -0.167721 0.145638 0.583415 0.329183 0.742473 +0.0510449 0.265254 0.22436 0.0843555 0.277658 0.956969 +0.00685042 -0.150536 0.13651 -0.637177 0.355405 0.683881 +-0.00238575 -0.178139 0.140565 -0.687222 0.299399 0.661881 +-0.0284296 -0.22432 0.130347 -0.754456 0.233932 0.613247 +0.0740464 -0.322506 0.135355 0.336357 -0.624364 0.705006 +0.0535842 -0.31593 0.148242 0.213971 -0.556424 0.802876 +0.0402803 -0.326545 0.143977 0.160963 -0.558178 0.813958 +-0.117798 -0.497423 -0.0369943 -0.031748 -0.998342 0.0480194 +0.0167955 -0.45287 0.145378 0.574701 0.238626 0.7828 +0.212355 0.458034 -0.0690102 -0.345726 0.769898 -0.536406 +-0.0151736 -0.228131 0.145458 -0.667839 0.166359 0.725477 +0.254837 0.152708 -0.126441 0.880906 0.00705941 -0.473238 +-0.237409 0.354507 -0.0562615 0.163427 0.9813 -0.101697 +-0.0540719 -0.440634 0.13444 -0.573608 0.48128 0.66283 +-0.270625 -0.270679 -0.228773 -0.808888 -0.330599 -0.486214 +-0.225498 0.00996826 -0.192179 -0.731573 0.593192 -0.336041 +0.302501 0.301257 -0.0711591 0.844496 -0.217662 -0.489336 +-0.322568 0.291606 -0.0630448 -0.952108 0.0476723 -0.302022 +-0.0183451 -0.359672 -0.259502 0.532847 -0.271379 -0.801515 +-0.144883 0.0726929 0.141287 -0.681595 -0.0808685 0.727247 +-0.322607 0.257363 -0.0564269 -0.9737 -0.123656 -0.191358 +0.0703897 -0.0949096 0.138225 0.206235 -0.247966 0.946562 +0.281788 0.210018 -0.0475928 0.954132 -0.168682 -0.247342 +-0.184321 0.00833791 -0.208965 0.431394 0.209553 -0.877489 +0.0266441 -0.10396 -0.0649545 -0.253241 -0.632651 -0.731862 +-0.0900368 0.0402526 -0.202013 -0.395824 -0.514135 -0.760913 +-0.0268788 -0.206612 0.12393 -0.786506 0.291242 0.544598 +0.0581574 -0.123873 -0.0607885 -0.0549532 -0.15422 -0.986507 +-0.0157816 -0.193713 0.132813 -0.747949 0.291487 0.596329 +-0.0334653 -0.260343 0.132879 -0.715368 0.0584122 0.696302 +-0.0871749 -0.16244 -0.0527544 0.0788076 0.942943 0.323494 +0.101559 -0.162657 -0.0586544 0.387765 0.275252 -0.879702 +0.0985096 -0.178674 -0.0661666 0.353595 0.342545 -0.870421 +-0.287814 -0.209043 -0.246971 -0.817629 -0.331675 -0.47061 +0.129566 -0.279612 0.133706 0.641082 -0.429771 0.635855 +0.134703 -0.284291 -0.0571265 0.764432 -0.162334 -0.623932 +-0.292594 -0.295685 -0.0764261 -0.995366 -0.0287491 0.0917653 +0.123249 -0.333251 -0.0525512 0.860991 -0.237434 -0.4498 +0.122167 -0.349648 -0.0443626 0.939043 -0.170239 -0.298692 +-0.0154504 -0.28291 0.147885 -0.55542 -0.104109 0.825027 +-0.225428 -0.469342 -0.0720837 -0.794564 -0.605349 0.0471208 +-0.018242 -0.496989 -0.107885 -0.0418389 -0.999119 0.00328565 +-0.00130402 -0.492034 -0.0651239 -0.32571 -0.815286 0.478771 +-0.0750865 0.0461565 -0.21313 -0.377265 -0.492452 -0.784323 +0.057873 -0.329431 0.136659 0.291602 -0.606629 0.739574 +-0.057829 -0.429939 0.117728 -0.578523 0.655937 0.484827 +0.27751 0.456359 -0.0697876 0.390872 0.575255 -0.71854 +0.119061 0.401739 -0.0823095 -0.0845195 0.930758 -0.355733 +0.0804242 0.408671 -0.0575609 0.0338682 0.979397 -0.199084 +-0.0145784 0.404143 -0.0436067 -0.246229 0.957222 -0.151978 +-0.0425603 -0.426759 0.127965 -0.405741 0.705568 0.580989 +-0.06656 -0.443398 0.122915 -0.749951 0.394456 0.531016 +-0.124932 0.351406 -0.0623185 -0.427045 0.878032 -0.216082 +0.0980628 0.379167 0.124701 0.201548 0.851103 0.48477 +-0.291499 0.353533 -0.0615545 -0.336844 0.881256 -0.331547 +-0.175035 0.341058 -0.0614548 0.0959829 0.977971 -0.185364 +-0.222831 0.350796 -0.0619428 0.196197 0.967555 -0.159197 +-0.305964 0.341382 -0.0658697 -0.644596 0.612585 -0.457423 +0.187569 0.317177 0.135339 0.6395 0.620408 0.454019 +0.256027 0.211196 0.118616 0.884369 0.195 0.424107 +0.0635481 0.249305 0.226471 0.158739 0.17187 0.972246 +-0.14744 0.0928705 0.142636 -0.656293 -0.080856 0.750161 +-0.0119796 0.405071 0.0326758 -0.214133 0.971829 0.0984703 +0.256548 0.039122 -0.0699916 0.865918 -0.425842 -0.262384 +-0.149234 0.0212329 0.123439 -0.835826 -0.332256 0.437038 +-0.105091 -0.0402545 0.122924 -0.608576 -0.74087 0.28416 +0.173075 -0.0536744 -0.0645725 0.528725 -0.797918 -0.289443 +0.167272 0.0171485 -0.180161 0.514416 -0.54215 -0.664417 +0.105698 -0.126033 0.132217 0.543794 0.335289 0.769331 +0.146395 -0.251865 0.127655 0.78538 -0.172697 0.594435 +-0.0142015 -0.311529 0.142419 -0.444253 -0.274727 0.852739 +-0.124553 -0.258154 -0.291845 0.0229396 0.209956 -0.977442 +0.0419321 -0.115987 -0.061622 -0.195662 -0.368445 -0.908826 +-0.127094 0.198744 -0.210902 -0.530962 0.159997 -0.832154 +0.0306541 -0.364081 0.120319 0.234291 -0.513218 0.82566 +0.0720544 -0.138114 -0.0607645 0.0587009 0.0838552 -0.994747 +0.0570525 -0.144661 -0.0609293 -0.0717692 0.176826 -0.981622 +0.0863837 -0.151362 -0.0610329 0.235359 0.21915 -0.946879 +0.00992239 -0.436777 0.14095 0.387855 0.533998 0.751275 +0.0142711 -0.157526 -0.0523281 -0.42957 0.538555 -0.724864 +0.12394 -0.189926 -0.0555422 0.591467 0.291067 -0.751962 +0.0275561 -0.438867 0.128602 0.652737 0.37803 0.656527 +0.161985 0.0237826 0.226417 0.539535 -0.451537 0.710645 +0.0445758 0.376696 0.137066 -0.0086198 0.843955 0.536344 +0.144577 0.351703 0.136614 0.458356 0.735472 0.498991 +-0.291033 -0.278811 -0.0677837 -0.984729 0.0735749 0.157784 +0.126266 -0.299544 -0.0627642 0.75615 -0.203955 -0.621804 +0.122229 -0.365094 -0.0367248 0.984232 -0.0510224 -0.169363 +-0.0995039 0.332463 0.130045 -0.548472 0.689365 0.473238 +0.261141 0.175928 0.120016 0.90521 0.114605 0.409219 +-0.175765 0.168528 0.13132 -0.78707 -0.0794632 0.611724 +0.16938 -0.475723 -0.0660928 0.982104 -0.1844 -0.038329 +0.163148 0.0403521 0.234633 0.580033 -0.31989 0.749155 +0.190502 0.313052 -0.149322 0.399564 0.354925 -0.845208 +0.164485 -0.485972 -0.0493208 0.831334 -0.494978 0.252745 +-0.270845 0.159182 -0.102431 -0.813558 -0.470604 -0.341548 +0.134962 -0.0687702 0.123404 0.500314 -0.750536 0.43172 +0.0741287 -0.498866 -0.0552448 0.00289077 -0.999979 0.00584196 +-0.0864057 -0.497708 -0.0611178 0.341444 -0.918181 0.200897 +0.167551 0.108021 0.221752 0.491198 0.575867 0.65353 +0.203167 0.445201 -0.0805759 -0.353099 0.730393 -0.584677 +0.279342 0.440118 -0.0799869 0.463504 0.469047 -0.75177 +0.103698 -0.109882 0.127635 0.515992 0.181496 0.837145 +0.0412595 0.407492 -0.0659587 -0.0330434 0.97859 -0.203148 +0.313883 0.385762 -0.0656048 0.86104 0.0681263 -0.503953 +0.155128 0.25896 -0.20502 0.497847 0.381329 -0.778933 +0.309911 0.330608 -0.0689044 0.866521 -0.121837 -0.484042 +0.312298 0.316399 -0.0596015 0.902184 -0.186989 -0.388715 +0.00188633 -0.423327 0.132233 0.181774 0.66279 0.726407 +-0.316363 0.255489 -0.0738673 -0.91559 -0.109038 -0.387048 +-0.0316516 -0.414689 0.11918 -0.313909 0.657973 0.684495 +0.27964 0.157432 -0.0560624 0.979516 0.0415579 -0.197031 +-0.237968 0.199079 -0.158424 -0.507439 -0.0487754 -0.860306 +0.274905 0.098586 -0.0673809 0.959764 -0.133009 -0.247308 +0.130263 0.123961 0.235795 0.518751 0.680556 0.517437 +-0.0214911 -0.0863676 -0.0630294 -0.326931 -0.861603 -0.388275 +-0.00232151 -0.0888945 -0.0701547 -0.280399 -0.840134 -0.464275 +-0.00777715 0.218202 0.232034 -0.146437 0.100378 0.984114 +0.0743287 -0.119248 -0.0620333 0.106479 -0.235703 -0.965974 +0.0620518 -0.108033 -0.0671954 0.0241251 -0.521437 -0.852949 +-0.148181 0.278634 0.129848 -0.744643 0.474681 0.469238 +-0.169324 0.232464 0.130355 -0.82017 0.255037 0.51213 +0.0812999 -0.166181 -0.0667481 0.212314 0.335717 -0.917724 +0.0659582 -0.157048 -0.0654793 0.0270767 0.313637 -0.949157 +-0.262711 -0.383907 -0.144174 -0.886278 -0.39242 -0.246005 +-0.175429 0.184172 0.132727 -0.825257 0.00663549 0.564718 +0.254428 0.148928 0.139074 0.850794 0.103301 0.515246 +0.256554 0.0803094 0.1345 0.895155 -0.165988 0.413697 +0.265492 0.106078 0.119984 0.925886 -0.0431816 0.375328 +0.111148 -0.333346 -0.0703824 0.78584 -0.129848 -0.604644 +0.103877 -0.349544 -0.078154 0.772597 0.0249941 -0.634404 +-0.0248905 -0.0730208 0.145212 -0.246542 -0.899102 0.361708 +0.115992 -0.381806 -0.0667806 0.889257 0.235544 -0.392098 +0.151567 -0.193418 0.113413 0.837949 0.232698 0.493653 +-0.0303438 -0.335692 0.124036 -0.527006 -0.304571 0.793411 +-0.0149084 -0.418728 0.127918 -0.075002 0.691671 0.718308 +0.139431 -0.498681 -0.0708964 0.131584 -0.991231 -0.0120849 +-0.195167 0.0498436 -0.0932554 -0.76921 -0.633493 0.083685 +0.164567 0.00297433 -0.169156 0.500117 -0.610343 -0.6143 +0.120736 0.384299 0.0991408 0.359625 0.847996 0.389322 +0.165872 0.432013 -0.0632629 -0.540012 0.770911 -0.337763 +0.0174769 0.386084 0.118248 -0.0928776 0.882066 0.46188 +-0.161372 0.263873 0.121697 -0.797941 0.407919 0.443726 +-0.183188 0.168365 -0.182071 -0.419526 0.00787978 -0.907709 +-0.0121008 -0.466039 -0.205498 0.0279312 -0.0550673 -0.998092 +-0.187123 0.159988 0.113843 -0.862556 -0.0373238 0.504583 +-0.155993 0.0403903 0.122618 -0.821179 -0.203247 0.53325 +-0.158978 0.342824 -0.050424 -0.106951 0.984653 -0.137912 +-0.30105 0.329679 -0.0812045 -0.589171 0.489171 -0.643109 +-0.314716 0.287558 -0.0801469 -0.865981 0.0461545 -0.497942 +0.219678 -0.00706404 0.114499 0.713943 -0.633246 0.298806 +0.281526 0.227844 -0.0618225 0.888663 -0.25375 -0.381956 +0.274091 0.115778 -0.0775017 0.954704 -0.0776468 -0.287249 +-0.225688 0.0835084 -0.0573335 -0.771052 -0.632 -0.0778115 +-0.202404 0.0558057 -0.0578286 -0.777548 -0.627897 -0.0341132 +0.0941075 -0.441865 0.0299204 0.723073 -0.16257 0.671369 +0.247566 0.0237566 -0.070874 0.81925 -0.507145 -0.267645 +0.0956453 -0.0926568 -0.0724673 0.2848 -0.681599 -0.674027 +0.0762923 -0.094774 -0.0763411 0.159213 -0.708236 -0.687789 +0.108596 -0.006076 0.235057 0.276285 -0.497219 0.82246 +0.00660611 -0.105088 0.120605 -0.542845 -0.304754 0.782588 +0.0605014 -0.172369 -0.0721483 0.0885063 0.462426 -0.882229 +0.0134662 -0.118271 0.125352 -0.601173 0.184444 0.777542 +0.00750995 -0.170158 -0.0656379 -0.147926 0.864553 -0.480276 +-0.00328084 -0.148108 0.123966 -0.747531 0.34937 0.564923 +0.160427 -0.235917 0.107467 0.892354 -0.0240093 0.450698 +0.109095 -0.194624 -0.0671001 0.468464 0.312642 -0.826315 +-0.27402 -0.379826 -0.0679366 -0.922226 -0.385996 0.0225077 +-0.275451 0.157779 -0.0859395 -0.814358 -0.524928 -0.247533 +-0.0399473 -0.295898 0.126008 -0.690319 -0.0689761 0.720209 +-0.200402 -0.431214 -0.210036 -0.647002 -0.450876 -0.614897 +0.13947 -0.418351 -0.0567135 0.755422 0.653849 -0.0426513 +-0.250103 -0.427279 -0.078966 -0.88127 -0.472564 0.00682423 +-0.0193953 -0.352892 0.122959 -0.362111 -0.383072 0.849783 +0.0221584 -0.379287 0.113974 0.219555 -0.323117 0.920539 +-0.0713745 -0.48952 -0.0673949 0.406395 -0.876012 0.259706 +-0.21097 -0.485067 -0.0648553 -0.635605 -0.766948 0.0882966 +-0.219741 -0.400757 -0.210833 -0.69309 -0.435564 -0.574378 +0.145317 0.0124595 0.230296 0.45816 -0.520502 0.720532 +-0.0135407 0.382496 0.116325 -0.190944 0.874274 0.446302 +0.275229 0.160719 -0.0750012 0.966235 0.0361304 -0.255117 +0.268707 0.12304 0.112161 0.935468 0.0120314 0.353206 +-0.262338 -0.330012 -0.202103 -0.835055 -0.332447 -0.438364 +-0.17018 0.0934213 0.118802 -0.677132 -0.192035 0.710363 +0.207363 0.43675 -0.0922065 -0.258404 0.663279 -0.702345 +-0.136283 -0.00963234 0.115296 -0.78058 -0.54019 0.314468 +0.313332 0.367448 -0.0678993 0.868194 0.000140158 -0.496226 +0.145026 -0.292561 0.101245 0.752907 -0.5221 0.400678 +0.0332458 -0.330579 -0.201544 0.945878 -0.0231107 -0.323699 +-0.214787 0.343943 -0.0805595 0.168455 0.918231 -0.358433 +-0.127711 0.0800253 -0.201606 -0.449636 -0.288465 -0.845349 +-0.178639 0.336768 -0.0793051 0.128943 0.937136 -0.324268 +0.0404747 -0.446916 0.115947 0.835854 0.159434 0.525289 +-0.287279 -0.260911 -0.198407 -0.928523 -0.271498 -0.253245 +0.0384602 -0.467897 0.120964 0.860823 -0.0950429 0.49995 +-0.309086 0.222996 -0.0767245 -0.905975 -0.242707 -0.346847 +-0.112406 -0.460055 0.114022 0.0489366 -0.109742 0.992755 +-0.139871 -0.469144 0.110524 -0.285117 -0.291228 0.913178 +-0.136834 -0.009551 -0.0802446 -0.636718 -0.753745 -0.162661 +0.103362 -0.103 -0.0607173 0.393222 -0.473446 -0.788179 +0.159695 0.0570571 0.242522 0.599863 -0.14936 0.786038 +0.0813167 0.38871 0.112185 0.121433 0.888992 0.441528 +0.217639 0.187848 -0.177391 0.738566 0.128416 -0.661838 +-0.197486 -0.157735 -0.0686604 -0.242558 0.931253 0.271906 +-0.225978 -0.167506 -0.0737109 -0.465205 0.844607 0.264998 +0.0245066 -0.175785 -0.0762523 0.0262152 0.805278 -0.592318 +0.164892 0.351622 0.111483 0.577787 0.72741 0.370186 +-0.18913 0.197381 -0.178198 -0.324165 0.106058 -0.940036 +0.0788438 -0.178663 -0.0722818 0.224249 0.398278 -0.889431 +-0.266644 -0.200466 -0.0821241 -0.781009 0.586872 0.213558 +0.0977935 -0.225619 -0.0847177 0.518169 0.262443 -0.814018 +0.157295 0.121826 0.214248 0.447184 0.654177 0.609983 +-0.291486 -0.313031 -0.0840672 -0.992028 -0.12361 0.0245251 +0.264458 0.0862333 0.118023 0.924167 -0.139377 0.355654 +-0.226824 -0.46717 -0.091766 -0.811258 -0.583282 -0.0405304 +0.240755 0.0181884 0.108895 0.811106 -0.509482 0.287289 +-0.117167 -0.0336781 0.112066 -0.664793 -0.702739 0.253392 +-0.218731 0.313323 -0.123572 -0.0422448 0.677589 -0.734227 +0.0171787 -0.498432 -0.0621371 -0.248524 -0.960999 0.121312 +0.123911 -0.112601 0.110546 0.748224 0.137683 0.649003 +-0.0130256 -0.154885 0.113203 -0.825605 0.330506 0.45732 +0.270381 0.425004 -0.0935039 0.424141 0.395192 -0.814817 +0.239959 0.261081 -0.126871 0.697415 0.0736629 -0.712871 +0.155647 0.421056 -0.071786 -0.496916 0.77409 -0.392249 +-0.00836768 0.398602 -0.0774394 -0.226384 0.948197 -0.222873 +-0.183062 0.0317736 -0.0662339 -0.767035 -0.640325 -0.0405113 +0.0221701 -0.413164 0.115005 0.432654 0.346674 0.832243 +0.261775 0.139849 -0.112283 0.908271 -0.0248613 -0.417643 +0.303527 0.393831 -0.0785301 0.740795 0.139486 -0.657089 +0.138105 0.0825176 0.258664 0.542768 0.133477 0.829209 +0.155904 -0.0190395 -0.151567 0.467304 -0.699081 -0.541214 +-0.00221618 -0.281727 -0.250055 0.699893 0.217416 -0.680353 +0.114039 0.0240491 0.253169 0.249833 -0.553814 0.794275 +-0.275571 -0.0579841 -0.207892 -0.837151 0.546971 -0.000993888 +0.23508 -0.00170709 -0.0508988 0.76271 -0.614935 -0.200321 +0.133768 0.381816 0.0909142 0.432344 0.826008 0.361647 +-0.137491 0.306902 0.112645 -0.710254 0.582775 0.394858 +0.206055 -0.0321821 -0.0526352 0.657377 -0.722755 -0.213263 +-0.0874657 -0.0434554 -0.0930541 -0.515128 -0.80791 -0.286224 +0.108958 -0.0812897 -0.0803144 0.323601 -0.784321 -0.529267 +-0.181818 -0.0336348 -0.202097 0.864936 -0.308367 -0.395974 +0.153122 -0.0581636 0.121997 0.510036 -0.789475 0.341457 +-0.21401 -0.165278 -0.062132 -0.375372 0.871224 0.31633 +0.0430862 -0.173812 -0.0737348 0.0206469 0.630112 -0.77623 +0.146199 -0.0686638 0.108791 0.560306 -0.732359 0.386921 +-0.260419 -0.189319 -0.094596 -0.73165 0.65998 0.17063 +0.11271 -0.269887 -0.0804513 0.650652 0.0103691 -0.759305 +0.0957125 -0.333006 -0.0877017 0.699183 -0.0851113 -0.709859 +-0.288578 -0.330784 -0.0755582 -0.983761 -0.174942 0.0401175 +0.100105 -0.369545 -0.085838 0.697921 0.160212 -0.698024 +0.148445 -0.0766617 0.0911277 0.678715 -0.601584 0.421239 +-0.0492045 -0.0791046 0.102481 -0.389201 -0.886986 0.248553 +0.188833 0.105599 -0.201932 0.625443 -0.155807 -0.764556 +0.167069 -0.233093 0.0930809 0.932971 -0.0120582 0.359749 +0.264911 0.451701 -0.078755 0.25684 0.600781 -0.757031 +0.194974 0.448638 -0.0694724 -0.455953 0.757127 -0.467831 +0.163713 -0.21725 0.0992415 0.911917 0.0945565 0.399332 +0.174844 0.428906 -0.0796751 -0.466963 0.734423 -0.492512 +0.149274 0.409527 -0.0851153 -0.399059 0.782634 -0.47774 +-0.053834 -0.262237 0.109784 -0.761299 0.125069 0.636225 +-0.018894 0.391096 -0.0955529 -0.273824 0.919783 -0.281105 +-0.0528097 0.383197 -0.0784334 -0.383419 0.891337 -0.241882 +-0.049782 -0.304132 0.114983 -0.71474 -0.0807435 0.694713 +-0.145471 0.337373 -0.081727 -0.236141 0.913966 -0.330004 +-0.197036 0.336952 -0.0887442 0.170276 0.891387 -0.420042 +0.301831 0.318428 -0.0784946 0.808162 -0.156086 -0.567901 +0.106227 -0.323558 0.112758 0.515771 -0.669463 0.534601 +0.271656 0.229658 -0.0826734 0.875077 -0.137892 -0.463925 +0.276211 0.211682 -0.06667 0.938272 -0.0882517 -0.33445 +-0.300725 0.208276 -0.086111 -0.877839 -0.296372 -0.376248 +-0.299068 0.192347 -0.0737414 -0.871271 -0.408527 -0.272015 +-0.28831 0.175334 -0.0790517 -0.840213 -0.472544 -0.265977 +0.219154 -0.0295229 0.00402322 0.712542 -0.700971 -0.0303854 +0.269754 0.0836299 -0.0773885 0.937137 -0.193784 -0.29021 +0.0537311 -0.382424 0.0985028 0.538195 -0.366119 0.759146 +0.127401 -0.0778784 -0.0713164 0.428818 -0.775271 -0.463757 +0.0361445 -0.411388 0.105663 0.572871 0.127291 0.809701 +0.024719 -0.396424 0.109616 0.369831 0.0096617 0.929049 +-0.153532 -0.14281 -0.0910509 0.0168219 0.970355 0.241099 +0.0781521 0.162432 0.242323 0.552332 0.628374 0.547791 +0.0915398 -0.192247 -0.0742731 0.337561 0.388039 -0.8576 +-0.151794 0.292491 0.106279 -0.757767 0.533334 0.375958 +-0.193515 0.172399 0.101399 -0.916382 0.0384614 0.398452 +0.25051 0.0304539 0.100701 0.849864 -0.450734 0.273074 +0.256683 0.0500823 0.110392 0.88024 -0.367306 0.30044 +0.157537 -0.440683 -0.0752523 0.804758 0.573107 -0.154637 +-0.129537 -0.0241657 0.102651 -0.7306 -0.642169 0.232038 +-0.0534331 -0.482487 -0.0736865 0.0937424 -0.955344 0.280231 +-0.146939 0.260236 -0.175856 -0.459844 0.450918 -0.764995 +0.158566 -0.494013 -0.0673881 0.615277 -0.786605 -0.0518319 +-0.0145416 -0.495439 -0.0785983 -0.18707 -0.93484 0.301792 +0.21071 -0.0200405 0.105656 0.665776 -0.695607 0.26995 +0.0724129 -0.0127072 -0.200813 0.133245 -0.667713 -0.732396 +-0.0842293 -0.498447 -0.0794214 0.132985 -0.99096 0.0176978 +-0.104202 -0.495594 -0.0872806 -0.0508805 -0.994483 -0.0917274 +0.200026 -0.0333159 0.0957373 0.635563 -0.731182 0.247854 +0.262658 0.437129 -0.0902027 0.298245 0.519809 -0.80053 +0.0866401 0.144781 0.255801 0.562948 0.605855 0.562164 +0.110977 0.393636 -0.101326 0.0407578 0.904949 -0.423565 +-0.0941859 -0.0515914 0.113123 -0.564515 -0.790694 0.236908 +0.291649 0.347603 -0.0950538 0.703227 -0.0298058 -0.710341 +0.291908 0.309153 -0.088538 0.744819 -0.166073 -0.64627 +-0.104989 -0.499053 -0.0689836 -0.0475955 -0.997502 -0.0521937 +0.285936 0.273822 -0.0837343 0.763977 -0.267404 -0.587226 +0.274334 0.257988 -0.0905717 0.754014 -0.257417 -0.604318 +-0.0142674 -0.111655 0.0971542 -0.81633 -0.287704 0.50083 +0.150983 -0.159176 0.0930601 0.86914 0.296589 0.395766 +-0.0680848 0.329113 -0.175149 -0.398422 0.703578 -0.58842 +-0.0633163 0.0357991 -0.212168 -0.347062 -0.529217 -0.774259 +0.119412 -0.310433 0.115719 0.582846 -0.621852 0.523059 +0.0608464 -0.0940636 -0.0795298 0.0382096 -0.750522 -0.659739 +-0.0227334 -0.370779 0.113519 -0.352172 -0.324215 0.877986 +0.0786911 -0.359722 0.0948824 0.547018 -0.578365 0.605198 +0.0183831 -0.186371 -0.0944399 0.249434 0.843588 -0.475544 +0.0540411 -0.187619 -0.0827735 0.20276 0.587194 -0.78364 +-0.276676 -0.212583 -0.0925061 -0.861324 0.479145 0.16894 +-0.184644 -0.438594 -0.220034 -0.57883 -0.454541 -0.677014 +0.0987507 -0.243356 -0.0889109 0.588587 0.164684 -0.791483 +-0.176699 -0.426583 -0.233655 -0.504051 -0.444368 -0.740587 +-0.0727928 -0.0463083 -0.105763 -0.4336 -0.820798 -0.371864 +-0.0679151 -0.0299849 -0.140871 -0.365432 -0.789077 -0.493778 +-0.21996 -0.33985 -0.247723 -0.584817 -0.35394 -0.729874 +0.120053 -0.396674 -0.0701423 0.828825 0.433302 -0.353976 +-0.0424946 -0.171128 -0.107071 0.348789 0.932624 -0.0925177 +0.143307 -0.42511 -0.0759562 0.682312 0.699405 -0.212798 +0.187593 0.327687 0.118586 0.663365 0.657543 0.35719 +-0.264136 -0.370385 -0.157878 -0.881144 -0.37248 -0.291281 +0.240126 0.269199 0.104127 0.817627 0.463977 0.340898 +-0.159775 -0.49612 -0.0714193 0.0164764 -0.999445 0.0289616 +0.26445 0.0627502 0.101014 0.913584 -0.301317 0.273079 +-0.0647272 -0.495593 -0.0872676 0.185811 -0.960381 0.207708 +0.00480607 -0.0376975 0.21797 -0.210777 -0.695185 0.687234 +0.0986215 -0.498975 -0.0765008 -0.00658905 -0.999968 -0.00464094 +-0.1052 -0.0496552 0.0872903 -0.605544 -0.780403 0.155846 +-0.190497 0.061734 -0.199144 0.192259 -0.159921 -0.968226 +-0.0621434 -0.30876 0.101522 -0.716699 -0.0788346 0.692912 +-0.0384682 -0.376105 0.103625 -0.520683 -0.17182 0.836282 +0.0999157 0.399934 -0.0865574 0.0364532 0.944452 -0.326621 +-0.0804154 -0.424558 0.100652 -0.00594613 0.5914 0.806356 +-0.15109 0.302525 0.0925443 -0.756589 0.561369 0.335318 +-0.144601 0.204151 -0.198468 -0.529661 0.187647 -0.827193 +-0.288553 0.306197 -0.104617 -0.557122 0.355968 -0.750268 +-0.0558684 -0.1666 -0.116613 0.360762 0.930027 -0.0700078 +0.0477056 -0.458027 0.102353 0.904887 -0.0162411 0.425342 +0.278744 0.298897 -0.0994712 0.670093 -0.168521 -0.722894 +-0.253749 0.128831 -0.090128 -0.788124 -0.579342 -0.207902 +-0.0217346 -0.18191 -0.134042 0.42336 0.894084 -0.146221 +0.147603 0.372921 0.0930828 0.50742 0.791455 0.34077 +0.264714 0.0910013 -0.0957537 0.915669 -0.167311 -0.365456 +-0.173774 0.02363 -0.0933503 -0.712555 -0.696953 -0.0807615 +0.262733 0.237185 0.0853024 0.879293 0.30973 0.361816 +0.277687 0.243678 -0.0786915 0.818606 -0.276623 -0.503353 +-0.19187 0.116755 0.0964816 -0.880419 -0.165809 0.444263 +-0.178427 0.0679305 0.0974112 -0.856298 -0.281066 0.433309 +-0.236433 -0.36925 -0.213251 -0.735509 -0.398128 -0.548198 +-0.019057 -0.17552 -0.0819854 0.178732 0.974325 -0.136917 +0.0374461 -0.186174 -0.0866248 0.22045 0.718168 -0.660028 +-0.0925388 -0.0572421 0.096474 -0.560521 -0.806917 0.18628 +0.164838 -0.249639 0.0956524 0.92087 -0.130643 0.36733 +-0.0650744 -0.275297 0.0987604 -0.735603 0.0872763 0.671767 +-0.0484415 -0.357341 0.102759 -0.610999 -0.237763 0.755082 +-0.270158 -0.383815 -0.105536 -0.912206 -0.392797 -0.116577 +-0.14888 -0.422484 0.084511 -0.370962 0.644966 0.668136 +-0.148367 -0.434801 0.100198 -0.424515 0.601874 0.676413 +0.144899 -0.432997 -0.0913314 0.632415 0.662611 -0.401246 +-0.163487 -0.478971 0.0919725 -0.631737 -0.502564 0.590202 +-0.148223 -0.492922 0.08571 -0.29863 -0.887657 0.350549 +0.037577 0.112924 0.292936 0.115914 -0.160822 0.980153 +-0.00204195 0.396915 0.0860238 -0.169798 0.938772 0.299792 +0.00472583 0.391625 0.103395 -0.133283 0.911032 0.390201 +0.271509 0.23237 0.0687746 0.876867 0.236646 0.418452 +-0.122099 -0.495483 -0.0937029 0.0284718 -0.99959 0.00287899 +0.149935 -0.495647 -0.0857824 0.462874 -0.858124 -0.222194 +-0.19261 0.220568 0.0809041 -0.941388 0.232036 0.244843 +-0.0281451 -0.496149 -0.0948088 -0.115451 -0.983006 0.142727 +-0.206667 0.0606657 -0.201274 -0.0964117 -0.459811 -0.882768 +0.274012 0.135179 0.0959412 0.953079 0.0427549 0.299687 +0.276894 0.410835 -0.0955787 0.509066 0.291107 -0.810005 +-0.117627 -0.041983 0.00206804 -0.626519 -0.771975 -0.107369 +0.15632 -0.281307 0.090239 0.840788 -0.433803 0.323867 +-0.0568539 -0.339339 0.100768 -0.673736 -0.196346 0.71241 +-0.135174 -0.424263 0.0945365 -0.249147 0.749877 0.61287 +-0.113868 -0.432658 -0.251082 -0.0245573 -0.518527 -0.854708 +-0.274158 0.338163 -0.0901782 -0.253425 0.700578 -0.667058 +-0.179729 0.330238 -0.0955255 0.107664 0.884039 -0.454844 +-0.177294 -0.467703 0.0770411 -0.867035 -0.266524 0.420969 +0.1981 0.149326 -0.200077 0.662832 -0.0251782 -0.748345 +-0.129532 0.21741 -0.205118 -0.534541 0.222573 -0.815308 +0.275892 0.278497 -0.0967975 0.698155 -0.212913 -0.683555 +-0.29342 0.21512 -0.104808 -0.841913 -0.207294 -0.498209 +0.263989 0.202521 -0.0988815 0.91338 0.0832595 -0.398503 +0.270161 0.164571 -0.0914286 0.944738 0.047489 -0.324367 +0.270499 0.100469 -0.0830457 0.942557 -0.125106 -0.309734 +0.25579 0.0615014 -0.098379 0.871639 -0.311095 -0.378769 +-0.13561 -0.00589014 -0.101264 -0.583609 -0.797754 -0.151623 +0.0421853 0.393774 0.105637 -0.0172882 0.912163 0.409462 +-0.190624 -0.151993 -0.0870727 -0.253159 0.939826 0.22943 +0.0446018 0.404241 0.0778753 -0.0232397 0.961964 0.272186 +0.0643468 -0.205845 -0.0929106 0.349237 0.52463 -0.7764 +-0.289179 -0.247722 -0.0868566 -0.963522 0.226386 0.142737 +0.21845 0.244132 0.156447 0.667227 0.25816 0.698686 +-0.288707 -0.329004 -0.0967565 -0.979141 -0.19819 -0.0447647 +0.0802603 -0.334146 -0.101114 0.633146 -0.0914258 -0.768614 +0.0899222 -0.349817 -0.0918856 0.647263 0.0300178 -0.761675 +0.177384 0.198135 -0.211577 0.583284 0.176848 -0.792783 +0.101317 -0.402443 -0.0966185 0.493561 0.407869 -0.768141 +0.116354 -0.405085 -0.0857745 0.644332 0.547336 -0.534097 +-0.258097 -0.412309 -0.0854308 -0.884691 -0.465393 -0.0270528 +-0.242282 -0.441368 -0.0920972 -0.878779 -0.474912 -0.0469619 +0.243266 0.282561 0.071802 0.782496 0.55924 0.273769 +-0.178564 0.256006 0.0905363 -0.882762 0.369486 0.290192 +-0.0857655 -0.496505 -0.0971977 -0.0182823 -0.998877 -0.0437033 +-0.151663 -0.496961 -0.10232 0.020381 -0.999499 0.0242011 +-0.186557 0.226624 0.0965246 -0.917098 0.249878 0.310632 +0.253478 0.420798 -0.102666 0.266494 0.4231 -0.866006 +0.179601 0.41908 -0.0953129 -0.364784 0.667767 -0.648861 +-0.186959 0.239599 0.0824822 -0.920931 0.298912 0.250075 +-0.192027 0.207463 0.0934218 -0.933593 0.187011 0.305665 +0.0925881 0.394806 -0.101932 0.0834309 0.92406 -0.373032 +0.137214 0.414507 0.0252838 -0.23176 0.859926 0.454769 +0.0704777 0.355252 -0.172714 0.189687 0.743756 -0.640972 +-0.174221 0.0421439 0.0824143 -0.881724 -0.388625 0.267459 +-0.161873 0.0136853 0.0777213 -0.860631 -0.467342 0.202249 +0.279356 0.337669 -0.105007 0.611408 -0.0473638 -0.789897 +-0.0760394 -0.304982 0.0876509 -0.700389 -0.0719865 0.710122 +-0.28165 0.17265 -0.0940832 -0.834625 -0.438629 -0.333177 +0.140617 -0.309095 0.0831945 0.743013 -0.594669 0.307084 +-0.262841 0.143875 -0.0969271 -0.798098 -0.546518 -0.253689 +-0.234189 0.10154 -0.0881376 -0.789582 -0.586922 -0.179116 +-0.0492834 -0.388396 0.0941271 -0.657902 -0.0172127 0.752907 +-0.164786 -0.434552 0.085312 -0.606892 0.540786 0.582437 +-0.13509 -0.160131 -0.209 0.0727013 0.924149 -0.37505 +0.0348839 -0.496701 0.0825737 0.294091 -0.949595 0.108532 +0.0161841 0.399165 0.0875003 -0.108843 0.942159 0.317001 +0.000436721 -0.18401 -0.102666 0.273507 0.912837 -0.303187 +-0.283579 -0.222607 -0.104052 -0.915494 0.383144 0.122762 +0.0334033 0.400059 0.0893707 -0.0533637 0.94144 0.332932 +0.103799 0.398107 0.0789822 0.222824 0.919136 0.324865 +-0.29262 -0.299405 -0.114865 -0.990541 -0.125239 -0.0560631 +0.074413 -0.381963 -0.10521 0.524765 0.167704 -0.834564 +-0.0356326 0.387414 0.0898084 -0.296992 0.901449 0.314938 +0.157897 -0.44784 -0.0904056 0.801174 0.450871 -0.393491 +-0.0195129 0.236747 -0.251282 -0.207545 0.262622 -0.942314 +0.1627 -0.465035 -0.0928076 0.884337 0.0753758 -0.460725 +-0.12837 0.330811 0.0885302 -0.661557 0.67211 0.332582 +0.137925 0.266964 -0.211185 0.442502 0.408237 -0.798458 +-0.0460146 -0.493543 -0.0926786 -0.000329131 -0.957314 0.289049 +-0.103377 -0.495243 -0.106658 -0.00591944 -0.999929 0.0103603 +0.0634344 0.220432 -0.256407 0.178941 0.243529 -0.953244 +0.0659949 -0.498677 -0.0856049 -0.000750508 -0.999882 -0.0153698 +0.278762 0.113464 0.0791977 0.969634 -0.0438055 0.240607 +-0.0134715 0.313815 -0.214246 -0.178719 0.605618 -0.775427 +0.283523 0.388377 0.00173461 -0.0838105 0.098054 0.991646 +-0.149951 0.329371 -0.0976935 -0.194819 0.884925 -0.423029 +-0.167032 -0.413296 -0.247138 -0.42297 -0.444781 -0.789472 +0.264366 0.285189 -0.108565 0.626235 -0.149361 -0.765194 +-0.0177379 0.268335 -0.240559 -0.195719 0.390395 -0.899603 +-0.196425 -0.325496 -0.268569 -0.435198 -0.299893 -0.848921 +-0.0481005 -0.19788 0.0786883 -0.777106 0.480942 0.405957 +-0.222456 0.0889192 -0.0983912 -0.864412 -0.484917 0.132841 +0.0364765 0.358853 -0.17442 0.039397 0.777754 -0.627333 +0.257629 0.0801592 -0.106364 0.880309 -0.221359 -0.419591 +-0.218797 0.0726272 -0.108689 -0.73872 -0.45732 0.495128 +-0.0717343 -0.338144 0.0860885 -0.719653 -0.176533 0.671517 +-0.194776 0.270388 -0.00165462 -0.831067 0.0715674 0.551548 +-0.10495 -0.498004 -0.171321 -0.000924719 -0.999903 -0.0138898 +-0.114098 -0.496848 0.0756655 -0.00458157 -0.997319 0.0730364 +0.2027 -0.0197553 -0.0920904 0.634542 -0.693157 -0.341891 +0.19402 -0.0170912 -0.111596 0.607307 -0.680202 -0.410492 +0.0716284 -0.0830071 -0.0926914 0.125209 -0.833916 -0.5375 +-0.109605 -0.493872 0.0960679 -0.0354798 -0.875685 0.481578 +-0.186719 -0.146255 -0.103385 -0.270752 0.939313 0.210676 +0.162542 0.366112 0.0848856 0.582531 0.748173 0.317638 +-0.071488 0.376239 0.0769741 -0.446723 0.859286 0.249131 +-0.13303 0.334651 0.0696786 -0.669779 0.684935 0.286812 +-0.20501 0.160905 0.0666876 -0.975263 0.0453715 0.216341 +0.270679 0.0692541 0.0848554 0.9377 -0.260319 0.230114 +-0.265277 -0.240604 -0.255801 -0.674948 -0.381517 -0.631578 +0.229213 0.462641 -0.0709109 -0.181145 0.75976 -0.624461 +-0.019656 -0.137 0.0801512 -0.951015 0.157486 0.266023 +0.153922 -0.13777 0.0650202 0.953249 0.229023 0.197143 +-0.0672158 -0.382425 0.0782142 -0.52084 0.00447983 0.853642 +-0.0907406 -0.153224 -0.103099 0.249296 0.968376 -0.00998041 +-0.146697 -0.403786 0.0735172 -0.20069 0.310314 0.929209 +0.113711 -0.417042 -0.0997399 0.408495 0.590682 -0.695864 +-0.078559 -0.497217 -0.152436 0.00510229 -0.999328 0.0363091 +0.142097 -0.442945 -0.106944 0.554492 0.491995 -0.671178 +0.105424 0.210326 0.213868 0.439017 -0.116434 0.890903 +-0.10508 -0.412845 0.0858386 -0.19758 0.648862 0.734806 +-0.213267 -0.483927 -0.0972475 -0.68301 -0.729689 -0.0324409 +-0.0274403 0.183455 -0.258155 -0.250019 0.0810899 -0.964839 +-0.00614714 -0.499537 0.0820798 0.0073281 -0.999918 -0.0104558 +0.0307763 -0.498009 0.067973 0.157025 -0.98671 0.0418005 +0.130099 -0.498766 -0.0895769 0.109168 -0.984903 -0.134342 +0.103466 -0.496862 -0.107268 0.0470748 -0.911401 -0.408818 +-0.0416476 0.175682 -0.254872 -0.289758 0.0702101 -0.954521 +0.246954 0.403872 -0.111254 0.240639 0.336796 -0.910308 +0.175598 0.400962 -0.10963 -0.247516 0.598968 -0.76156 +0.162788 0.404168 -0.101472 -0.336152 0.689948 -0.641073 +0.0295094 0.394015 -0.112735 -0.0587914 0.93336 -0.354095 +0.146856 0.397247 -0.101885 -0.238395 0.776742 -0.582957 +0.277859 0.379525 -0.103567 0.556984 0.161945 -0.814581 +-0.0953201 0.356868 -0.097354 -0.449665 0.841375 -0.299815 +0.185864 0.347135 0.0778689 0.697339 0.666921 0.262555 +-0.177257 0.273424 0.0671584 -0.873281 0.428756 0.231405 +-0.14857 0.321456 -0.113694 -0.257768 0.836703 -0.483201 +-0.188691 0.247322 0.062785 -0.93235 0.312706 0.18149 +-0.272091 0.307789 -0.113987 -0.404302 0.464899 -0.787661 +-0.264841 0.293187 -0.125403 -0.413026 0.400985 -0.817692 +0.26971 0.218582 0.0806128 0.917563 0.182269 0.353349 +-0.291474 0.201041 -0.100901 -0.845991 -0.303403 -0.438458 +-0.282733 0.187456 -0.10692 -0.824776 -0.353357 -0.441456 +-0.251599 0.142287 -0.122098 -0.798863 -0.431488 -0.41909 +-0.0785025 0.382433 -0.0151483 -0.433732 0.900316 -0.0361541 +0.27544 0.0699946 0.0640207 0.955558 -0.245197 0.163671 +0.262395 0.0379754 0.0725655 0.890385 -0.403882 0.209988 +-0.209921 0.0431212 -0.118699 -0.614298 -0.401457 0.679316 +-0.202544 0.0297143 -0.121544 -0.461986 -0.455046 0.76125 +0.247436 0.0341694 -0.0881298 0.825012 -0.45719 -0.332164 +0.226618 -0.0144466 0.074472 0.718911 -0.669959 0.185262 +0.175042 -0.246832 0.0600807 0.980646 -0.120482 0.154328 +0.175429 -0.228365 0.0630494 0.983571 0.0231144 0.179036 +-0.163781 0.0117808 -0.114149 -0.475029 -0.795939 0.375271 +0.22765 0.0124696 -0.100459 0.744016 -0.561061 -0.362837 +-0.139131 -0.00175368 -0.119014 -0.373113 -0.918225 -0.132849 +-0.0894815 -0.310621 0.0739329 -0.705342 -0.153329 0.692086 +-0.0745518 -0.36661 0.0754101 -0.625844 -0.0673996 0.777031 +-0.150573 -0.368377 0.0695191 -0.0197781 0.0474715 0.998677 +-0.169093 -0.366087 0.0680403 -0.172241 -0.00673364 0.985032 +0.204103 0.345805 -0.13633 0.180548 0.229196 -0.956489 +0.00929454 -0.192081 -0.114039 0.427079 0.816327 -0.388863 +-0.265976 -0.354381 -0.171626 -0.876558 -0.352486 -0.327717 +0.0687135 -0.225289 -0.102624 0.507444 0.413963 -0.755735 +0.0859921 -0.255247 -0.101025 0.619178 0.146745 -0.771417 +0.0852749 0.401129 0.0809666 0.133025 0.942243 0.30738 +-0.201686 0.180676 0.073732 -0.968026 0.11136 0.224777 +0.0585775 -0.371875 -0.114221 0.60143 0.0516246 -0.797256 +-0.207058 0.143072 0.0573942 -0.97899 -0.0134113 0.203465 +0.253328 0.0248 0.0814379 0.849413 -0.471709 0.236617 +-0.155668 0.000650497 0.0708191 -0.83004 -0.534248 0.160037 +0.114893 0.195954 -0.245861 0.368567 0.160865 -0.915577 +-0.225684 -0.466641 -0.108923 -0.819665 -0.566517 -0.0848981 +0.140413 -0.4922 -0.104711 0.398605 -0.746836 -0.532306 +-0.11216 -0.295703 0.0583155 -0.168331 0.063573 0.983678 +0.12733 0.243843 0.207681 0.408404 -0.00998319 0.912747 +0.098156 0.387644 -0.116467 0.123697 0.878791 -0.460897 +0.242353 0.384598 -0.118563 0.265467 0.259313 -0.928592 +0.135045 -0.323141 0.065623 0.736465 -0.629951 0.246539 +-0.0442851 -0.461374 -0.210073 0.384593 -0.473912 -0.792146 +-0.074464 -0.162725 -0.163123 0.343032 0.933515 -0.1043 +-0.204945 0.320734 -0.11583 0.0509442 0.764882 -0.642153 +-0.143503 -0.497558 -0.135917 0.0115456 -0.999644 0.024045 +-0.133321 -0.33175 0.0643749 0.0370135 0.0994024 0.994359 +0.056853 0.264752 -0.242203 0.174115 0.405171 -0.897508 +-0.122914 -0.350014 0.0655664 0.0614931 0.0826987 0.994676 +-0.172879 -0.336307 0.0661476 -0.137848 0.0833401 0.986941 +-0.139933 -0.3515 0.0675031 0.0841687 0.0984798 0.991573 +-0.274842 0.173831 -0.110195 -0.81482 -0.387611 -0.431076 +0.263661 0.158304 -0.108597 0.916081 0.0251358 -0.400205 +0.260057 0.119406 -0.113687 0.899377 -0.0737723 -0.430905 +-0.123811 0.181143 -0.215765 -0.531162 0.0983195 -0.841547 +0.258485 0.099872 -0.112391 0.887977 -0.137726 -0.43878 +-0.13133 -0.391006 0.071497 -0.00224645 0.257521 0.96627 +-0.0917766 -0.381521 0.0685876 -0.183418 0.289341 0.939489 +-0.188652 0.0263489 -0.115604 -0.447429 -0.541827 0.711499 +-0.21032 -0.389848 -0.228598 -0.623908 -0.418292 -0.660129 +-0.155353 0.0027578 -0.123862 -0.263058 -0.956002 0.12985 +0.139744 -0.058502 0.138617 0.441863 -0.81018 0.385183 +-0.124396 -0.00926945 -0.119514 -0.499022 -0.815472 -0.293228 +0.184432 -0.0147832 -0.1278 0.577243 -0.674975 -0.459564 +0.269177 0.171843 0.10061 0.938565 0.104542 0.328888 +0.0818726 -0.497647 -0.0160536 0.0543483 -0.99612 0.0692245 +-0.0244892 -0.178397 -0.115819 0.350138 0.929079 -0.119229 +0.117257 0.399365 0.065219 0.275575 0.908209 0.314984 +0.0914321 0.174363 -0.256755 0.289844 0.0770568 -0.953967 +0.0464697 -0.219184 0.175049 -0.131286 0.0683435 0.988986 +0.133941 0.390287 0.0711835 0.432566 0.831927 0.34754 +0.175321 0.358563 0.0757115 0.65825 0.698356 0.28108 +0.220816 0.307512 0.0796133 0.736015 0.633538 0.238563 +0.266463 0.160492 0.111182 0.928006 0.0966548 0.35981 +-0.0417711 0.140275 -0.255431 -0.27768 -0.0541674 -0.959145 +-0.203618 0.130158 0.0697405 -0.961698 -0.0777342 0.262857 +0.110563 -0.431974 -0.112229 0.222627 0.519954 -0.824673 +-0.0942186 -0.0599024 0.0764753 -0.566523 -0.814761 0.123354 +0.154011 -0.105323 0.0436942 0.986268 -0.152126 0.0642823 +0.148108 -0.474544 -0.110815 0.639226 -0.157068 -0.752808 +0.150989 -0.10556 0.0631474 0.951112 -0.0867272 0.296419 +-0.0982246 -0.292396 0.0685479 -0.641411 -0.0616703 0.764715 +-0.101426 -0.313055 0.0604766 -0.325028 -5.04975e-005 0.945704 +-0.19381 -0.306811 0.0584142 -0.27179 0.147504 0.950985 +0.0875871 -0.498756 -0.0907367 0.00203674 -0.998518 -0.0543833 +-0.192188 -0.336422 0.0613932 -0.302522 0.0300045 0.95267 +0.00250625 -0.49766 -0.112104 -0.0306148 -0.999507 -0.00691523 +0.194119 0.398626 -0.115905 -0.149401 0.49843 -0.85396 +0.122122 -0.331475 0.0792191 0.665757 -0.661067 0.34606 +0.160013 0.388523 -0.114987 -0.169457 0.647207 -0.743241 +0.247623 0.0457794 -0.101578 0.834005 -0.394074 -0.386188 +0.00869869 -0.456925 -0.201678 0.321422 0.131889 -0.937706 +0.267845 0.373048 -0.111181 0.478426 0.147627 -0.86563 +0.251122 0.313011 -0.121732 0.500119 -0.0630427 -0.863659 +0.251624 0.272317 -0.116838 0.644952 -0.0732214 -0.760708 +-0.296561 0.266399 -0.107819 -0.769903 0.0538637 -0.635884 +0.251644 0.250424 -0.11501 0.756597 -0.0196026 -0.653587 +-0.29268 0.233554 -0.111395 -0.810459 -0.0948945 -0.578058 +-0.206159 -0.388792 0.0502849 -0.541645 -0.202905 0.815752 +-0.265605 0.16812 -0.12179 -0.792545 -0.373451 -0.482086 +0.0631938 -0.457474 0.0689206 0.874678 -0.0944436 0.475415 +-0.231059 0.104549 -0.109419 -0.902268 -0.378852 0.205874 +-0.0591742 -0.497948 0.0714805 -0.041842 -0.999091 -0.0081858 +0.241679 0.0671349 -0.128634 0.822011 -0.270685 -0.501026 +-0.245357 0.11383 -0.0789103 -0.787634 -0.589696 -0.178582 +-0.0584867 0.388468 0.0474181 -0.390154 0.911365 0.131124 +-0.0362529 0.392933 0.0694149 -0.300138 0.929495 0.214373 +0.231962 0.299167 0.0671593 0.747667 0.61881 0.240974 +0.241763 0.292012 0.055216 0.732318 0.613379 0.295764 +0.245708 0.00131618 0.0364999 0.804075 -0.592881 0.0442242 +-0.118078 -0.0439056 0.0542472 -0.644849 -0.762646 0.0504052 +-0.109212 -0.0183874 -0.121046 -0.504423 -0.789997 -0.348514 +0.224408 -0.0209197 0.0545304 0.709661 -0.694329 0.119532 +0.0284556 -0.0752942 -0.108355 -0.0756452 -0.882376 -0.464425 +-0.0703323 -0.161697 -0.127169 0.351272 0.934108 -0.0636411 +-0.00763992 -0.18661 -0.12243 0.417169 0.879465 -0.229154 +-0.270171 -0.199305 -0.103346 -0.804802 0.575822 0.143951 +-0.102115 -0.0561714 0.0574154 -0.594606 -0.801711 0.0608538 +0.129774 -0.0359303 -0.14811 0.357115 -0.78516 -0.505957 +0.0664226 -0.350617 -0.110063 0.574696 -0.0815271 -0.814296 +0.0212693 0.398768 -0.0964498 -0.102925 0.95349 -0.283308 +-0.0904435 -0.156627 -0.155002 0.283209 0.955184 -0.0861227 +0.153237 -0.121947 0.0527232 0.988043 0.090299 0.12497 +-0.106333 -0.276479 0.0617507 -0.508938 0.109491 0.853812 +-0.137207 -0.408539 -0.261157 -0.212116 -0.453023 -0.865897 +0.0493522 -0.335396 -0.126796 0.779468 -0.0785877 -0.621493 +-0.202904 -0.283279 -0.279079 -0.34729 -0.233071 -0.908332 +-0.153882 -0.278093 0.0557359 -0.0163669 0.266893 0.963587 +0.0461274 -0.385822 -0.123393 0.772692 -0.00750699 -0.634736 +-0.031724 -0.337126 -0.272944 0.46811 -0.153338 -0.870264 +-0.210388 -0.0405962 -0.154488 0.215417 -0.494223 0.842223 +-0.167606 -0.290767 0.059196 -0.033375 0.234925 0.97144 +-0.185593 -0.42048 0.0578769 -0.643993 -0.0193438 0.764787 +0.0694026 -0.407793 -0.117187 0.346745 0.288962 -0.892339 +0.0813453 -0.420269 -0.116513 0.387033 0.329785 -0.861073 +0.0930156 -0.43575 -0.117918 0.2258 0.381347 -0.896431 +-0.185007 -0.455234 0.0638472 -0.913163 -0.0647427 0.402419 +-0.0139015 -0.0739454 -0.0967041 -0.231806 -0.881565 -0.411228 +-0.0817116 -0.497096 0.0663501 -0.0247073 -0.999682 0.00507634 +0.0649438 0.409863 0.0517107 0.0297153 0.983608 0.177854 +-0.0254964 -0.195253 -0.192547 0.578933 0.743615 -0.334475 +0.235433 0.166382 -0.157736 0.825007 0.049193 -0.562977 +-0.205832 0.175558 0.0559225 -0.979183 0.1123 0.169086 +0.131467 -0.480507 -0.119313 0.327346 -0.351195 -0.877215 +0.285521 0.123797 0.0439341 0.994823 -0.0214194 0.0993445 +0.114516 -0.252607 -0.0778471 0.628507 0.0776493 -0.773918 +0.213152 0.398964 -0.117711 -0.00414057 0.421229 -0.906945 +0.0486213 0.392748 -0.11656 0.0306792 0.923296 -0.382863 +0.132141 0.0330826 0.251534 0.41165 -0.440075 0.798047 +0.222959 0.372771 -0.126511 0.161468 0.270442 -0.949099 +-0.119679 0.337437 -0.110956 -0.467152 0.804727 -0.366311 +-0.184001 -0.292073 0.0580158 -0.167611 0.219802 0.961038 +0.0881632 -0.385635 0.0625081 0.726373 -0.395609 0.562028 +-0.283889 0.22086 -0.120645 -0.775385 -0.130601 -0.617836 +0.0828034 -0.4163 0.0523242 0.763326 -0.266361 0.588545 +0.246022 0.141121 -0.141486 0.849665 -0.0350545 -0.526157 +0.0694497 -0.405995 0.0742291 0.727858 -0.266381 0.631873 +0.283054 0.207487 0.0439474 0.971768 -0.061192 0.227865 +0.176938 0.285197 -0.175052 0.547318 0.427141 -0.719718 +0.250964 0.0862733 -0.121566 0.855516 -0.199472 -0.477811 +-0.26997 -0.290768 -0.216327 -0.83719 -0.317493 -0.44532 +-0.215045 0.0226701 -0.132752 -0.661519 -0.247461 0.707924 +0.240111 0.0473496 -0.118113 0.809803 -0.377168 -0.449404 +0.230373 0.0362618 -0.124774 0.765571 -0.441953 -0.467524 +-0.19828 0.0149294 -0.127873 -0.357359 -0.450328 0.818229 +-0.196603 0.0743538 0.0480047 -0.895785 -0.372179 0.243008 +0.21324 -0.00553954 -0.0993084 0.683478 -0.634356 -0.361179 +-0.144172 0.00308992 -0.137222 -0.0431605 -0.981656 -0.185714 +-0.0957223 -0.0266675 -0.121279 -0.473904 -0.796408 -0.375698 +-0.200193 0.0911192 0.057279 -0.922429 -0.269816 0.276267 +0.259825 0.0243883 0.0469954 0.8762 -0.476318 0.0734462 +-0.0374566 -0.186109 -0.189943 0.508718 0.808181 -0.296732 +-0.203625 -0.149968 -0.116002 -0.341976 0.929515 0.138038 +0.0223962 -0.20422 -0.120355 0.530941 0.697323 -0.4815 +-0.137501 -0.0238214 0.0687394 -0.738611 -0.664789 0.111846 +0.039603 -0.22106 -0.122072 0.580109 0.539844 -0.609953 +-0.284765 -0.220501 -0.125683 -0.922801 0.362419 0.13073 +-0.0280009 0.113879 -0.256298 -0.242262 -0.161443 -0.956684 +-0.118811 -0.264519 0.0513298 -0.2892 0.281134 0.915056 +-0.124813 -0.278694 0.056442 -0.0679582 0.234876 0.969647 +-0.172152 -0.275527 0.0547689 -0.067366 0.299032 0.951862 +0.0649094 -0.332989 -0.114017 0.630689 -0.159352 -0.759499 +-0.0217981 0.316626 0.193 -0.216225 0.583413 0.782864 +0.0516109 -0.353056 -0.119008 0.736622 -0.0799531 -0.671562 +-0.256815 0.160915 -0.130251 -0.76161 -0.373179 -0.5298 +0.0510117 -0.409152 -0.120363 0.539554 0.281107 -0.793638 +0.0623519 -0.425109 -0.125184 0.47909 0.395633 -0.783548 +-0.212055 -0.356411 0.0522757 -0.476248 -0.091938 0.874492 +0.0739836 -0.440348 -0.123431 0.433793 0.359442 -0.826211 +-0.227653 -0.356871 0.0425484 -0.592017 -0.138038 0.794016 +0.206254 -0.00206251 0.150912 0.684286 -0.610476 0.398837 +0.106028 -0.449681 -0.121523 0.137303 0.266984 -0.95387 +0.099696 -0.380594 0.0508115 0.766233 -0.398938 0.503722 +0.118855 -0.464611 -0.123044 0.148253 0.0574664 -0.987278 +0.044658 -0.496504 0.0564885 0.260609 -0.95815 0.118456 +0.281009 0.226548 0.0523395 0.894191 0.03886 0.445995 +-0.198209 0.212661 0.064468 -0.961599 0.214387 0.171366 +0.028333 -0.498461 -0.131938 0.0102915 -0.999716 -0.021477 +0.283043 0.139201 0.0592084 0.983369 0.0390494 0.177372 +0.283628 0.153946 0.0499069 0.988271 0.0645289 0.138407 +0.140796 0.385572 -0.114571 -0.0621479 0.766479 -0.639256 +0.17978 0.387282 -0.120172 -0.128123 0.51562 -0.847184 +-0.0496499 -0.183726 -0.202655 0.468262 0.811513 -0.349539 +0.2535 0.372308 -0.117651 0.372511 0.172511 -0.911853 +-0.0892029 0.347979 -0.126314 -0.445306 0.805528 -0.39093 +0.23553 0.343694 -0.128566 0.333871 0.0974011 -0.937573 +0.0412602 0.104202 -0.262726 0.0337094 -0.19839 -0.979543 +0.235406 0.322971 -0.129946 0.400699 0.0256787 -0.91585 +-0.0913266 0.006085 -0.172555 -0.387502 -0.663666 -0.639835 +0.2371 0.284088 -0.128614 0.579286 0.0171217 -0.814945 +-0.283215 0.272322 -0.120574 -0.648858 0.16174 -0.743521 +-0.130997 -0.251846 0.0460662 -0.126366 0.381515 0.915684 +0.250107 0.173769 -0.133597 0.866973 0.0683024 -0.493652 +0.244701 0.121896 -0.141246 0.840704 -0.0849195 -0.534796 +-0.0443607 -0.0135353 -0.176683 -0.31317 -0.71095 -0.629662 +-0.158677 -0.262854 0.0506021 -0.0403802 0.369569 0.928326 +-0.220087 0.0403254 -0.133832 -0.81294 -0.330965 0.479157 +0.126819 0.00336688 0.234074 0.354111 -0.538646 0.764504 +-0.220958 -0.341287 0.048643 -0.512608 -0.0463013 0.857373 +-0.127132 -0.000382544 -0.135419 -0.336201 -0.866537 -0.368893 +0.158547 -0.0353568 -0.12484 0.450952 -0.776605 -0.439917 +-0.0149061 -0.0652002 -0.114479 -0.228279 -0.865269 -0.446316 +-0.199052 -0.420117 0.0454806 -0.680188 -0.197835 0.705837 +-0.0648129 -0.179331 -0.210484 0.393471 0.830064 -0.395189 +-0.246572 -0.317995 -0.233199 -0.719555 -0.342562 -0.604063 +0.0454688 -0.282788 -0.138401 0.700777 0.00186686 -0.713378 +-0.289752 -0.307573 -0.130553 -0.975033 -0.183797 -0.124614 +0.0604003 -0.29566 -0.122547 0.671173 -0.0528199 -0.739417 +-0.203532 -0.450554 0.029289 -0.840348 -0.313113 0.442466 +0.0437898 -0.319142 -0.131312 0.799867 -0.0890943 -0.593527 +-0.0111016 0.104625 -0.258189 -0.183967 -0.206539 -0.960988 +0.0448191 -0.369006 -0.129892 0.915297 -0.044592 -0.400304 +-0.0240401 0.399879 0.0519529 -0.256487 0.955213 0.147593 +0.1573 0.393954 0.043478 0.406808 0.552745 0.72731 +0.038806 -0.0191762 -0.196767 -0.0456123 -0.702027 -0.710688 +-0.194119 0.236117 0.051663 -0.952398 0.269362 0.142764 +0.212691 -0.0058031 0.132482 0.69701 -0.628943 0.344395 +-0.0660099 -0.495979 -0.12201 -0.0109835 -0.999939 0.00140012 +-0.162644 -0.497629 -0.141108 -0.0383152 -0.999262 -0.0028095 +0.283443 0.2583 0.0429333 0.634931 0.251645 0.730436 +0.11938 0.385033 -0.115261 0.0687278 0.839537 -0.538938 +-0.207054 0.107671 0.0471398 -0.933124 -0.164721 0.319604 +0.1501 0.37496 -0.125753 0.0285834 0.65246 -0.757284 +0.196403 -0.0486085 0.0442213 0.661394 -0.742984 0.102627 +-0.165644 0.311196 -0.123712 -0.078442 0.784427 -0.61524 +0.170691 -0.0726147 0.0434902 0.753518 -0.652858 0.0773715 +0.170024 -0.0737113 0.0265377 0.756616 -0.653599 -0.0184542 +-0.0281577 0.370438 0.131155 -0.249264 0.829396 0.499969 +-0.280649 0.240448 -0.126648 -0.715152 0.00192994 -0.698966 +-0.036085 -0.166145 0.0449862 -0.796856 0.598979 0.0790206 +-0.186274 -0.246535 0.0406748 -0.169708 0.470508 0.865922 +-0.238786 0.117501 -0.120867 -0.959553 -0.275145 0.0596036 +-0.195509 -0.261149 0.0456781 -0.264148 0.373636 0.889169 +0.170855 -0.271996 0.0360775 0.94592 -0.324206 0.0112082 +0.0256032 -0.0272086 -0.186496 -0.104203 -0.738165 -0.666524 +0.111624 -0.364194 0.0450492 0.809386 -0.44792 0.379819 +0.0194114 -0.0124139 -0.20096 -0.130886 -0.680607 -0.720862 +0.105371 -0.384522 0.0384996 0.822616 -0.319256 0.470509 +-0.19019 -0.000715692 -0.134823 0.0248498 -0.595927 0.802654 +-0.238442 -0.368666 0.0301874 -0.691166 -0.228255 0.685703 +-0.188734 0.0389441 -0.017394 -0.818485 -0.573296 0.0376026 +-0.218298 -0.153888 -0.124535 -0.380573 0.918239 0.109551 +0.0398339 -0.497922 0.0400825 0.0822876 -0.996181 0.0291936 +0.107289 0.40926 0.0355377 0.0773704 0.976301 0.202115 +0.0591587 -0.315256 -0.123564 0.63132 -0.134595 -0.763753 +0.0905534 -0.49895 -0.0597696 -0.00361647 -0.999947 0.0096024 +0.101459 0.412135 0.0185797 0.0142204 0.992957 0.117617 +-0.0308198 0.400156 0.0346319 -0.282182 0.954141 0.0999404 +-0.0632583 0.388832 0.0279703 -0.404973 0.910497 0.0836124 +-0.0750527 0.381926 0.0394793 -0.441783 0.890344 0.110068 +-0.0904484 0.372544 0.0486156 -0.490793 0.859038 0.145523 +-0.026752 0.00411513 -0.202109 -0.269772 -0.632002 -0.726496 +0.222875 0.3168 0.0472699 0.723671 0.63563 0.268839 +0.209064 0.328543 0.0583751 0.729539 0.640402 0.240121 +-0.083632 0.342517 -0.142657 -0.433098 0.787179 -0.439062 +0.234239 0.304457 0.0455114 0.699824 0.644199 0.308633 +-0.100319 0.337182 -0.135025 -0.465215 0.77858 -0.421174 +-0.175225 0.283976 0.0544066 -0.865438 0.444408 0.231341 +-0.145559 0.313215 -0.128058 -0.349866 0.758976 -0.549135 +0.260241 0.297972 0.0260324 0.183135 0.560882 0.807387 +-0.0273007 0.334728 -0.19094 -0.263171 0.696446 -0.66761 +-0.250605 0.28867 -0.134001 -0.32004 0.431212 -0.843582 +0.223645 0.276269 -0.139579 0.642858 0.170415 -0.746788 +-0.273704 0.258765 -0.130835 -0.618983 0.134134 -0.773866 +-0.265869 0.194547 -0.134819 -0.726974 -0.199672 -0.656993 +-0.205299 0.189962 0.0459266 -0.977623 0.164366 0.131294 +-0.243358 0.100784 -0.127024 -0.891441 0.0320991 0.451999 +0.20284 -0.0365916 0.0764133 0.652031 -0.732823 0.194489 +0.282636 0.0903645 0.0380962 0.983406 -0.168258 0.0678331 +0.219796 0.0409607 -0.14419 0.733394 -0.403643 -0.546997 +-0.0348457 -0.103632 0.0372044 -0.799364 -0.600533 0.0194013 +-0.0462806 -0.180521 0.0544534 -0.742374 0.623995 0.243949 +-0.167751 -0.247916 0.0433891 -0.0614285 0.460089 0.885745 +-0.0517005 -0.0403725 -0.136111 -0.337754 -0.806925 -0.484556 +0.203332 0.300051 0.134474 0.683074 0.564399 0.463534 +-0.120668 -0.176144 -0.0153831 0.0102553 0.860631 0.509127 +0.0338031 -0.0664051 -0.126374 -0.048967 -0.885862 -0.461358 +-0.207118 -0.277278 0.0471245 -0.368229 0.269107 0.889938 +-0.260105 -0.180867 -0.129521 -0.688573 0.692851 0.214067 +-0.00810858 -0.191297 -0.142679 0.543577 0.804394 -0.23974 +-0.271481 -0.188399 -0.141507 -0.729924 0.577104 0.366281 +0.0192113 -0.21137 -0.135119 0.644688 0.617243 -0.450987 +0.163619 -0.288356 0.0398825 0.892586 -0.4463 0.0640854 +0.0428094 -0.262215 -0.140104 0.71756 0.112111 -0.687415 +-0.293952 -0.258555 -0.138873 -0.999729 0.0232785 -0.000985604 +0.144194 -0.322124 0.027573 0.818521 -0.570476 0.0676784 +-0.211393 -0.404719 0.0407037 -0.630315 -0.291214 0.719651 +-0.292927 -0.288592 -0.129177 -0.990615 -0.109891 -0.0812726 +-0.184341 0.0828472 -0.198515 0.439918 0.0762345 -0.894796 +0.078639 -0.498815 -0.0739445 -0.00510987 -0.999971 -0.00564766 +-0.175156 -0.488829 0.0422464 -0.607614 -0.782596 0.13546 +0.1894 -0.0459633 0.0839991 0.62222 -0.74756 0.232371 +-0.15461 -0.00446454 -0.0209909 -0.723798 -0.684294 -0.0886425 +0.0209566 0.410048 0.0374857 -0.110107 0.987395 0.113698 +-0.00977547 0.354148 -0.174977 -0.193913 0.773312 -0.603644 +-0.102549 0.367576 0.0337982 -0.516922 0.848223 0.115369 +-0.0883126 0.376151 0.0292266 -0.473217 0.876161 0.091687 +0.0710941 -0.455887 -0.135638 0.658879 0.313412 -0.683851 +-0.199799 -0.48912 -0.146251 -0.537489 -0.81849 -0.202927 +0.285465 0.107793 0.0304012 0.994702 -0.0935933 0.0425255 +-0.0322139 -0.496688 -0.135147 -0.0210457 -0.999544 0.0216618 +0.0196552 0.384941 -0.132332 -0.0868276 0.903942 -0.418749 +0.104538 0.378034 -0.130179 0.175059 0.817483 -0.548704 +-0.0603471 0.359987 -0.132272 -0.402567 0.825478 -0.395633 +-0.206451 0.0910581 0.0376327 -0.878205 -0.299657 0.372775 +0.153473 -0.106911 0.0228947 0.984174 -0.156529 -0.0830642 +0.173603 0.344637 -0.141987 0.221746 0.425977 -0.877138 +0.190488 0.33679 -0.141324 0.231344 0.304609 -0.923955 +-0.132017 0.325936 -0.119402 -0.439207 0.788804 -0.429983 +-0.19574 -0.233309 0.0305631 -0.246683 0.519414 0.818142 +0.193027 0.127902 -0.20252 0.632252 -0.105453 -0.767552 +-0.220473 -0.391213 0.0384067 -0.623388 -0.279108 0.730401 +-0.227538 -0.375351 0.0380954 -0.62885 -0.233361 0.741681 +-0.246518 0.272096 -0.142958 -0.350757 0.340957 -0.872191 +0.104538 -0.403476 0.0301987 0.811335 -0.226965 0.538722 +0.108235 -0.437368 0.0166916 0.708343 -0.113348 0.696708 +0.175898 0.386755 0.0328673 0.598324 0.24314 0.763474 +-0.0071043 0.340188 -0.191583 -0.17229 0.715294 -0.677252 +0.23727 0.00798011 -0.0697395 0.769219 -0.580839 -0.266323 +-0.194596 0.246983 0.0271852 -0.954278 0.26831 0.131767 +-0.2262 0.00908388 -0.14688 -0.831939 0.0960523 0.546491 +-0.224458 -0.00735638 -0.143703 -0.510551 -0.112327 0.852479 +-0.162427 0.00320268 -0.143691 0.227818 -0.952379 0.202664 +-0.217586 0.146925 0.0176597 -0.688554 0.322278 0.649639 +-0.085652 0.371196 -0.0658153 -0.433537 0.873948 -0.219682 +-0.0758648 -0.0743407 0.0429281 -0.519395 -0.854359 0.0173173 +-0.0347047 -0.35628 0.113126 -0.51154 -0.303963 0.8037 +-0.204768 -0.00914882 -0.139794 -0.065888 -0.421793 0.904295 +-0.0846187 -0.0171186 -0.148605 -0.389159 -0.761041 -0.51901 +-0.0240584 -0.138016 0.0226334 -0.996927 0.0688312 -0.0373965 +-0.0840004 -0.156141 -0.118736 0.31355 0.947761 -0.0586179 +0.162009 -0.15846 0.0391702 0.959301 0.282365 0.00344647 +0.17331 -0.204999 0.0218824 0.971205 0.191008 -0.142396 +-0.280107 -0.205333 -0.136936 -0.854232 0.439648 0.277484 +-0.0969425 -0.218539 0.0432566 -0.425622 0.58488 0.690479 +0.0472032 -0.302055 -0.136627 0.733241 -0.0831873 -0.674861 +-0.132158 -0.221565 0.0299595 -0.172332 0.548792 0.818003 +-0.226576 -0.241392 0.021098 -0.488162 0.473695 0.733015 +-0.161405 0.00733689 -0.0538023 -0.697556 -0.708412 -0.107555 +0.163214 -0.290378 0.0215335 0.904915 -0.42432 -0.0328801 +-0.245517 -0.334394 0.0296005 -0.694902 -0.0452465 0.71768 +0.0199194 -0.486271 -0.193743 0.420003 -0.570246 -0.705986 +0.0221219 0.214062 0.2343 0.0126469 0.131055 0.991294 +0.0490004 -0.497215 -0.136687 0.20124 -0.967879 -0.150705 +0.253755 0.315815 0.0159392 0.0772693 0.481669 0.87294 +0.12176 0.356023 -0.1509 0.280567 0.696375 -0.660564 +-0.214657 -0.444958 -0.180269 -0.758216 -0.451687 -0.470198 +0.178216 0.32665 -0.148777 0.347958 0.406771 -0.844668 +-0.0935164 0.33066 -0.153084 -0.454809 0.741243 -0.493668 +-0.203405 -0.450579 -0.191739 -0.70215 -0.457596 -0.54552 +-0.207 0.198493 0.0164391 -0.967451 0.198524 0.15693 +0.231027 0.254802 -0.13806 0.734803 0.204611 -0.646683 +0.233872 0.225882 -0.145611 0.796768 0.209985 -0.566628 +-0.273381 0.209194 -0.130494 -0.732021 -0.148119 -0.664986 +0.107142 -0.0753505 0.137001 0.386993 -0.702917 0.596778 +-0.202548 0.213786 0.0292783 -0.969781 0.213942 0.117275 +0.241123 0.102805 -0.142923 0.820911 -0.144612 -0.552443 +-0.206092 0.194862 0.0307296 -0.977275 0.180852 0.11057 +-0.208865 0.175282 0.0358163 -0.983871 0.125644 0.127323 +0.178667 0.00356043 -0.157652 0.54628 -0.61379 -0.569948 +-0.115846 0.00223713 -0.151608 -0.368004 -0.782666 -0.502004 +0.286441 0.125163 0.0235062 0.999413 -0.0218772 0.0263525 +0.166379 -0.0100296 -0.153391 0.504345 -0.659927 -0.556895 +0.262438 0.0276901 0.028997 0.886296 -0.461848 0.0342902 +-0.16156 0.000670529 0.0126438 -0.786049 -0.618145 -0.00484527 +0.215463 -0.0332802 0.0233138 0.702518 -0.711153 0.027011 +-0.0929137 -0.0637692 0.0404563 -0.564482 -0.825424 0.00588943 +-0.15787 0.278852 0.112354 -0.781268 0.483007 0.39538 +-0.0339005 -0.0382172 -0.150601 -0.293612 -0.795926 -0.529427 +0.264088 0.0541817 -0.0665032 0.902637 -0.349617 -0.251028 +0.168638 -0.274655 0.013027 0.945086 -0.301381 -0.126416 +-0.250129 -0.362459 0.0193943 -0.751171 -0.224061 0.620917 +-0.233708 -0.387936 0.027282 -0.692652 -0.304428 0.653878 +0.115363 -0.404062 0.0118581 0.888533 -0.084658 0.450935 +0.0321767 -0.228273 -0.135758 0.687131 0.458563 -0.563535 +-0.299099 -0.168698 -0.248325 -0.905596 -0.140341 -0.40025 +-0.223 -0.421313 0.0186501 -0.729485 -0.425614 0.535447 +0.257112 0.195209 0.122793 0.889289 0.153014 0.43099 +0.0227345 -0.390059 -0.192043 0.846006 -0.36297 -0.390546 +0.210578 0.457119 0.0209029 -0.0196127 0.326596 0.944961 +0.18962 0.457166 0.0125523 -0.467041 0.714471 0.520964 +0.0366153 -0.385768 -0.15832 0.940164 -0.17894 -0.289953 +0.213142 0.435676 0.019577 0.36941 -0.128611 0.920323 +0.0191458 -0.258955 -0.198573 0.901931 0.37245 -0.218635 +0.148728 0.424592 0.0153004 -0.46409 0.802864 0.374206 +0.000320593 0.409216 0.0118622 -0.175881 0.982985 0.052976 +0.200788 0.418861 0.0220936 0.415968 -0.136269 0.899112 +-0.140665 0.343686 0.0199434 -0.567508 0.79678 0.207549 +-0.127363 0.319229 -0.135938 -0.486053 0.729427 -0.481341 +-0.144817 0.33575 0.0360718 -0.656629 0.709457 0.255947 +-0.138418 0.305414 -0.14371 -0.458909 0.676202 -0.576328 +-0.0756185 -0.192956 -0.239081 0.356993 0.717573 -0.598034 +0.225594 -0.00770391 -0.0661505 0.727878 -0.637033 -0.253737 +-0.229625 -0.449882 -0.141533 -0.848288 -0.465106 -0.253149 +0.278398 0.0681778 0.0152996 0.964603 -0.263699 0.00180567 +-0.103683 -0.207407 0.0291809 -0.314341 0.681813 0.660546 +-0.255255 0.226179 -0.147806 -0.566676 0.027152 -0.823493 +0.239367 0.182908 -0.149897 0.830002 0.0947034 -0.549662 +0.122868 -0.354468 0.0279236 0.862971 -0.454121 0.221481 +-0.235155 0.131094 -0.146681 -0.884124 0.163112 -0.437859 +0.232036 0.0850332 -0.150646 0.792373 -0.198146 -0.57696 +0.219817 0.0766436 -0.163328 0.745647 -0.236626 -0.622912 +0.0380455 -0.322886 -0.182897 0.982341 0.0673289 -0.174568 +0.0110407 -0.242705 -0.199149 0.85222 0.445262 -0.274705 +-0.296641 -0.22868 -0.193093 -0.979967 -0.196189 -0.0342726 +0.110067 -0.419035 0.0171781 0.791284 -0.107865 0.601859 +0.0826598 -0.480867 0.0300315 0.664478 -0.497449 0.557686 +-0.119541 -0.0375358 0.0899625 -0.658766 -0.734039 0.164967 +-0.0581909 -0.4898 0.0206083 0.0197556 -0.879217 -0.476012 +-0.212817 -0.477305 -0.143537 -0.766865 -0.601674 -0.223399 +-0.281934 -0.193636 -0.153372 -0.773272 0.418274 0.476546 +0.0723339 0.0858134 -0.254435 0.191842 -0.277792 -0.941291 +0.159991 0.436018 0.00604662 -0.585445 0.774531 0.23949 +-0.293417 -0.241561 -0.147972 -0.993112 0.0786905 0.0868146 +0.0316793 -0.275332 -0.151669 0.893847 0.0646235 -0.443691 +-0.0191391 0.404802 0.0172425 -0.24551 0.9674 0.0621461 +-0.156768 0.332523 0.0180062 -0.591437 0.734546 0.332632 +0.0568445 -0.48934 -0.15511 0.656291 -0.595055 -0.463887 +-0.0712308 -0.496539 -0.136413 -0.00105395 -0.999113 0.042093 +0.157577 0.00502102 0.216028 0.508854 -0.556589 0.656717 +0.0543057 0.37397 -0.151633 0.0979498 0.832822 -0.544806 +0.130949 0.338355 -0.164077 0.344451 0.637732 -0.688949 +0.269466 0.311966 0.0198933 -0.0953249 0.412482 0.905964 +0.188142 0.29603 -0.159801 0.529629 0.411384 -0.741793 +0.203112 0.238272 -0.176348 0.662404 0.293436 -0.689286 +-0.242286 0.217663 -0.156161 -0.492905 0.0277149 -0.869642 +0.268181 0.341448 0.007888 -0.140971 0.300505 0.943305 +-0.252003 0.196964 -0.148814 -0.62291 -0.119408 -0.773127 +0.0366499 0.387472 -0.129209 -0.0102754 0.907223 -0.420525 +-0.17943 0.292235 0.0213019 -0.873292 0.300356 0.383598 +-0.243126 0.115362 -0.143084 -0.947979 0.317569 0.0220388 +-0.0290279 -0.0729979 -0.0893287 -0.29726 -0.874028 -0.384333 +-0.239118 0.0544181 -0.163583 -0.781304 -0.620255 -0.0696283 +-0.108237 -0.0522591 0.0380275 -0.617076 -0.786864 -0.00786182 +0.179854 -0.0642282 0.0129505 0.659519 -0.750806 -0.0363955 +-0.142931 0.0185253 -0.164919 0.320896 -0.707381 -0.629792 +-0.214763 0.2847 -0.145197 -0.125547 0.50826 -0.852004 +-0.0406209 -0.0975544 0.0176185 -0.70847 -0.703655 -0.0542228 +-0.177108 -0.00794331 -0.14844 0.462385 -0.70596 0.536489 +-0.0695311 -0.0195123 -0.156162 -0.358177 -0.74839 -0.558231 +0.266524 0.0397197 0.0551379 0.909151 -0.399191 0.118703 +0.00125149 -0.223179 -0.193254 0.770992 0.552725 -0.316333 +-0.0305367 -0.109674 0.0201598 -0.864315 -0.50189 -0.0326581 +-0.0245221 -0.123371 0.0111242 -0.966404 -0.241632 -0.0876223 +-0.250292 -0.267522 0.014765 -0.687629 0.262496 0.676951 +0.240909 0.238767 -0.1303 0.796822 0.157036 -0.58345 +-0.241815 -0.161643 -0.14921 -0.382792 0.891501 0.242272 +-0.229862 -0.425421 0.00483869 -0.756292 -0.477137 0.447619 +-0.21272 -0.434821 0.0227156 -0.792695 -0.352534 0.497347 +0.0454307 -0.497892 0.0216826 0.0592476 -0.997804 0.0296172 +0.0332557 -0.245332 -0.146013 0.762076 0.30001 -0.57379 +0.0325973 -0.49834 0.0074443 0.00580487 -0.999942 0.00903488 +-0.060822 -0.0621077 -0.0831665 -0.416817 -0.848144 -0.32698 +0.258286 0.47548 0.00953412 0.199794 0.139374 0.969875 +0.0321797 -0.295698 -0.151232 0.927898 0.127469 -0.350366 +-0.00333912 -0.324387 -0.256038 0.628362 -0.0624924 -0.775407 +-0.284629 -0.304645 -0.163416 -0.945816 -0.238308 -0.220547 +0.0409943 -0.334572 -0.145693 0.976291 0.101856 -0.190998 +0.232396 0.429013 0.00934273 0.334803 -0.202217 0.920334 +0.204186 0.398252 0.0160715 0.468741 -0.140053 0.872162 +-0.0858801 0.0216913 -0.19022 -0.387046 -0.592079 -0.706851 +0.23182 0.337802 0.008973 0.346252 0.42013 0.838809 +-0.00513071 -0.302716 -0.256641 0.65309 0.0786508 -0.753185 +-0.299971 -0.205532 -0.186711 -0.979061 -0.0747255 0.189354 +-0.0345734 0.284198 -0.22785 -0.277244 0.473088 -0.836256 +-0.101463 0.0328441 -0.190485 -0.393241 -0.553595 -0.734094 +-0.111506 -0.248219 0.0519659 -0.453051 0.315881 0.833645 +-0.110535 0.325098 -0.144641 -0.48937 0.731928 -0.474129 +0.174797 0.311363 -0.159467 0.461013 0.475772 -0.749071 +-0.286721 -0.330105 -0.0539674 -0.980238 -0.137978 0.141756 +-0.148449 -0.0140466 0.00504672 -0.724548 -0.686661 -0.0593875 +-0.0278262 -0.153048 0.0115291 -0.888718 0.451586 -0.0790628 +-0.219344 0.254141 -0.158228 -0.231123 0.309743 -0.922302 +-0.258904 -0.309644 0.0149765 -0.788669 0.060574 0.611827 +0.0505055 -0.490981 0.074455 0.633156 -0.73159 0.252764 +0.107851 -0.469549 0.0117046 0.632883 -0.227081 0.740198 +0.22356 0.112127 -0.168939 0.763056 -0.134928 -0.632091 +0.0710927 -0.497435 -0.00173499 0.0773156 -0.994073 0.0764337 +-0.223673 0.027444 -0.148208 -0.954771 -0.063394 0.290504 +-0.228341 0.0145852 -0.162255 -0.954656 0.291757 0.0592445 +0.0622112 -0.496852 0.0169328 0.130223 -0.986808 0.0961885 +-0.125348 0.0154365 -0.164866 -0.21655 -0.726721 -0.651907 +-0.00511686 -0.105179 -0.0458039 -0.489975 -0.635777 -0.596416 +0.244344 0.443522 0.00857799 0.270919 -0.188256 0.944014 +-0.24171 -0.0409029 -0.157821 -0.468965 -0.135246 0.8728 +0.0368491 -0.0565357 -0.145001 -0.036774 -0.87446 -0.483701 +-0.000244974 -0.0522202 -0.144098 -0.190413 -0.848568 -0.493635 +0.0566439 -0.0560406 -0.145614 0.0510685 -0.873494 -0.48415 +-0.245874 -0.168023 -0.133081 -0.550201 0.813554 0.188171 +-0.272571 -0.176349 -0.157201 -0.591393 0.548729 0.59089 +-0.293817 -0.226924 -0.158272 -0.980031 0.0733897 0.184806 +0.0283089 -0.258892 -0.157219 0.87687 0.161562 -0.452766 +-0.28029 -0.321763 -0.161982 -0.932676 -0.270132 -0.23905 +0.236855 0.261206 0.120823 0.810566 0.408755 0.419408 +0.0429849 -0.352435 -0.138283 0.965172 -0.0298414 -0.259909 +0.206147 0.367402 0.0125632 0.530326 0.172699 0.830018 +0.246823 0.014338 -0.0524833 0.810726 -0.549518 -0.201873 +-0.183967 0.307603 0.00978322 -0.685554 0.245969 0.685212 +0.304304 0.272609 0.019585 0.873231 -0.0945508 0.478046 +-0.0695113 0.371129 0.0957997 -0.438795 0.834505 0.333258 +-0.20019 0.228719 0.019012 -0.963258 0.235805 0.128572 +-0.277919 -0.230482 -0.0624988 -0.888172 0.38905 0.244523 +0.258399 0.0209848 -0.0051702 0.866494 -0.495115 -0.0636344 +-0.171514 0.0142585 9.90155e-005 -0.807034 -0.590493 -0.00391892 +-0.305265 -0.172794 -0.20523 -0.986642 -0.0203755 0.161624 +0.0357134 0.0210872 -0.228326 -0.0260695 -0.532305 -0.846151 +-0.0538201 -0.0869169 0.0142793 -0.565344 -0.820732 -0.0823752 +-0.229471 0.234416 -0.160095 -0.34218 0.175477 -0.923104 +-0.0220553 -0.120574 -0.00641241 -0.90284 -0.302837 -0.305239 +-0.0311762 -0.10713 0.00167109 -0.834022 -0.533819 -0.139444 +-0.0965082 -0.188947 0.00752711 -0.155022 0.845103 0.511633 +-0.250562 0.0958519 -0.14425 -0.966832 0.135238 0.216671 +-0.157968 -0.204926 0.0151664 -0.0610069 0.647019 0.760029 +-0.231187 -0.208237 -0.00973266 -0.528917 0.6283 0.570513 +-0.222487 -0.226 0.0126591 -0.462587 0.533849 0.707827 +0.191959 0.0135068 -0.154318 0.609315 -0.563991 -0.557359 +-0.184186 -0.487879 0.00850075 -0.525107 -0.833969 0.169584 +-0.233742 0.00381602 -0.176368 -0.852698 0.516627 -0.0774757 +0.291491 0.469187 0.000734432 0.441603 0.227549 0.867875 +-0.0826028 -0.00642091 -0.163734 -0.372907 -0.710985 -0.596188 +0.188378 0.460694 -0.00573836 -0.618751 0.782725 0.0669967 +0.139544 -0.0236114 -0.15918 0.404462 -0.723849 -0.558975 +0.279767 0.453812 0.00426004 0.172047 -0.0550488 0.983549 +0.271522 0.423068 0.000944958 0.0399134 -0.087688 0.995348 +0.264251 0.441318 0.00408297 0.140691 -0.158101 0.977349 +0.0947687 0.413499 0.00139587 0.00499678 0.998357 0.0570779 +0.1133 0.413909 0.00538924 -0.113599 0.98755 0.108815 +0.263406 0.390493 -1.87793e-005 -0.0144777 0.0320571 0.999381 +0.245566 0.394523 0.000934289 0.142928 -0.0428092 0.988807 +-0.0905778 -0.158395 -0.171187 0.276443 0.949785 -0.146587 +0.210884 0.383132 0.0104803 0.412206 -0.0619997 0.908979 +0.223913 0.398915 0.00655908 0.337025 -0.114779 0.934473 +0.119531 -0.0469023 -0.137096 0.317014 -0.823509 -0.470462 +0.00440424 -0.204731 -0.150555 0.677272 0.659543 -0.326045 +-0.288535 -0.221869 -0.141673 -0.937594 0.265602 0.224439 +0.0375514 -0.309652 -0.167489 0.979438 0.201363 0.0123903 +0.0466583 -0.159152 -0.0648697 -0.118306 0.396286 -0.910473 +-0.253082 0.121292 0.00469699 -0.679972 -0.382421 0.625613 +0.0586059 -0.451924 -0.151037 0.794878 0.334115 -0.506494 +-0.196275 0.0583346 0.0185521 -0.844129 -0.495018 0.205922 +-0.214498 -0.458779 -0.166467 -0.776559 -0.470792 -0.418701 +-0.0432821 -0.382815 -0.263937 0.395407 -0.386322 -0.833311 +-0.0155682 -0.0444014 -0.150031 -0.243076 -0.823556 -0.512514 +-0.130222 -0.0235261 -0.0429013 -0.639994 -0.751638 -0.159527 +-0.0583551 0.0490936 -0.222736 -0.329602 -0.485288 -0.809851 +-0.0499983 -0.497194 -0.172388 0.0187089 -0.996409 -0.0825747 +0.0144037 0.375423 -0.149765 -0.0926474 0.860136 -0.501579 +0.0582684 -0.498831 -0.0684146 0.000117923 -0.999986 -0.00537133 +0.211755 0.172309 -0.185909 0.718429 0.0750505 -0.691539 +-0.238262 -0.236977 0.0092505 -0.578598 0.473152 0.664343 +-0.226072 0.213938 -0.164104 -0.382702 0.0720616 -0.921057 +0.115372 -0.452449 0.00781318 0.665469 -0.0854985 0.741513 +-0.224888 0.14109 -0.156951 -0.707155 0.147255 -0.691555 +0.121841 -0.468386 0.000967375 0.604205 -0.182044 0.775756 +0.296451 0.450863 0.00110559 0.357416 0.0709153 0.931249 +0.22633 0.0953868 -0.161235 0.775163 -0.172716 -0.607693 +0.208271 0.0435064 -0.160086 0.696676 -0.381456 -0.607564 +-0.0624717 0.0206644 0.23526 -0.668857 -0.314247 0.673706 +0.301948 0.432439 1.60979e-005 0.313262 0.0651294 0.947431 +0.28103 0.100818 -0.0392712 0.981907 -0.118142 -0.14799 +0.209461 0.221042 -0.176761 0.6958 0.237965 -0.677669 +-0.197896 0.243199 0.0097773 -0.957003 0.242674 0.158917 +-0.156813 0.00645018 -0.171413 0.792659 -0.515731 -0.325137 +0.284672 0.19049 -0.0111057 0.99661 -0.0652886 -0.0500636 +-0.246666 -0.0216368 -0.167273 -0.833338 0.337329 0.437901 +0.109961 -0.0398772 -0.154358 0.288176 -0.802961 -0.521736 +-0.234435 -0.0206919 -0.150775 -0.555582 -0.0267328 0.831032 +-0.189338 -0.0177713 -0.147292 0.361853 -0.588399 0.723083 +0.226573 0.279287 0.12101 0.776703 0.487116 0.399312 +-0.251843 -0.080161 -0.172806 -0.13505 -0.294327 0.946115 +-0.211921 -0.0627507 -0.168573 0.423616 -0.535291 0.730762 +-0.237884 0.167626 -0.00188663 -0.16531 0.449449 0.877877 +0.186215 -0.0238844 0.145245 0.589476 -0.718441 0.369271 +-0.234204 -0.0692532 -0.1669 0.0622445 -0.424402 0.903332 +-0.222729 -0.15456 -0.15405 -0.280341 0.957992 0.060499 +-0.256151 -0.162293 -0.158886 -0.309868 0.74702 0.588169 +-0.269306 -0.159185 -0.168772 -0.372781 0.504306 0.778916 +0.0211369 -0.240748 -0.162761 0.853555 0.335874 -0.398287 +-0.263447 0.137173 0.00212572 -0.633873 -0.201825 0.74664 +0.0320776 -0.289216 -0.167832 0.973866 0.225885 -0.02368 +0.272743 0.050965 0.0044307 0.938556 -0.344129 -0.0262361 +0.248988 0.00591868 -0.00146676 0.819435 -0.57105 -0.0492823 +0.170373 -0.0707735 -0.00787179 0.676508 -0.726549 -0.120263 +0.150496 -0.104643 0.00127055 0.939629 -0.233674 -0.249988 +0.147028 -0.123182 -0.00372 0.931102 0.00120394 -0.364757 +-0.192662 -0.489134 -0.160885 -0.498819 -0.819371 -0.282508 +-0.101018 -0.180668 -0.00782689 -0.0226853 0.881225 0.472153 +0.168204 -0.193886 0.00871605 0.941709 0.22976 -0.245752 +0.170922 -0.227162 -0.00239791 0.948937 0.0705633 -0.307472 +-0.0951034 0.309557 -0.177343 -0.470787 0.619899 -0.627762 +-0.129784 0.295991 -0.161147 -0.518557 0.592002 -0.616954 +-0.154926 0.275217 -0.161128 -0.354726 0.550711 -0.75557 +-0.185648 0.2648 -0.159804 -0.143097 0.459934 -0.876347 +0.219574 0.231444 -0.161958 0.731465 0.252236 -0.633511 +0.122296 -0.399393 -0.00524146 0.945626 0.0644945 0.318797 +-0.280861 -0.0830077 -0.187346 -0.762651 0.196108 0.616364 +-0.201635 -0.476622 -0.00638179 -0.704194 -0.667264 0.242632 +-0.0148898 -0.494101 -0.0090424 -0.0778712 -0.950737 -0.300057 +-0.223489 0.19452 -0.165831 -0.426076 -0.0171564 -0.904525 +-0.142882 -0.436529 -0.244061 -0.247764 -0.487477 -0.837245 +-0.200693 0.140659 -0.175522 -0.380248 0.304468 -0.873333 +0.319255 0.326249 -0.00071322 0.904291 -0.0617262 0.422431 +-0.21032 0.220441 -0.011128 -0.712422 0.222353 0.665593 +0.136342 0.323395 -0.17426 0.395419 0.58635 -0.706992 +-0.276461 0.168888 -0.00468748 -0.387535 0.0539873 0.920273 +0.266598 0.0366631 -0.00192354 0.904824 -0.422782 -0.0504954 +0.192871 0.0307978 -0.168187 0.626877 -0.45534 -0.632211 +-0.131394 -0.0261878 -0.0248939 -0.648691 -0.749508 -0.132055 +-0.152642 0.0242131 -0.179633 0.651509 -0.405119 -0.641416 +0.192565 -0.0538707 0.0128254 0.637078 -0.770503 -0.0213777 +0.0678311 -0.0468272 -0.160108 0.109055 -0.841916 -0.528474 +-0.255172 -0.0406945 -0.16881 -0.766093 0.194498 0.612594 +-0.219522 -0.0776259 -0.175867 0.432634 -0.520543 0.736113 +0.112808 -0.176295 -0.0577934 0.492596 0.307917 -0.813964 +-0.0564571 -0.0825015 -0.00363067 -0.5339 -0.834181 -0.138177 +-0.236657 -0.156352 -0.166353 -0.0626711 0.848206 0.525946 +0.16956 -0.209242 0.00179819 0.940772 0.17925 -0.287782 +0.16511 -0.232075 -0.0177223 0.9022 0.055001 -0.427797 +-0.268321 -0.143314 -0.175919 -0.200562 0.290586 0.935593 +-0.285703 -0.315081 -0.146151 -0.954045 -0.23579 -0.184933 +0.283332 0.0907965 0.020078 0.985221 -0.17089 0.0116493 +-0.0731262 -0.165657 -0.179765 0.348674 0.916601 -0.195623 +-0.288347 -0.18213 -0.169589 -0.741546 0.313233 0.593292 +-0.294337 -0.245299 -0.166987 -0.996794 -0.0796366 0.00774655 +-0.253167 -0.254781 0.00585955 -0.699611 0.348824 0.623592 +-0.248283 -0.399737 -0.0012144 -0.802136 -0.418317 0.426132 +0.251866 0.0517627 0.125134 0.866046 -0.353875 0.353181 +-0.233677 -0.42663 -0.164639 -0.816336 -0.448212 -0.364282 +-0.150949 -0.4956 -0.0298605 0.0349634 -0.999319 -0.0117891 +0.16738 0.060225 -0.204775 0.543163 -0.313209 -0.779022 +-0.0993138 -0.497504 -0.154487 0.00635529 -0.999308 0.0366476 +0.0541212 0.363656 -0.166264 0.10955 0.789293 -0.604166 +-0.0376444 0.34242 -0.177777 -0.314792 0.733705 -0.602149 +-0.166138 -0.495979 -0.0163366 -0.0963392 -0.99425 0.0467529 +-0.164452 -0.495395 0.00377229 -0.173742 -0.983712 0.0460976 +0.269285 0.4989 -0.0153435 0.142359 0.988122 0.0578662 +0.200084 0.207391 -0.190539 0.666866 0.208602 -0.715384 +-0.0268107 0.354556 -0.167524 -0.280694 0.781652 -0.556984 +0.227353 0.178322 -0.167328 0.782083 0.0964 -0.615673 +0.232607 0.488863 -0.00275388 -0.351176 0.8752 0.332716 +-0.211902 0.148084 -0.167344 -0.551682 0.134675 -0.82311 +0.0352559 -0.303844 -0.184716 0.972818 0.19055 -0.131591 +-0.249066 0.0924798 -0.176861 -0.915853 0.168993 -0.364218 +-0.24861 0.0696213 -0.171888 -0.900045 -0.341896 -0.270233 +0.20688 0.0783054 -0.178013 0.690954 -0.240036 -0.681884 +-0.225046 0.0443993 -0.176679 -0.780964 -0.407465 -0.473357 +-0.222217 0.0236363 -0.178493 -0.888663 0.291401 -0.354066 +0.145272 0.426256 -0.00477225 -0.523169 0.847879 0.0860009 +0.140168 0.42338 -0.0239676 -0.476226 0.877347 -0.0589195 +0.149406 -0.00866502 -0.16907 0.45375 -0.652192 -0.607252 +-0.099538 0.0189722 -0.180078 -0.387643 -0.619283 -0.682804 +0.0177342 -0.498155 -0.145674 0.0106723 -0.999719 -0.021163 +-0.165943 -0.0102313 -0.177925 0.882946 -0.45886 -0.0992707 +0.0793646 0.414614 -0.0107937 0.0262606 0.999653 0.00192103 +0.0919767 0.41419 -0.0206444 -0.00594656 0.998473 -0.0549251 +-0.244814 -0.0134611 -0.183602 -0.830532 0.556944 -0.00538381 +-0.00692974 -0.0276863 -0.177815 -0.233678 -0.739778 -0.63097 +0.325312 0.386123 -0.0158537 0.976565 0.0265209 0.213583 +0.321009 0.401484 -0.00693997 0.787187 0.111711 0.606513 +-0.113425 0.326829 0.120791 -0.605463 0.671061 0.427891 +0.322922 0.330995 -0.0204959 0.989439 -0.143285 0.0219084 +-0.048703 -0.348053 -0.278471 0.357865 -0.224364 -0.906418 +0.305616 0.259745 -0.00953838 0.948568 -0.316269 -0.0138515 +-0.236672 -0.0849515 -0.174999 0.153253 -0.420187 0.894403 +0.300484 0.245509 -0.00697983 0.934193 -0.356584 -0.0114331 +-0.221224 0.201225 -0.0108951 -0.479706 0.301818 0.823886 +-0.229934 -0.128366 -0.191474 0.770553 0.151452 0.61912 +0.277762 0.0927428 -0.0509277 0.97002 -0.14856 -0.192332 +-0.266845 0.185217 -0.00917026 0.011008 0.317875 0.948069 +0.106124 -0.312065 0.125727 0.48134 -0.626575 0.612956 +-0.170918 -0.00482203 -0.195077 0.821267 -0.186132 -0.539328 +0.142662 -0.139625 -0.0163147 0.851105 0.129667 -0.50873 +0.123687 0.00785791 -0.200521 0.35989 -0.572374 -0.736795 +0.137134 -0.460871 -0.0102946 0.659347 -0.0152546 0.751684 +-0.0917639 0.238573 -0.221997 -0.473011 0.268985 -0.838992 +0.275477 0.165443 0.0826578 0.956768 0.0913365 0.276137 +-0.282526 -0.167913 -0.17188 -0.5859 0.374898 0.718452 +0.121119 -0.487917 -0.00668261 0.42487 -0.650646 0.629401 +0.0254593 -0.269562 -0.174208 0.946984 0.286381 -0.145629 +-0.233977 -0.436779 -0.149746 -0.841319 -0.455006 -0.291808 +0.0596283 -0.498479 -0.0149892 0.0225735 -0.999341 0.0284243 +0.0410414 -0.498746 -0.0271626 -0.0126833 -0.99989 0.00774003 +0.188299 0.46 -0.0233338 -0.618874 0.779894 -0.0936017 +-0.21727 0.330853 -0.0110384 -0.210246 0.338384 0.91722 +0.0383055 -0.460016 -0.183392 0.707897 0.142768 -0.691737 +-0.0670009 -0.497618 -0.170883 0.0254883 -0.998732 -0.0434204 +-0.0228042 -0.185321 -0.154122 0.496287 0.846824 -0.191281 +-0.257657 0.201237 -0.015826 0.0552397 0.309076 0.949432 +0.00188757 0.36593 -0.162039 -0.146385 0.819283 -0.554389 +0.276615 0.0630728 -0.00606262 0.958471 -0.281178 -0.0476696 +-0.0496076 0.330555 -0.184824 -0.34573 0.690342 -0.635531 +0.198997 -0.0473221 -0.00757761 0.645241 -0.759662 -0.0810972 +0.160129 0.290195 -0.184192 0.493463 0.467189 -0.733641 +0.150473 -0.154491 -0.00787134 0.87121 0.243916 -0.426027 +-0.130369 0.265239 -0.18447 -0.532999 0.438313 -0.723736 +-0.203973 -0.199824 -0.000314282 -0.307938 0.701076 0.64317 +-0.171167 0.227789 -0.17799 -0.347465 0.265845 -0.899219 +-0.194698 0.180143 -0.177247 -0.365434 0.0116778 -0.930764 +0.0350772 0.205037 -0.263054 0.0465483 0.164604 -0.985261 +-0.215958 -0.196688 -0.0109164 -0.405017 0.704276 0.583058 +-0.186148 0.149404 -0.180468 -0.397857 0.0598052 -0.915496 +-0.18666 0.129286 -0.18387 -0.169088 0.317035 -0.933219 +-0.205279 0.124781 -0.185475 -0.131945 0.666655 -0.733595 +-0.260369 -0.235889 -0.0164346 -0.739113 0.435615 0.513762 +-0.224317 0.121211 -0.182768 -0.419767 0.738037 -0.528297 +-0.0670761 -0.322286 0.0945961 -0.71331 -0.131298 0.68844 +0.163574 -0.254593 -0.0200984 0.901943 -0.0898072 -0.422413 +-0.135443 0.0453935 -0.18482 -0.108326 -0.421775 -0.900206 +0.181589 0.0177888 -0.168769 0.56434 -0.539276 -0.625062 +0.169485 -0.248898 -0.00655404 0.946894 -0.0784354 -0.311832 +-0.278678 -0.345828 -0.0277967 -0.942401 -0.187015 0.277319 +-0.258779 -0.393553 -0.0174777 -0.850962 -0.421266 0.313687 +0.138152 0.000329399 -0.185796 0.419438 -0.616488 -0.666344 +-0.161726 0.0100633 -0.18716 0.825665 -0.261728 -0.499776 +-0.156882 0.0223561 0.108298 -0.854772 -0.378696 0.354899 +0.0466697 -0.0476824 -0.161051 0.00982396 -0.849935 -0.526796 +0.157059 0.435535 -0.0145143 -0.600906 0.799297 -0.00598713 +0.0186418 0.412486 -0.0203801 -0.117349 0.991954 -0.0474971 +-0.265589 -0.0508396 -0.179618 -0.816921 0.293946 0.496221 +-0.0919431 0.375947 -0.00744563 -0.46438 0.885573 -0.0105124 +-0.239877 0.330469 -0.104833 -0.0464242 0.741483 -0.669363 +0.0522626 0.204442 -0.261764 0.120769 0.171633 -0.977731 +0.0862318 0.382321 -0.129718 0.152054 0.85671 -0.492877 +-0.197379 0.293097 -0.141232 -0.0330425 0.587782 -0.808344 +-0.24139 -0.119784 -0.182032 0.367145 0.0573076 0.928397 +-0.199766 0.249659 -0.0063999 -0.837068 0.169974 0.520024 +-0.224489 0.0810458 -0.0383477 -0.752073 -0.659075 -0.00230068 +-0.204366 0.273441 -0.153077 -0.122279 0.45893 -0.880017 +-0.301666 0.230832 -0.0197228 -0.322411 0.036014 0.945915 +0.00217172 0.193979 -0.263119 -0.134149 0.123762 -0.983202 +0.205143 0.285576 -0.151958 0.60067 0.298553 -0.741661 +-0.174952 -0.364861 -0.265962 -0.427454 -0.326747 -0.842923 +-0.234033 -0.140138 -0.177867 0.387607 0.511831 0.766674 +-0.23672 -0.00441334 -0.161768 -0.876861 0.34659 0.333152 +-0.161616 0.0102805 -0.0719941 -0.666318 -0.739257 -0.0975703 +-0.0371041 -0.18065 -0.17079 0.477156 0.855665 -0.200397 +-0.295826 -0.232711 -0.176733 -0.99411 -0.0964069 0.0494993 +0.010951 -0.231788 -0.180113 0.848926 0.441409 -0.29066 +-0.293502 -0.259957 -0.154628 -0.996416 -0.0712833 -0.0455312 +-0.290038 0.216484 -0.0173544 -0.106797 0.154145 0.982259 +-0.269062 0.218065 -0.0198265 0.08579 0.237022 0.967709 +0.00240592 0.410099 -0.0102842 -0.173105 0.98486 -0.00923643 +-0.26905 -0.335575 -0.182767 -0.876754 -0.323481 -0.355898 +0.285231 0.125913 -0.0196739 0.994929 -0.0387188 -0.0928261 +-0.188431 0.263977 0.0331166 -0.933743 0.32362 0.152951 +0.00558207 -0.496635 -0.180972 0.107771 -0.964907 -0.239456 +-0.16257 -0.494965 -0.180085 -0.216774 -0.9474 -0.235462 +-0.250465 0.11077 -0.0093988 -0.74493 -0.645754 0.167576 +0.186794 0.245707 -0.187719 0.613107 0.321224 -0.721745 +-0.153026 0.232661 -0.185115 -0.466726 0.29286 -0.834506 +-0.171126 0.204369 -0.183746 -0.381398 0.17618 -0.907467 +0.209502 0.157263 -0.18883 0.707848 0.0115089 -0.706271 +-0.201231 0.0598179 0.000655825 -0.806855 -0.566263 0.168317 +-0.158541 0.00183519 -0.0371741 -0.715912 -0.690615 -0.102569 +-0.101881 -0.0486321 -0.0273744 -0.591598 -0.791464 -0.153615 +-0.208243 0.113392 -0.199159 0.0135596 0.631008 -0.775658 +-0.101824 -0.0537022 -0.000888922 -0.592633 -0.796101 -0.122516 +-0.0532122 -0.170579 -0.006644 -0.404382 0.902766 0.14659 +-0.238663 0.111728 -0.178272 -0.735289 0.543601 -0.404782 +0.200729 0.0932609 -0.188582 0.670671 -0.190311 -0.716926 +-0.148038 -0.191471 0.00336939 -0.0669119 0.720482 0.690238 +0.068068 -0.0634329 -0.130323 0.103898 -0.879111 -0.465155 +-0.235671 0.0578085 -0.181854 -0.658822 -0.586752 -0.470825 +0.198608 0.0467943 -0.17274 0.662404 -0.362664 -0.655512 +0.161808 -0.193778 -0.00887192 0.88802 0.238906 -0.392868 +-0.120157 0.0403025 -0.186171 -0.307215 -0.509334 -0.803865 +-0.210857 0.0343577 -0.189969 -0.612677 0.147205 -0.776504 +0.16465 -0.272325 -0.00841697 0.926413 -0.241831 -0.288578 +-0.285698 -0.293552 -0.0398533 -0.962049 0.028412 0.271393 +-0.280296 -0.28049 -0.0267867 -0.924143 0.108513 0.366313 +-0.163535 0.0314781 -0.195572 0.575048 -0.0509511 -0.816531 +0.134542 -0.497411 -0.0382139 0.174033 -0.966633 0.187971 +0.13645 -0.490748 -0.0212061 0.44592 -0.705301 0.551095 +0.123622 0.41624 -0.029397 -0.238022 0.965681 -0.103951 +-0.273585 -0.0896972 -0.264835 -0.620375 0.463623 -0.632605 +0.325522 0.369779 -0.0249653 0.999802 -0.0127427 -0.0152775 +-0.0451759 -0.242254 -0.264696 0.446053 0.48172 -0.754309 +0.316693 0.303547 -0.0308652 0.966859 -0.222729 -0.124803 +-0.278542 0.314921 -0.0244283 -0.0329394 -0.0169397 0.999314 +-0.30668 0.287722 -0.0247767 -0.282624 0.051214 0.957863 +-0.288438 0.285751 -0.0245489 0.0419892 0.0181038 0.998954 +-0.0221394 -0.191095 -0.173853 0.568102 0.783259 -0.252519 +-0.298367 0.26931 -0.023559 -0.0700059 0.0668205 0.995306 +-0.273808 -0.338345 -0.166973 -0.907758 -0.312728 -0.279602 +0.234243 0.130705 -0.158244 0.809408 -0.0773267 -0.582133 +-0.259003 0.235378 -0.0242733 0.0576258 0.157736 0.985798 +-0.247395 0.218811 -0.0213515 -0.0317319 0.235253 0.971416 +-0.099451 -0.0378739 0.138492 -0.593772 -0.716378 0.366383 +0.283974 0.142946 -0.0325854 0.99223 0.0146368 -0.12355 +0.0049412 0.352454 -0.180592 -0.114951 0.763083 -0.635996 +0.2845 0.15923 -0.021432 0.995058 0.044861 -0.0885791 +0.0336417 0.345102 -0.190465 0.0443174 0.719724 -0.692845 +0.100435 0.332505 -0.184606 0.308452 0.639161 -0.704507 +-0.069567 0.306098 -0.197553 -0.402319 0.591631 -0.69865 +-0.272901 0.138148 -0.0140568 -0.81844 -0.509762 0.26514 +-0.199914 0.0541902 -0.0179697 -0.789453 -0.607483 0.0879135 +-0.111302 -0.0436234 -0.0160109 -0.601147 -0.78572 -0.145833 +0.148828 -0.169224 -0.0196075 0.817246 0.26411 -0.512206 +-0.137041 -0.171438 -0.0229184 0.00931237 0.865748 0.500393 +0.191785 0.279065 -0.166669 0.59796 0.377731 -0.706939 +-0.175487 0.0995726 -0.190427 0.180639 0.156361 -0.971041 +0.140848 -0.321974 -0.0174086 0.871287 -0.44063 -0.216112 +-0.161734 -0.38091 -0.266016 -0.367064 -0.356599 -0.859128 +-0.23491 -0.43939 -0.0264548 -0.823501 -0.497278 0.27306 +-0.243448 -0.423987 -0.0233949 -0.817297 -0.503751 0.27975 +0.0693705 0.201285 -0.259534 0.201101 0.163982 -0.965748 +-0.111519 -0.0281881 -0.0871511 -0.578517 -0.787863 -0.211162 +0.184483 0.0434931 -0.18391 0.60303 -0.383344 -0.699573 +-0.115351 -0.497161 -0.0174169 0.109366 -0.993748 0.0224673 +0.249532 0.496647 -0.0118621 -0.19563 0.972976 0.122662 +0.173102 0.447887 -0.0173198 -0.625922 0.778739 -0.042285 +-0.262901 -0.0955654 -0.276361 -0.302516 0.413518 -0.858771 +-0.157146 0.128013 -0.194281 -0.46512 -0.0545913 -0.883563 +-0.267014 0.356975 -0.0375649 -0.0289844 0.925606 0.377378 +0.122147 -0.00709794 -0.188249 0.360822 -0.647838 -0.670905 +-0.260129 -0.395947 -0.13169 -0.888893 -0.417321 -0.188979 +-0.273926 0.35083 -0.0737499 -0.138979 0.859717 -0.491499 +-0.193667 -0.0543319 -0.180252 0.712635 -0.608956 0.348316 +-0.297022 0.344128 -0.0305563 -0.369997 0.526819 0.765221 +0.28359 0.170352 0.0406465 0.992627 0.0545278 0.10825 +-0.298446 0.324906 -0.0260808 -0.239073 0.153717 0.958757 +-0.316866 0.302569 -0.0303418 -0.665673 0.123841 0.735896 +0.217388 0.026364 -0.13525 0.7144 -0.496207 -0.493368 +-0.221158 -0.143996 -0.192171 0.555643 0.708119 0.435692 +-0.11482 0.27479 0.17008 -0.590562 0.395337 0.703523 +-0.159081 -0.00136278 -0.00446827 -0.755204 -0.653193 -0.0548339 +0.244263 0.00512708 -0.0337563 0.797671 -0.58359 -0.152133 +-0.0104071 -0.204976 -0.184385 0.660339 0.681567 -0.315307 +0.25149 0.0118225 -0.0187866 0.832472 -0.543973 -0.105276 +-0.076176 -0.0673309 -0.0250936 -0.532258 -0.834169 -0.144441 +-0.0896029 -0.0601359 -0.0143037 -0.564234 -0.813355 -0.141755 +0.0202 -0.408677 -0.180685 0.82855 -0.154236 -0.538252 +0.00920009 -0.4185 -0.190699 0.710229 -0.129256 -0.692002 +0.0254023 -0.44796 -0.191129 0.564624 0.296009 -0.77044 +0.0572021 0.185716 -0.263661 0.143943 0.108355 -0.983636 +-0.180455 -0.488598 -0.179168 -0.452132 -0.804531 -0.385107 +-0.104314 -0.172055 -0.0244684 0.0554393 0.89934 0.43372 +0.151512 -0.457702 -0.0244168 0.772251 0.142245 0.619189 +0.0192207 0.406649 -0.0636753 -0.108627 0.973933 -0.199136 +0.147881 -0.476092 -0.0213927 0.668126 -0.242149 0.703542 +0.017926 0.364658 -0.16674 -0.0551706 0.807245 -0.587632 +0.275944 0.491911 -0.0320967 0.254019 0.853706 -0.4546 +0.132351 0.311835 -0.185884 0.40696 0.55402 -0.726254 +-0.0975889 0.207346 -0.226809 -0.47292 0.182515 -0.861995 +-0.137943 0.246526 -0.188983 -0.515178 0.351067 -0.781885 +0.204689 0.187024 -0.19095 0.690845 0.134985 -0.71029 +-0.112796 0.302466 -0.169789 -0.519756 0.593879 -0.614135 +-0.17162 0.117815 -0.188006 -0.158609 0.121726 -0.979809 +0.0585454 0.414935 -0.0123907 -0.00432233 0.999926 -0.0113981 +-0.120707 0.311589 -0.153313 -0.516999 0.657081 -0.548595 +-0.0650369 0.385396 -0.0452205 -0.40302 0.901241 -0.159183 +0.120877 0.40435 0.0476908 0.180593 0.928429 0.324662 +-0.19332 0.0989153 -0.201317 0.411389 0.30176 -0.860058 +-0.241455 0.0755908 -0.18891 -0.787749 -0.216152 -0.576828 +0.103159 0.406399 0.0522698 0.144983 0.963293 0.225936 +-0.156876 0.0707403 -0.190992 0.0877729 -0.02314 -0.995872 +0.0291073 -0.498643 -0.0454683 -0.0843972 -0.996272 0.0178534 +0.0836793 0.412764 0.0189247 0.0454997 0.995895 0.0782456 +-0.107604 0.0477951 -0.197338 -0.414137 -0.473975 -0.77707 +-0.216406 0.0511591 -0.190236 -0.460738 -0.48022 -0.746397 +-0.319071 0.273361 -0.0294111 -0.683983 0.0172377 0.729294 +0.294747 0.235904 -0.0286346 0.918536 -0.365863 -0.149788 +0.203103 -0.0414642 -0.0244927 0.653272 -0.745659 -0.131257 +-0.0209079 -0.105216 -0.0305008 -0.620476 -0.643473 -0.448276 +0.00716605 -0.119299 -0.0441514 -0.557824 -0.376514 -0.739641 +-0.264533 -0.227143 -0.0317715 -0.772045 0.471341 0.426362 +0.0911586 -0.0194381 -0.189258 0.220539 -0.707959 -0.670937 +0.0728684 -0.0261761 -0.186808 0.136653 -0.742972 -0.655225 +0.155815 -0.255256 -0.0339386 0.860233 -0.0809675 -0.503431 +-0.179748 -0.0429106 -0.188198 0.849264 -0.527713 0.0164238 +0.123343 -0.382244 -0.036488 0.983918 0.151332 -0.0948945 +-0.293698 -0.119905 -0.192708 -0.735516 0.163411 0.657505 +-0.262827 -0.396564 -0.0382225 -0.876633 -0.446385 0.179595 +-0.212636 -0.470425 -0.0226263 -0.747047 -0.608615 0.267411 +-0.276775 -0.370304 -0.0958552 -0.931348 -0.353899 -0.0857042 +-0.287278 -0.153101 -0.180597 -0.565854 0.237605 0.789527 +0.106313 0.251345 -0.233074 0.345429 0.350784 -0.870419 +-0.297797 -0.169351 -0.185465 -0.809138 0.181895 0.558757 +-0.30049 -0.185446 -0.187226 -0.927953 0.0646164 0.367053 +0.0635791 0.167765 -0.264069 0.177627 0.0684305 -0.981716 +0.0190171 -0.251457 -0.178888 0.913877 0.32855 -0.238502 +-0.0803716 -0.424224 -0.252884 0.191289 -0.530837 -0.825603 +-0.170436 -0.496109 -0.0389164 -0.0601794 -0.998087 0.0141972 +0.245042 0.486359 -0.0422157 -0.17243 0.864553 -0.472033 +0.0283534 -0.392032 -0.176873 0.891098 -0.287181 -0.351384 +0.210986 0.472435 -0.0405755 -0.489294 0.822081 -0.291159 +0.188207 0.451968 -0.0538731 -0.545664 0.77716 -0.313486 +0.00212429 -0.491503 -0.196782 0.131096 -0.747075 -0.651685 +0.325692 0.400122 -0.0276137 0.998712 0.0422419 -0.0280951 +-0.0970603 -0.497084 -0.187925 0.0162015 -0.9937 -0.110895 +0.068099 0.327163 -0.200994 0.201872 0.62807 -0.751516 +-0.276254 -0.110492 -0.181982 -0.376412 0.0640301 0.924237 +0.170971 0.2523 -0.197395 0.5559 0.3496 -0.754158 +-0.320997 0.240064 -0.0467949 -0.981387 -0.192031 0.00216182 +-0.139902 0.226931 -0.195071 -0.525912 0.261596 -0.809311 +0.192374 0.19066 -0.201329 0.637448 0.152216 -0.755308 +-0.244205 0.145935 -0.136518 -0.787883 -0.303507 -0.53584 +-0.29778 0.17827 -0.0431784 -0.877875 -0.472149 -0.0800708 +-0.289707 0.162619 -0.0315011 -0.858736 -0.512418 0.000911059 +0.281939 0.164413 -0.0399215 0.988122 0.0393269 -0.148553 +-0.169708 0.0831656 -0.192594 0.20127 0.0999671 -0.974421 +0.184819 0.089315 -0.201534 0.613133 -0.203786 -0.763243 +-0.141075 0.0776179 -0.195002 -0.295545 -0.223102 -0.928913 +0.075137 0.180495 -0.260858 0.226392 0.0929134 -0.969595 +-0.11526 -0.0367431 -0.0362817 -0.605148 -0.780745 -0.155672 +-0.226856 0.0654966 -0.198054 -0.483279 -0.47671 -0.734295 +-0.0619252 -0.0738553 -0.0377218 -0.517826 -0.843647 -0.141835 +0.201626 -0.00525016 -0.118635 0.637586 -0.636509 -0.433982 +-0.247113 -0.0987123 -0.178651 0.140606 -0.226901 0.963715 +-0.131564 -0.161602 -0.0427779 0.0536438 0.921899 0.383698 +-0.0872999 -0.174396 -0.0219159 0.0264465 0.922661 0.384705 +0.13999 -0.17511 -0.0339588 0.738299 0.259138 -0.622705 +0.129292 -0.160998 -0.0400794 0.673055 0.241258 -0.699136 +-0.182288 0.029303 -0.202658 0.122297 0.244658 -0.961866 +-0.227551 -0.183847 -0.0391963 -0.501334 0.748165 0.434642 +0.167167 0.0419431 -0.196795 0.533048 -0.395807 -0.747795 +0.0502986 -0.0650632 -0.129292 0.0198864 -0.88377 -0.467499 +-0.213664 0.0175127 -0.19924 -0.553688 0.585146 -0.592482 +-0.0567543 0.000505572 -0.185655 -0.321994 -0.674533 -0.664323 +-0.171661 0.015315 -0.200128 0.609455 -0.0390879 -0.791857 +0.14855 -0.266466 -0.0434085 0.810637 -0.124645 -0.572129 +-0.277202 -0.363628 -0.0404109 -0.938339 -0.292928 0.183612 +-0.25381 -0.410425 -0.0311911 -0.85149 -0.476331 0.219257 +0.161142 -0.455085 -0.0409527 0.881186 0.281843 0.379574 +0.0637417 -0.0733256 -0.112318 0.0825074 -0.880597 -0.466629 +-0.215283 -0.0976872 -0.197252 0.809433 -0.430641 0.399207 +-0.221462 -0.113814 -0.202372 0.875405 -0.204785 0.437868 +0.129096 -0.498873 -0.0564431 0.0404313 -0.998461 0.0379617 +0.221304 0.469849 -0.0571803 -0.339268 0.809738 -0.478771 +0.229032 0.480668 -0.0425102 -0.352036 0.851619 -0.38835 +-0.170136 -0.153997 -0.193595 0.0070891 0.956305 -0.292286 +-0.0333885 0.397363 -0.048812 -0.31776 0.932456 -0.171911 +-0.0634863 -0.173315 -0.194103 0.398262 0.870915 -0.287915 +-0.0777407 0.381774 -0.0317689 -0.428196 0.897318 -0.107091 +0.0332777 -0.313022 -0.199576 0.953107 0.0965404 -0.286822 +-0.0514428 -0.077432 -0.0512488 -0.459403 -0.85846 -0.228027 +-0.266498 -0.07247 -0.176084 -0.577203 0.021466 0.816319 +-0.151164 -0.166719 -0.0311661 -0.0243236 0.883865 0.46711 +-0.165776 -0.161837 -0.0429132 -0.084748 0.910467 0.404806 +-0.201444 -0.172942 -0.0349784 -0.297908 0.836422 0.460052 +0.147929 -0.22663 -0.0440295 0.761124 0.14871 -0.631329 +-0.00911933 0.176942 -0.262832 -0.190516 0.0642465 -0.979579 +-0.221676 -0.416155 -0.195983 -0.735411 -0.4428 -0.512932 +-0.0122156 0.157548 -0.262965 -0.192596 0.00321827 -0.981273 +0.128206 -0.400134 -0.0344419 0.93958 0.341903 0.017083 +0.304687 0.286108 -0.0585446 0.893357 -0.261233 -0.36561 +0.281176 0.17483 0.0558251 0.981505 0.0630922 0.180741 +-0.0276887 -0.493904 -0.193084 -0.0605114 -0.811762 -0.580845 +-0.132973 -0.497174 -0.1822 -0.0375436 -0.9948 -0.0946773 +-0.147472 -0.494107 -0.193688 -0.179583 -0.928241 -0.325758 +-0.27106 0.137899 -0.0438841 -0.793366 -0.59392 -0.133527 +-0.234277 0.0918094 -0.029152 -0.734859 -0.678159 0.0090757 +-0.102945 0.264131 -0.204893 -0.506139 0.395206 -0.766574 +0.197895 0.169714 -0.199575 0.668055 0.064843 -0.741281 +-0.12166 -0.0244625 -0.0710749 -0.614079 -0.769182 -0.176824 +-0.227133 0.107671 -0.197439 -0.490549 0.512639 -0.704672 +-0.0908645 -0.0548396 -0.0370888 -0.573424 -0.803715 -0.158831 +-0.143581 0.115414 -0.200665 -0.51277 -0.127382 -0.849024 +-0.220395 -0.473026 -0.0544024 -0.763629 -0.62941 0.143921 +-0.209036 -0.482 -0.042376 -0.645236 -0.740804 0.186759 +-0.266191 -0.396829 -0.0756393 -0.897236 -0.441551 -0.000220296 +-0.15685 0.151167 -0.19599 -0.514381 -0.0151114 -0.857428 +0.30194 0.45237 -0.0528704 0.671081 0.445055 -0.592939 +-0.174278 0.0642559 -0.196007 0.241644 0.0695166 -0.967872 +0.0694136 0.411586 -0.0437511 0.0226303 0.985857 -0.166053 +-0.196397 0.043418 -0.195202 -0.232478 -0.00647761 -0.97258 +-0.0179899 -0.0343312 -0.164525 -0.267302 -0.77952 -0.566479 +0.279042 0.126865 -0.0603277 0.97511 -0.0328721 -0.219273 +-0.211383 0.0663579 -0.0292804 -0.754614 -0.653492 0.0592171 +-0.123297 0.235612 -0.203515 -0.530526 0.280861 -0.799787 +0.146942 0.0322019 -0.204255 0.448703 -0.446333 -0.774243 +-0.133219 -0.0170745 -0.060031 -0.644974 -0.747073 -0.160906 +-0.0173109 -0.0110508 -0.191463 -0.256632 -0.680914 -0.685928 +0.188825 -0.0528303 -0.026896 0.61215 -0.776215 -0.150873 +0.0383457 -0.0364237 -0.177464 -0.0405052 -0.786192 -0.616653 +0.00941705 -0.498622 0.0338506 -0.00185106 -0.999811 -0.0193755 +-0.19069 -0.0516204 -0.20037 0.843258 -0.504548 -0.185332 +-0.275471 -0.0620653 -0.190862 -0.849875 0.392551 0.351591 +-0.205867 -0.0822465 -0.207571 0.924061 -0.381468 0.0243584 +0.11111 -0.117022 -0.0504668 0.507854 -0.223477 -0.831951 +0.104177 -0.146716 -0.0536962 0.415518 0.148143 -0.89744 +-0.21884 -0.133435 -0.204843 0.871719 0.31366 0.376461 +-0.148906 -0.157473 -0.0518783 0.00202462 0.934877 0.354965 +0.0374325 0.414168 -0.0111623 -0.0603732 0.998125 -0.0101232 +-0.292502 -0.277557 -0.144533 -0.990451 -0.103801 -0.0907319 +-0.25099 -0.132093 -0.178669 0.0583553 0.220233 0.9737 +-0.302095 -0.155596 -0.196753 -0.886557 0.0961669 0.452514 +-0.293295 -0.246339 -0.188322 -0.971677 -0.210016 -0.108342 +0.0350162 0.41351 0.00807732 -0.0641468 0.996766 0.048405 +0.00146988 -0.411945 -0.206758 0.708869 -0.467845 -0.527851 +-0.00586191 -0.428045 -0.202198 0.611707 -0.198794 -0.765699 +0.151791 -0.490422 -0.0344937 0.567266 -0.685385 0.456572 +0.0458817 -0.49886 -0.0503152 -0.00410699 -0.999987 0.00288659 +0.239193 0.473917 -0.0591993 -0.138147 0.794999 -0.590671 +-0.225915 -0.0948245 -0.182868 0.471302 -0.436538 0.766361 +-0.203956 -0.153662 -0.0978765 -0.321923 0.928219 0.186481 +0.307852 0.436238 -0.05641 0.752685 0.346177 -0.560024 +0.317178 0.416468 -0.0529276 0.873511 0.192379 -0.44718 +-0.172207 -0.472439 -0.206506 -0.50611 -0.563419 -0.653002 +0.00621408 -0.474652 -0.203443 0.250888 -0.175369 -0.951998 +-0.285139 -0.328722 -0.130614 -0.954763 -0.250961 -0.15952 +-0.0677756 0.380026 -0.0642224 -0.411378 0.886149 -0.213325 +-0.3248 0.297204 -0.0477878 -0.990776 0.107931 0.0819344 +-0.247882 0.111547 -0.0590888 -0.778691 -0.611213 -0.141633 +-0.212272 0.0669632 -0.0472578 -0.762034 -0.64725 -0.019296 +-0.0262436 0.166771 -0.259617 -0.238768 0.0410244 -0.97021 +0.178593 -0.0556663 -0.045784 0.570391 -0.789176 -0.227717 +0.11425 0.309877 -0.196968 0.359799 0.557891 -0.747865 +-0.0781526 0.289605 -0.205058 -0.433139 0.514433 -0.740101 +-0.110306 -0.160143 -0.0529959 0.0926443 0.945377 0.312537 +0.127798 0.299224 -0.197474 0.406254 0.520511 -0.751017 +0.183629 0.177586 -0.210576 0.599626 0.0997127 -0.794044 +0.184434 0.140729 -0.210373 0.59931 -0.0663262 -0.797764 +-0.145061 0.137431 -0.202995 -0.544351 -0.0768857 -0.835327 +-0.215193 -0.174295 -0.0438264 -0.400258 0.81747 0.414169 +-0.211898 0.0965865 -0.208444 -0.0642711 0.278579 -0.95826 +0.134631 -0.201739 -0.0507882 0.669816 0.249081 -0.699504 +-0.19867 0.0797753 -0.208784 0.295431 -0.0898588 -0.951129 +-0.264845 -0.205968 -0.0642105 -0.776344 0.562424 0.284552 +-0.286458 -0.31317 -0.0447306 -0.974117 -0.0495774 0.220539 +-0.290079 -0.313996 -0.06495 -0.98834 -0.0911004 0.122006 +-0.249525 -0.426414 -0.0593499 -0.872943 -0.480074 0.0865984 +0.161207 -0.44561 -0.0568805 0.875387 0.467724 0.122195 +-0.222946 0.000861546 -0.210821 -0.523438 0.671904 -0.523983 +0.0956326 0.147463 0.241943 0.571993 0.653146 0.49621 +0.159537 0.433238 -0.0463518 -0.578672 0.789333 -0.205164 +-0.172742 -0.0237388 -0.186052 0.92431 -0.371659 -0.0867192 +0.0842122 0.329618 -0.193598 0.262207 0.63556 -0.726162 +-0.0818724 0.377104 -0.0475643 -0.433562 0.885044 -0.169474 +0.317542 0.333556 -0.052694 0.935353 -0.121488 -0.332197 +-0.321337 0.273627 -0.0655925 -0.94054 -0.0441517 -0.336801 +-0.206823 -0.146775 -0.204671 0.536967 0.839959 0.0783273 +-0.315149 0.223069 -0.0568652 -0.945166 -0.2754 -0.175546 +0.00124416 -0.235286 -0.212351 0.750163 0.519002 -0.409747 +-0.278332 0.151081 -0.0563664 -0.804332 -0.569186 -0.170517 +-0.284083 0.163786 -0.0690763 -0.823249 -0.52861 -0.206963 +0.0883882 -0.134356 -0.0576798 0.25709 0.00497414 -0.966375 +-0.265219 -0.397588 -0.093724 -0.898888 -0.431915 -0.0738289 +0.0127324 -0.402055 -0.199205 0.765913 -0.435436 -0.473047 +-0.210399 -0.416752 -0.209898 -0.671598 -0.443488 -0.593527 +-0.00797303 -0.44745 -0.204646 0.284518 0.0126952 -0.958587 +0.0290983 -0.148939 -0.0560912 -0.356343 0.284444 -0.890007 +-0.181603 -0.159125 -0.0553023 -0.1634 0.926267 0.339603 +0.124042 -0.225897 -0.0666262 0.614172 0.160963 -0.772582 +-0.235356 -0.00280137 -0.194215 -0.751365 0.616407 -0.235569 +0.136156 -0.302367 -0.0477438 0.811929 -0.271518 -0.516769 +-0.0265955 -0.455294 -0.205876 0.240537 -0.29738 -0.923963 +0.0808181 0.143981 -0.26083 0.258161 -0.0158019 -0.965973 +-0.2848 -0.346871 -0.0676228 -0.971039 -0.232977 0.0529709 +0.167532 -0.464029 -0.0547125 0.971605 0.136925 0.192963 +-0.140211 -0.495195 -0.0651055 -0.0121549 -0.999457 0.0306218 +-0.155251 -0.495565 -0.052203 0.036399 -0.999319 0.00612616 +0.133636 -0.0594512 -0.101137 0.374625 -0.833029 -0.407087 +0.0369773 -0.498894 -0.0656276 -0.0103579 -0.99994 -0.0034641 +-0.0141255 -0.483552 -0.203099 -0.0357993 -0.490325 -0.870804 +0.258877 0.466691 -0.0675613 0.137962 0.694321 -0.706317 +-0.0523468 -0.479467 -0.203369 0.288616 -0.56314 -0.774322 +-0.271742 -0.354019 -0.154117 -0.907523 -0.334477 -0.254024 +0.115012 0.312274 0.19144 0.27747 0.512743 0.812469 +0.289042 0.245373 -0.0593604 0.853102 -0.346096 -0.390428 +0.0315069 0.333482 -0.20167 0.0443732 0.665466 -0.745108 +0.297752 0.264166 -0.0579226 0.867848 -0.32634 -0.374623 +-0.0605814 0.295562 -0.210306 -0.367979 0.533614 -0.761477 +-0.311626 0.208116 -0.045917 -0.937214 -0.346661 -0.038162 +0.278471 0.175093 -0.0567411 0.977597 0.0398863 -0.206672 +-0.169253 -0.497317 -0.107758 -0.0301353 -0.999412 0.0163825 +-0.178809 0.0285854 0.027718 -0.869055 -0.480404 0.11813 +-0.0689646 -0.0665676 -0.0561202 -0.51807 -0.834909 -0.185821 +0.115566 -0.0896297 -0.0642796 0.436928 -0.66864 -0.601677 +-0.229938 0.0866986 -0.203272 -0.569009 0.0181582 -0.822131 +0.0930389 -0.1172 -0.0589475 0.306529 -0.250074 -0.918424 +-0.215762 0.0770504 -0.208684 -0.214284 -0.228452 -0.94968 +-0.298576 0.179541 -0.0253778 -0.886034 -0.344359 0.310421 +-0.16599 -0.153557 -0.0647994 -0.0934374 0.942683 0.32034 +-0.115416 0.0642316 -0.202031 -0.444838 -0.379438 -0.811262 +-0.187185 -0.461875 -0.201318 -0.622256 -0.48308 -0.61598 +0.125599 -0.245264 -0.0680702 0.645866 0.07658 -0.7596 +0.114629 -0.349858 -0.0617276 0.877988 -0.0563881 -0.475351 +-0.0845027 0.0566096 -0.21493 -0.400019 -0.443643 -0.801976 +-0.121545 -0.496729 -0.0569096 -0.112567 -0.993638 0.00356556 +-0.203678 0.008301 -0.213312 -0.0677662 0.574748 -0.81552 +0.211008 0.108723 -0.182247 0.710634 -0.14978 -0.687434 +0.147234 -0.496986 -0.0523491 0.296995 -0.946538 0.125939 +0.0100744 0.401981 -0.078196 -0.149761 0.961571 -0.230117 +-0.2535 0.354109 -0.0680366 0.0488351 0.949428 -0.310165 +0.0336932 -0.00244891 -0.211194 -0.0559403 -0.630647 -0.774051 +-0.313347 0.322369 -0.0716475 -0.802784 0.332834 -0.494732 +-0.178028 -0.0141008 -0.204471 0.81585 -0.0757001 -0.573287 +-0.139007 0.096315 -0.199763 -0.455189 -0.181542 -0.871691 +-0.265472 -0.043122 -0.200501 -0.825783 0.563846 0.0126922 +-0.314765 0.304001 -0.0775539 -0.84772 0.160228 -0.505666 +-0.190142 0.0400978 -0.0516244 -0.784112 -0.620383 -0.0171269 +-0.0575623 -0.069347 -0.067775 -0.429581 -0.857277 -0.283788 +-0.040055 -0.0788837 -0.0630025 -0.37955 -0.870804 -0.312476 +-0.029499 -0.0788874 -0.0746025 -0.318811 -0.881096 -0.349328 +-0.151669 -0.150434 -0.0726208 0.00221394 0.943913 0.330186 +-0.13075 -0.155578 -0.0607451 0.0795481 0.950017 0.301894 +-0.190702 -0.153553 -0.197072 0.199871 0.97354 -0.110776 +-0.245533 -0.372439 -0.197128 -0.785563 -0.404509 -0.468256 +0.0279244 -0.164926 -0.0641755 -0.18795 0.627876 -0.755279 +0.0164575 -0.346376 -0.230793 0.793074 -0.190644 -0.578522 +-0.257667 -0.369871 -0.176473 -0.842072 -0.390143 -0.372429 +-0.240133 -0.178761 -0.0691608 -0.582513 0.758295 0.292691 +0.0363799 -0.339822 -0.190291 0.9615 -0.0694276 -0.26589 +-0.149741 0.246379 0.150145 -0.729416 0.282887 0.622838 +0.00068649 -0.400039 -0.219076 0.688545 -0.474827 -0.548129 +0.126619 -0.265245 -0.0680151 0.688213 -0.0225478 -0.725158 +-0.177688 -0.455692 -0.214189 -0.557011 -0.473284 -0.682452 +-0.156891 -0.482644 -0.207082 -0.366108 -0.698086 -0.615338 +-0.137966 -0.48885 -0.209199 -0.205654 -0.794875 -0.57086 +-0.282572 -0.296332 -0.179643 -0.928494 -0.254575 -0.270352 +0.00278977 0.314105 -0.216917 -0.086407 0.597265 -0.797376 +0.122559 -0.389097 -0.0516257 0.937599 0.283144 -0.201834 +-0.257919 -0.411981 -0.0671502 -0.87928 -0.474423 0.0423093 +-0.0310148 0.312343 -0.210297 -0.266964 0.606272 -0.749109 +-0.0671125 0.278582 -0.217998 -0.390986 0.456222 -0.799369 +-0.241292 -0.440153 -0.0542026 -0.863849 -0.485942 0.132758 +-0.0595501 0.375227 -0.0950141 -0.399872 0.871003 -0.285405 +-0.11356 0.273614 -0.192044 -0.526199 0.451954 -0.720313 +0.181665 0.440269 -0.0686903 -0.51033 0.752862 -0.415646 +-0.117489 0.125074 -0.219532 -0.523602 -0.117134 -0.843872 +0.307217 0.421355 -0.0653372 0.748432 0.277371 -0.602424 +0.294791 0.432136 -0.0725574 0.627623 0.377925 -0.680634 +0.0702943 0.404969 -0.0759651 0.0442753 0.967512 -0.24892 +0.0613443 0.408417 -0.0619909 0.0159502 0.979561 -0.200513 +0.0887758 -0.00261617 -0.205503 0.212919 -0.614451 -0.759681 +0.0319613 0.410152 -0.0496765 -0.060258 0.984783 -0.16301 +-0.0192259 0.326526 -0.201728 -0.220736 0.662752 -0.715566 +-0.160047 0.338558 -0.0696293 -0.0641921 0.962373 -0.264041 +-0.307436 0.207467 -0.0669544 -0.907078 -0.340273 -0.247837 +-0.214011 0.0706223 -0.0684771 -0.775638 -0.625458 -0.0847815 +0.0185948 -0.0843064 -0.089419 -0.137935 -0.869339 -0.474577 +0.0822219 -0.105526 -0.0664029 0.195254 -0.494375 -0.847036 +-0.244227 -0.410572 -0.160143 -0.832676 -0.438467 -0.338227 +-0.30669 -0.154233 -0.214987 -0.99725 0.0210031 0.0710782 +-0.077437 0.315679 -0.183552 -0.424389 0.642693 -0.63784 +-0.175541 -0.158577 -0.210582 0.156638 0.953155 -0.258767 +0.0453531 -0.10269 -0.0706567 -0.0938823 -0.657705 -0.747403 +-0.180849 -0.15306 -0.0738848 -0.181037 0.944195 0.275175 +-0.290834 -0.264154 -0.0776835 -0.979601 0.14241 0.141782 +0.122233 -0.317241 -0.0608049 0.78468 -0.228146 -0.576391 +0.078095 -0.0539483 -0.145364 0.150184 -0.859623 -0.488358 +0.118389 -0.368399 -0.0536722 0.951133 0.0781392 -0.298732 +-0.242112 -0.44192 -0.0717753 -0.877529 -0.477458 0.0444656 +-0.278566 -0.273817 -0.210972 -0.878093 -0.302465 -0.370768 +0.0266142 -0.304881 -0.215558 0.90828 0.127872 -0.398342 +-0.0115967 -0.417605 -0.218167 0.634269 -0.507936 -0.582841 +-0.194058 -0.420307 -0.223908 -0.597042 -0.441358 -0.669884 +-0.036621 -0.442625 -0.21974 0.482426 -0.519744 -0.705076 +-0.162864 -0.463997 -0.219124 -0.431419 -0.519675 -0.737438 +0.148629 -0.0915453 0.0750898 0.847229 -0.322837 0.421876 +-0.0711884 -0.484087 -0.210235 0.290744 -0.664271 -0.688631 +-0.199841 -0.492718 -0.0831103 -0.405545 -0.913884 0.0186635 +-0.314025 0.27089 -0.0817612 -0.879957 -0.0242133 -0.474435 +-0.115968 -0.487622 -0.215271 -0.0268359 -0.755877 -0.654164 +-0.0409568 0.298547 -0.216823 -0.305954 0.537793 -0.785602 +-0.184907 0.0352924 -0.0843892 -0.767865 -0.637316 -0.064896 +0.102943 0.285997 -0.217589 0.325391 0.472683 -0.818957 +0.142011 0.250263 -0.216984 0.455344 0.352526 -0.817549 +-0.109578 0.194249 -0.222695 -0.50161 0.145887 -0.852704 +0.186248 0.159282 -0.209986 0.607811 0.0125127 -0.793983 +-0.123251 0.160501 -0.21771 -0.529632 0.027013 -0.847798 +-0.0984879 -0.0382511 -0.0839929 -0.566517 -0.794245 -0.219622 +0.106761 0.0105993 -0.209448 0.289033 -0.549103 -0.784185 +0.0490375 0.00920282 -0.220275 0.0286442 -0.574658 -0.817892 +0.0247314 0.0104055 -0.220283 -0.0879936 -0.582223 -0.808254 +-0.187282 -0.025433 -0.216083 0.761686 -0.0538306 -0.645706 +-0.00454069 0.374197 -0.146345 -0.201202 0.861008 -0.4671 +0.110622 -0.367882 -0.0717629 0.852533 0.139957 -0.503586 +0.129408 -0.411273 -0.0724852 0.715902 0.64156 -0.275474 +-0.298047 -0.101899 -0.22135 -0.939318 0.34145 -0.0330768 +-0.21678 -0.118246 -0.216933 0.981444 -0.0961078 0.165922 +0.25025 0.331811 -0.122972 0.449272 0.00020621 -0.893395 +-0.242875 -0.335088 -0.227656 -0.718345 -0.359177 -0.595795 +0.234964 0.450245 -0.0850486 -0.0241928 0.677851 -0.734801 +0.0271257 -0.321844 -0.217217 0.905497 0.0198816 -0.423887 +0.13119 -0.0152821 -0.174073 0.385501 -0.685191 -0.617983 +0.312398 0.402806 -0.0647532 0.826011 0.144267 -0.544879 +0.304092 0.376545 -0.0803736 0.767483 0.0636893 -0.637898 +-0.0934251 -0.486072 -0.214809 0.131315 -0.721679 -0.679658 +0.0885149 0.296722 -0.21669 0.284617 0.508003 -0.812973 +-0.0516993 0.269797 -0.229441 -0.337534 0.40806 -0.848267 +-0.0714551 0.261694 -0.224182 -0.412197 0.364656 -0.834937 +-0.2894 0.342189 -0.0783618 -0.387237 0.682657 -0.619699 +-0.302887 0.297302 -0.0949342 -0.739994 0.172773 -0.650045 +0.276915 0.14342 -0.0695263 0.968904 0.0100463 -0.247235 +-0.101864 0.125054 -0.228721 -0.479398 -0.121018 -0.869214 +-0.104799 0.0928534 -0.21985 -0.477268 -0.265845 -0.837581 +0.137452 0.0723197 -0.227298 0.434887 -0.285228 -0.854118 +0.00222232 0.0150083 -0.219619 -0.182039 -0.571622 -0.800069 +-0.266775 0.137089 -0.0622943 -0.788455 -0.590109 -0.173525 +-0.257928 -0.0376145 -0.219337 -0.717929 0.638424 -0.277475 +-0.264865 0.140606 -0.0812046 -0.791048 -0.575723 -0.206849 +-0.193323 -0.0437639 -0.218388 0.83972 -0.227336 -0.493141 +-0.280886 -0.068358 -0.224025 -0.826538 0.539802 -0.159528 +-0.0526094 0.354852 -0.14946 -0.383171 0.8007 -0.4605 +-0.161292 0.0126407 -0.0931496 -0.65267 -0.75689 -0.0337537 +-0.0922241 -0.166992 -0.206936 0.265128 0.897774 -0.351723 +0.200804 -0.0305803 -0.0716822 0.625763 -0.727064 -0.282487 +-0.0199715 -0.233308 -0.238067 0.599968 0.539937 -0.590344 +-0.0760946 -0.0529743 -0.0864184 -0.483032 -0.820555 -0.305565 +0.128021 -0.142527 0.119516 0.724723 0.331494 0.60406 +-0.265749 -0.310953 -0.209539 -0.833263 -0.322685 -0.44894 +0.0260363 -0.33965 -0.218043 0.883644 -0.110012 -0.455051 +-0.282439 -0.131911 -0.182277 -0.434578 0.149759 0.888096 +-0.251818 -0.340412 -0.212405 -0.778727 -0.360353 -0.513547 +0.144397 -0.0486136 0.15427 0.453714 -0.795413 0.401823 +-0.201201 -0.483705 -0.0243722 -0.606498 -0.767061 0.209231 +-0.155321 -0.44917 -0.232221 -0.344619 -0.482295 -0.805375 +-0.0814987 -0.471357 -0.222586 0.238709 -0.541284 -0.806244 +-0.130881 -0.478058 -0.221689 -0.156947 -0.602082 -0.782857 +0.0428013 0.293729 -0.229792 0.120416 0.50123 -0.856895 +-0.0231841 0.298492 -0.222913 -0.225064 0.536284 -0.813478 +0.104812 0.268196 -0.226381 0.335302 0.412613 -0.84695 +-0.0743508 0.240708 -0.230584 -0.42191 0.274865 -0.863968 +0.170098 0.166069 -0.22101 0.54269 0.0453253 -0.838709 +-0.0117745 0.139456 -0.262542 -0.188993 -0.0499823 -0.980706 +0.170216 0.148769 -0.221195 0.546799 -0.030595 -0.836705 +-0.0875796 0.134066 -0.237065 -0.439244 -0.0789295 -0.894894 +-0.0778817 0.0990517 -0.235541 -0.411932 -0.24161 -0.878599 +-0.0654126 -0.00802127 -0.171951 -0.339134 -0.705555 -0.622238 +0.151334 0.0846855 -0.223564 0.495042 -0.223602 -0.839605 +-0.0408741 0.0450444 -0.226664 -0.283485 -0.495101 -0.821286 +-0.0760953 0.00508354 -0.180781 -0.361856 -0.664553 -0.653781 +-0.0288234 0.0290828 -0.220604 -0.262091 -0.54112 -0.79906 +0.129503 -0.419664 -0.0891282 0.567051 0.689748 -0.450224 +-0.214686 -0.0223103 -0.233716 0.190379 0.466926 -0.86356 +-0.228941 -0.01296 -0.223037 -0.407458 0.674606 -0.615536 +-0.247264 -0.0379087 -0.237236 -0.488396 0.665016 -0.564998 +0.244252 0.435358 -0.0964865 0.128596 0.561046 -0.817735 +-0.0301919 0.391741 -0.0800245 -0.312241 0.920795 -0.233758 +-0.184767 -0.496225 -0.0945987 -0.136187 -0.990616 0.0115025 +-0.300899 -0.114127 -0.20931 -0.945134 0.229066 0.232916 +-0.213749 -0.103223 -0.229124 0.981047 -0.175269 -0.0826281 +-0.301953 0.313061 -0.0903 -0.670765 0.324472 -0.666928 +-0.256587 -0.0311759 -0.185003 -0.849715 0.502758 0.158803 +-0.120568 -0.167186 -0.220795 0.14146 0.885135 -0.443312 +0.28789 0.259483 -0.0729475 0.804456 -0.321098 -0.499746 +-0.303477 -0.19228 -0.202425 -0.990743 -0.121738 0.0600625 +-0.0586806 -0.196119 -0.231402 0.42705 0.70238 -0.569465 +0.00973144 -0.274216 -0.232487 0.792674 0.284556 -0.539163 +0.0420285 -0.49182 -0.168399 0.472848 -0.760211 -0.445527 +-0.00703684 -0.391479 -0.234292 0.623674 -0.440167 -0.645975 +-0.028013 -0.425345 -0.227201 0.539364 -0.53067 -0.653816 +-0.0453357 -0.430597 -0.234992 0.411624 -0.542913 -0.731991 +0.273519 0.1795 -0.0767979 0.960216 0.0572707 -0.273322 +0.2716 0.195275 -0.080319 0.94623 0.034304 -0.32167 +0.0877232 0.259548 -0.236602 0.2815 0.385566 -0.87869 +-0.237234 0.317675 -0.118005 -0.108625 0.662565 -0.741086 +-0.209361 0.196725 -0.171564 -0.346609 0.0402541 -0.937145 +-0.256164 0.125623 -0.0705089 -0.783847 -0.594277 -0.180049 +-0.205611 0.0599581 -0.104532 -0.728012 -0.549916 0.409378 +0.156053 0.135117 -0.228908 0.502714 -0.0672639 -0.861832 +-0.0504255 0.061485 -0.232541 -0.305777 -0.42972 -0.849612 +0.106762 0.0588812 -0.235221 0.303915 -0.365719 -0.879707 +-0.212961 0.0734098 -0.0901679 -0.819209 -0.572377 0.0357897 +-0.258414 0.210417 -0.14521 -0.636025 -0.0768185 -0.767835 +0.238008 0.0188273 -0.0877193 0.777143 -0.536762 -0.328535 +-0.25946 -0.0497837 -0.237739 -0.62321 0.63939 -0.450321 +-0.284232 -0.0809891 -0.239682 -0.80841 0.493151 -0.321366 +-0.0449035 -0.0711112 -0.0790278 -0.368611 -0.86581 -0.338376 +-0.222257 -0.161285 -0.090717 -0.409349 0.894807 0.178197 +0.00900582 -0.178494 -0.0821095 0.10326 0.903758 -0.415403 +-0.240287 -0.0129489 -0.20599 -0.699592 0.655226 -0.285044 +0.0797694 -0.202932 -0.0845757 0.356412 0.441363 -0.82351 +0.0971495 -0.207738 -0.0784748 0.437594 0.342176 -0.831521 +-0.299371 -0.207881 -0.21706 -0.950156 -0.257075 -0.176399 +-0.0159365 -0.407631 -0.230662 0.586677 -0.493655 -0.641962 +-0.0631128 -0.439675 -0.236575 0.316468 -0.544395 -0.776841 +0.0545176 -0.0242935 -0.19175 0.0468691 -0.727816 -0.684169 +0.106505 -0.287295 -0.0850398 0.667681 -0.0734791 -0.740812 +0.0600911 0.299001 -0.223291 0.188429 0.522516 -0.831547 +0.0750574 0.286719 -0.226813 0.237682 0.474225 -0.847713 +0.105172 -0.319344 -0.0804788 0.717922 -0.15408 -0.678857 +0.031286 -0.424521 -0.168081 0.793782 0.320532 -0.516885 +-0.2804 -0.362543 -0.079427 -0.947387 -0.319514 -0.0192106 +-0.273036 -0.381343 -0.0848304 -0.920093 -0.389135 -0.0447511 +0.166446 -0.457592 -0.0738952 0.955832 0.260038 -0.136988 +-0.0718737 0.142056 -0.244953 -0.388943 -0.0422662 -0.920292 +0.250809 0.44789 -0.0856295 0.14992 0.624103 -0.766825 +-0.134816 0.0301371 -0.175861 0.00983938 -0.585895 -0.810327 +0.11956 -0.499102 -0.0748426 0.00761235 -0.999966 -0.00318689 +-0.034538 0.0562358 -0.235261 -0.267363 -0.450444 -0.851832 +0.0892661 0.0869832 -0.25034 0.260437 -0.259232 -0.930038 +0.0814418 0.0708368 -0.247359 0.218657 -0.326726 -0.919478 +-0.0190129 0.0579066 -0.24054 -0.226247 -0.434987 -0.87155 +0.0674089 0.0582418 -0.245471 0.150267 -0.384731 -0.910715 +0.0131518 0.0455772 -0.240894 -0.113645 -0.467181 -0.876827 +0.285741 0.423652 -0.0845605 0.556647 0.343896 -0.756227 +-0.021619 -0.39722 -0.242926 0.533851 -0.45929 -0.709969 +-0.232418 -0.0278686 -0.236007 -0.230772 0.64412 -0.729283 +-0.218156 -0.0387959 -0.242398 0.342263 0.388994 -0.855301 +0.0512086 0.404349 -0.0808301 0.00230123 0.969749 -0.244095 +-0.0711218 -0.184535 -0.225156 0.370765 0.772457 -0.5156 +-0.278586 -0.233347 -0.243373 -0.780436 -0.376088 -0.499477 +-0.105136 0.227122 -0.217678 -0.497079 0.238122 -0.834392 +-0.00136221 -0.0120492 -0.195787 -0.212205 -0.676629 -0.705083 +-0.147338 0.291619 -0.151839 -0.400886 0.626375 -0.668539 +0.299959 0.413091 -0.0771118 0.687282 0.254007 -0.680532 +-0.015655 0.284109 -0.2333 -0.184378 0.468488 -0.864016 +-0.037409 0.236442 -0.246593 -0.28696 0.258573 -0.922385 +-0.0716865 0.373761 -0.0807095 -0.416921 0.873713 -0.250603 +0.128977 0.185973 -0.241589 0.412273 0.122484 -0.902789 +0.262756 0.0714252 -0.0884332 0.904371 -0.263108 -0.335987 +-0.203973 0.0600395 -0.0817176 -0.789625 -0.612783 -0.0314646 +-0.171012 0.0228235 -0.108282 -0.612316 -0.699186 0.369063 +0.100536 -0.498644 -0.0444634 0.00968383 -0.999222 0.0382254 +-0.305259 -0.132881 -0.223075 -0.99088 0.127857 -0.0425397 +-0.14953 0.00471987 -0.105474 -0.534838 -0.843583 0.0481274 +0.0299683 -0.0929065 -0.0778841 -0.140764 -0.793636 -0.591885 +-0.305123 -0.170122 -0.22702 -0.982238 -0.104947 -0.155544 +-0.19577 -0.169237 -0.254285 0.518466 0.677233 -0.522061 +-0.111276 -0.177087 -0.235147 0.18841 0.811874 -0.552595 +-0.00498047 -0.176622 -0.0807231 0.0746195 0.962293 -0.261581 +-0.0325673 -0.218118 -0.235006 0.535334 0.612453 -0.581652 +0.00544451 0.110963 -0.262266 -0.120967 -0.17735 -0.976685 +-0.252199 -0.184383 -0.0817754 -0.670104 0.706973 0.226161 +-0.135784 -0.496397 -0.101153 0.0412059 -0.998749 0.0283157 +-0.143199 -0.496358 -0.0840057 0.0218025 -0.999389 0.0273156 +0.290224 0.403032 -0.0886166 0.608867 0.224005 -0.760988 +-0.227107 -0.362221 -0.229217 -0.671095 -0.381472 -0.635697 +0.216361 0.26498 -0.150222 0.68793 0.280982 -0.66918 +-0.0382341 -0.401201 -0.251536 0.435102 -0.467394 -0.769564 +-0.149384 -0.419199 -0.251861 -0.300125 -0.461525 -0.834817 +0.0332264 -0.498428 -0.0981994 -0.0118197 -0.999908 -0.00669255 +-0.301851 0.226476 -0.0943066 -0.867758 -0.183885 -0.461717 +0.0170463 0.272324 -0.242513 -0.0121126 0.416135 -0.909222 +0.00481785 0.285707 -0.235362 -0.0716753 0.479253 -0.874745 +-0.0616761 0.205372 -0.244416 -0.370114 0.146966 -0.917288 +-0.184127 0.0365754 -0.101599 -0.692754 -0.683485 0.230085 +-0.219183 -0.152825 -0.173181 0.0595074 0.955771 0.288028 +-0.0155081 0.071352 -0.24745 -0.20744 -0.363964 -0.908019 +0.139019 -0.0663548 -0.0817129 0.42372 -0.813413 -0.398523 +0.0506777 0.0471256 -0.242381 0.0653153 -0.439817 -0.895709 +-0.0681107 0.0144017 -0.193391 -0.346059 -0.613819 -0.709556 +-0.202746 -0.0569847 -0.229585 0.868079 -0.167167 -0.467433 +-0.208758 -0.0875667 -0.22466 0.954794 -0.248758 -0.162751 +-0.0153633 -0.378712 -0.249088 0.557015 -0.378154 -0.739415 +0.204106 0.2691 -0.160563 0.649268 0.330455 -0.685019 +-0.214181 -0.139793 -0.241269 0.947439 0.30239 -0.104497 +-0.304989 -0.151714 -0.234573 -0.976411 -0.000119247 -0.215921 +-0.237699 -0.171373 -0.0854569 -0.558022 0.801762 0.213984 +0.237615 0.0307153 -0.105062 0.786543 -0.478058 -0.39091 +-0.258117 -0.110169 -0.179049 -0.00239163 -0.0126226 0.999917 +0.0838113 -0.235925 -0.0970196 0.539425 0.279347 -0.794347 +0.0237091 0.101391 -0.261713 -0.0488873 -0.215514 -0.975276 +0.00563679 -0.354852 -0.241375 0.703282 -0.251391 -0.664979 +-0.115835 0.0253207 -0.176826 -0.300768 -0.614135 -0.729641 +0.0869234 -0.370287 -0.0968338 0.555554 0.128592 -0.821477 +0.0362957 0.26821 -0.243735 0.0882583 0.41135 -0.907194 +0.0892062 0.243487 -0.242409 0.293604 0.329485 -0.89735 +-0.0495877 0.221904 -0.246144 -0.333529 0.202239 -0.920792 +0.108042 -0.387959 -0.0832664 0.737946 0.304866 -0.602073 +-0.23501 -0.452959 -0.102389 -0.857577 -0.50724 -0.0852609 +0.125378 0.168982 -0.244703 0.403359 0.0480305 -0.91378 +0.11381 0.156246 -0.249925 0.369844 0.012925 -0.929004 +0.165654 -0.478709 -0.0813954 0.911988 -0.319714 -0.257022 +0.157217 -0.483757 -0.0976799 0.747725 -0.444255 -0.493503 +-0.0282244 0.0822375 -0.248423 -0.244863 -0.315733 -0.916709 +0.150211 0.277169 -0.198432 0.477538 0.435445 -0.763115 +-0.0113449 0.0880089 -0.254149 -0.184841 -0.277238 -0.942854 +0.217438 0.425774 -0.103129 -0.0995279 0.552261 -0.827709 +0.0307139 0.0539667 -0.246167 -0.0182684 -0.417929 -0.908296 +-0.231105 -0.0444707 -0.249662 0.0776312 0.525099 -0.847493 +0.281393 0.358345 -0.103798 0.600714 0.0504519 -0.797871 +-0.260134 -0.0626539 -0.25315 -0.507592 0.613122 -0.605335 +-0.209504 -0.0720314 -0.237929 0.893071 -0.117237 -0.434373 +0.29269 0.367376 -0.0933284 0.685186 0.0666447 -0.725313 +-0.225981 0.339528 -0.0925028 0.0801837 0.839327 -0.537681 +-0.307252 0.258453 -0.0925288 -0.855898 -0.0459205 -0.515101 +0.261085 0.225352 -0.100597 0.874627 0.0151112 -0.484562 +-0.0922808 -0.180217 -0.231351 0.281656 0.796857 -0.534499 +-0.0775018 -0.205239 -0.25305 0.327534 0.644765 -0.690651 +-0.060417 -0.206253 -0.244126 0.418647 0.651076 -0.633115 +-0.0339319 -0.233611 -0.250455 0.518382 0.537186 -0.665366 +-0.0310839 -0.25369 -0.262473 0.526856 0.41762 -0.740281 +-0.0152395 -0.267299 -0.256838 0.620239 0.321958 -0.715295 +0.269044 0.213103 -0.0854603 0.916559 0.000889406 -0.399898 +0.00769063 -0.334926 -0.244701 0.720053 -0.125035 -0.682562 +0.26628 0.179052 -0.0987148 0.929488 0.0751819 -0.36111 +0.274089 0.131659 -0.0799395 0.956426 -0.0209136 -0.291223 +-0.125752 -0.0164009 -0.0903096 -0.609185 -0.769007 -0.193706 +0.0477383 -0.200191 -0.0954774 0.355018 0.637684 -0.683609 +0.15869 0.0257365 -0.192802 0.492173 -0.495526 -0.715695 +0.0356544 0.236674 -0.255673 0.0626548 0.290074 -0.954951 +-0.00626972 -0.117444 -0.0338151 -0.636776 -0.442114 -0.631705 +0.239767 0.196643 0.148327 0.714046 0.159674 0.681647 +-0.0279278 0.221652 -0.25286 -0.246163 0.196601 -0.949079 +-0.0429471 0.209703 -0.250666 -0.30645 0.153362 -0.939451 +-0.293147 -0.26728 -0.0959309 -0.992581 0.0868467 0.0850945 +0.100163 -0.305571 -0.088256 0.679193 -0.128468 -0.722629 +0.088277 -0.316439 -0.0971558 0.656403 -0.124921 -0.743996 +-0.0287308 0.0974802 -0.252778 -0.24181 -0.235622 -0.941281 +0.0468343 0.0658407 -0.250911 0.0581968 -0.363651 -0.929716 +0.0552714 0.0943401 -0.259435 0.111276 -0.247151 -0.962566 +0.109916 -0.49891 -0.0911178 0.00970366 -0.996834 -0.0789188 +0.165387 0.417421 -0.0876574 -0.434241 0.724414 -0.535406 +0.275217 0.394891 -0.101547 0.517843 0.219464 -0.826846 +0.267507 0.35485 -0.113176 0.499167 0.0542196 -0.864808 +-0.109124 0.348566 -0.0992922 -0.463355 0.827232 -0.317788 +-0.110996 0.353689 -0.0804652 -0.45854 0.849355 -0.261414 +-0.21007 0.333938 -0.0981963 0.10835 0.840777 -0.530428 +-0.298842 -0.18606 -0.239957 -0.911563 -0.223984 -0.344795 +-0.162615 -0.181097 -0.251942 0.168566 0.761944 -0.625321 +-0.0167584 -0.286036 -0.264147 0.597751 0.164608 -0.7846 +-0.0521681 -0.0310844 -0.150328 -0.328935 -0.778875 -0.534 +0.290782 0.32814 -0.0935126 0.716672 -0.109208 -0.688807 +-0.213025 -0.357147 -0.244809 -0.587538 -0.363019 -0.723199 +-0.225056 -0.321277 -0.252532 -0.581979 -0.339869 -0.738776 +0.279822 0.317712 -0.102296 0.649346 -0.120426 -0.750897 +-0.0818413 -0.440077 -0.242733 0.208328 -0.540538 -0.815119 +-0.00073257 0.239714 -0.253761 -0.113603 0.281747 -0.95274 +-0.0280733 0.203343 -0.255997 -0.251542 0.131751 -0.958837 +0.100923 0.188847 -0.252336 0.322475 0.128845 -0.937768 +-0.304497 0.279064 -0.0959299 -0.801562 0.0664611 -0.594206 +-0.197986 0.0239316 -0.202491 -0.227906 0.452661 -0.862066 +-0.0618367 -0.494433 -0.192286 0.135347 -0.911071 -0.389398 +0.176444 0.0308861 -0.182789 0.56092 -0.463485 -0.685966 +0.28046 0.0803478 -0.011557 0.976821 -0.203428 -0.0666177 +0.00610608 0.0945958 -0.258638 -0.119117 -0.247408 -0.961562 +-0.161387 0.0501831 -0.194085 0.368918 -0.00775719 -0.929429 +0.0303343 0.0718386 -0.253512 -0.0219428 -0.342143 -0.939392 +0.0895309 -0.0833344 -0.0863518 0.220864 -0.803987 -0.552109 +-0.213682 -0.0892658 -0.242255 0.927258 -0.10642 -0.358981 +-0.216552 -0.106555 -0.246635 0.950854 -0.0348504 -0.307672 +-0.0291027 -0.0659943 -0.104151 -0.29103 -0.861271 -0.41655 +-0.127655 0.059609 -0.193848 -0.340309 -0.381852 -0.85929 +-0.239624 0.0960464 -0.191346 -0.772136 0.242348 -0.58743 +0.0377173 -0.0824907 -0.0961096 -0.0436929 -0.865278 -0.499384 +-0.181172 -0.181235 -0.259332 0.313049 0.691323 -0.651209 +-0.168383 -0.193158 -0.266234 0.182103 0.626301 -0.758014 +-0.244936 -0.0249175 -0.220795 -0.620267 0.673482 -0.402109 +-0.0677266 -0.219372 -0.260356 0.365733 0.577276 -0.730063 +-0.150939 0.0395872 -0.18411 0.414719 -0.283678 -0.864601 +0.091677 -0.295011 -0.0975245 0.658363 -0.0738902 -0.749065 +-0.289042 -0.32096 -0.115508 -0.975051 -0.200483 -0.095303 +-0.0545046 -0.399184 -0.26038 0.323972 -0.462226 -0.825463 +0.0529345 -0.00703447 -0.207714 0.0363578 -0.641903 -0.765923 +-0.0961747 -0.415297 -0.260933 0.0743735 -0.505191 -0.859797 +-0.218494 0.161526 -0.165186 -0.506062 -0.128547 -0.852864 +-0.291554 -0.311408 -0.101664 -0.989252 -0.142773 -0.0315687 +-0.281394 -0.355699 -0.101105 -0.946431 -0.306546 -0.101479 +0.0747717 -0.359069 -0.103264 0.568352 0.00919324 -0.822734 +-0.0112346 0.209264 -0.258827 -0.180494 0.159958 -0.970482 +0.0255953 0.216825 -0.261201 0.000281267 0.206653 -0.978414 +0.00758725 0.210637 -0.261364 -0.0981973 0.174651 -0.979722 +0.053219 0.414168 -0.0273102 -0.018126 0.995194 -0.0962311 +-0.0142305 0.192656 -0.260604 -0.200695 0.105083 -0.974002 +-0.00516554 -0.497689 -0.0938022 -0.0582342 -0.997985 0.0252008 +0.0111662 0.178852 -0.266122 -0.0908466 0.0746211 -0.993065 +0.237317 0.421761 -0.105415 0.0930784 0.470919 -0.877252 +0.0788704 0.39267 -0.110765 0.0996049 0.917246 -0.385667 +-0.0270221 0.148881 -0.259643 -0.23459 -0.0217055 -0.971852 +0.00501993 0.130979 -0.264826 -0.126751 -0.0865723 -0.98815 +-0.222372 0.326761 -0.109234 0.0122134 0.764001 -0.6451 +0.263142 0.262856 -0.104703 0.704895 -0.161348 -0.690717 +0.0610168 0.114386 -0.262931 0.141698 -0.151235 -0.978289 +0.26348 0.243451 -0.0993911 0.804176 -0.132071 -0.579533 +-0.245342 -0.0852065 -0.272642 0.191958 0.362896 -0.911844 +0.224706 0.160198 -0.173494 0.770303 0.0291156 -0.637014 +-0.229167 -0.0612821 -0.257104 0.364912 0.360743 -0.858315 +-0.218699 -0.0742248 -0.251727 0.754526 0.0677148 -0.652767 +-0.285548 -0.096135 -0.254226 -0.776103 0.416971 -0.473074 +-0.221588 -0.0933563 -0.256784 0.795914 0.0396344 -0.604111 +-0.300796 -0.130508 -0.24377 -0.942657 0.128562 -0.308008 +-0.29931 -0.148416 -0.251443 -0.917474 0.00813189 -0.397711 +-0.260648 0.149324 -0.112677 -0.796557 -0.473233 -0.376227 +-0.150711 -0.19172 -0.261431 0.136276 0.681503 -0.719015 +-0.268296 -0.218743 -0.0508903 -0.807374 0.494299 0.322205 +-0.0504076 -0.256277 -0.274962 0.392793 0.370497 -0.841692 +-0.259279 -0.269622 -0.245507 -0.713841 -0.343128 -0.610486 +-0.0319276 -0.270777 -0.270742 0.506176 0.26579 -0.820452 +0.266374 0.109637 -0.0976664 0.923604 -0.0953401 -0.371302 +-0.21077 -0.329711 -0.258902 -0.510137 -0.342708 -0.788867 +-0.197753 0.0441089 -0.109257 -0.601844 -0.539285 0.58903 +-0.187995 -0.347028 -0.265782 -0.457963 -0.304453 -0.835211 +0.0284049 -0.196072 -0.103082 0.396318 0.73616 -0.548635 +0.0964149 -0.417769 -0.106677 0.348177 0.464869 -0.814045 +0.0823239 -0.401361 -0.10571 0.488574 0.31396 -0.814079 +0.210136 0.0623838 -0.168165 0.703102 -0.300218 -0.644605 +-0.257218 -0.411373 -0.103273 -0.885849 -0.452795 -0.101235 +0.15144 -0.45702 -0.105768 0.698941 0.240056 -0.673687 +-0.0367582 -0.496401 -0.114245 -0.027457 -0.998887 0.0383528 +0.0260373 -0.498555 -0.0797938 -0.0172643 -0.999808 -0.00927176 +0.0239411 0.140611 -0.267242 -0.0439021 -0.0501538 -0.997776 +0.0605504 0.1518 -0.265591 0.155612 0.0113377 -0.987753 +0.0642492 0.135488 -0.264423 0.168245 -0.0584582 -0.98401 +0.0180022 0.120678 -0.26497 -0.0677788 -0.136332 -0.988342 +0.0309583 0.403372 -0.081777 -0.0662537 0.968563 -0.239784 +-0.259997 -0.0770641 -0.266116 -0.381277 0.535992 -0.75322 +-0.208828 -0.153687 -0.252956 0.765727 0.534019 -0.358449 +0.159392 0.313096 0.167521 0.496949 0.547602 0.673181 +-0.212146 -0.165631 -0.269068 0.624695 0.445951 -0.641002 +-0.198206 -0.180625 -0.268924 0.453614 0.536219 -0.711831 +0.259278 0.389403 -0.111162 0.393078 0.235188 -0.888918 +-0.25887 0.333983 -0.0987481 -0.14913 0.715511 -0.682498 +-0.0340443 0.360734 -0.153255 -0.322729 0.816017 -0.479544 +-0.155953 -0.400122 -0.259474 -0.335112 -0.426462 -0.840137 +-0.0574091 -0.382208 -0.26993 0.302307 -0.380977 -0.873766 +-0.218153 0.0571421 -0.117925 -0.687757 -0.424326 0.589014 +-0.233016 -0.0977444 -0.268395 0.615581 0.149596 -0.773745 +0.214082 -0.0210068 -0.0633818 0.68808 -0.68364 -0.243275 +-0.217378 -0.123869 -0.2494 0.956572 0.0793531 -0.280486 +0.146077 -0.0478258 -0.113443 0.40295 -0.819601 -0.407289 +-0.042285 0.365086 -0.139185 -0.359273 0.833264 -0.420232 +-0.280328 -0.20244 -0.261944 -0.723783 -0.330578 -0.605687 +-0.247249 -0.243294 -0.27041 -0.535771 -0.352105 -0.767445 +-0.287406 -0.2363 -0.0973168 -0.94896 0.288479 0.127495 +-0.0655758 -0.264824 -0.284034 0.301306 0.285388 -0.909818 +-0.29421 -0.282222 -0.109612 -0.99954 -0.0295747 0.00671364 +-0.0498455 -0.275825 -0.281195 0.382884 0.202429 -0.901345 +-0.232025 -0.257558 -0.274195 -0.452333 -0.302971 -0.838811 +-0.267758 -0.380965 -0.127847 -0.904968 -0.387304 -0.176151 +-0.274232 -0.368918 -0.118506 -0.924954 -0.349078 -0.15035 +-0.0213615 -0.30284 -0.269497 0.543804 0.0397107 -0.838272 +-0.0307846 -0.31908 -0.274693 0.476712 -0.0644014 -0.876697 +-0.249212 -0.427676 -0.0977066 -0.880139 -0.469502 -0.0701643 +-0.142962 -0.389866 -0.268966 -0.24893 -0.393038 -0.885187 +-0.106278 -0.387696 -0.27555 -0.0172856 -0.395293 -0.918392 +0.0931388 -0.38745 -0.0965826 0.546475 0.225008 -0.806682 +-0.232483 -0.453102 -0.120639 -0.855632 -0.496117 -0.14752 +0.0867378 0.359181 -0.162114 0.23393 0.748042 -0.621055 +-0.224592 -0.115823 -0.262099 0.810809 0.106102 -0.575614 +-0.218906 -0.137842 -0.259727 0.868872 0.250594 -0.426923 +0.233554 0.397876 -0.116561 0.151904 0.350946 -0.923992 +0.0012531 0.395928 -0.0956695 -0.184539 0.942112 -0.279946 +-0.047514 0.375657 -0.109284 -0.375311 0.868703 -0.323259 +-0.286723 -0.172994 -0.267516 -0.753482 -0.200321 -0.626209 +-0.184872 -0.197929 -0.274309 0.263717 0.47131 -0.841618 +-0.0771308 0.366281 -0.0967541 -0.420877 0.859747 -0.289306 +-0.135108 0.33396 -0.099395 -0.386222 0.845979 -0.36763 +0.214312 0.0925746 -0.174692 0.726462 -0.186643 -0.661375 +-0.119037 -0.214016 -0.273031 0.154614 0.540991 -0.826694 +-0.256835 0.320506 -0.111273 -0.222792 0.617478 -0.754377 +-0.22345 -0.274986 -0.272366 -0.45374 -0.294049 -0.841223 +-0.210641 -0.313426 -0.266231 -0.480082 -0.31742 -0.817781 +-0.00147066 -0.497876 -0.149778 -0.0194023 -0.99981 -0.00180978 +0.251156 0.293942 -0.119568 0.558729 -0.0861684 -0.824862 +-0.281058 0.201484 -0.118284 -0.796141 -0.244166 -0.553664 +-0.0687281 -0.372944 -0.276998 0.227427 -0.338473 -0.913079 +-0.0716168 -0.392303 -0.269384 0.218284 -0.430406 -0.875844 +-0.0897904 -0.396827 -0.270499 0.0970827 -0.442959 -0.89127 +0.231354 0.0701184 -0.145506 0.787881 -0.257294 -0.559502 +-0.247767 -0.105138 -0.279934 0.291459 0.261961 -0.920015 +-0.156316 0.107358 -0.193358 -0.336226 -0.0431411 -0.940793 +0.0425175 0.399709 -0.0975314 -0.0104665 0.953481 -0.301272 +-0.279752 -0.106172 -0.269045 -0.662786 0.350529 -0.661698 +-0.124016 -0.398469 -0.269046 -0.130285 -0.432244 -0.892295 +-0.202583 -0.194823 -0.279386 0.352282 0.354847 -0.866014 +-0.217576 -0.181364 -0.281423 0.431739 0.305427 -0.848714 +-0.275413 -0.188221 -0.274208 -0.644582 -0.272734 -0.714234 +0.07011 -0.282027 -0.116663 0.627963 -0.0296797 -0.777677 +-0.22969 -0.237993 -0.281849 -0.309849 -0.258154 -0.915068 +-0.101509 -0.227437 -0.277216 0.197859 0.47595 -0.856927 +0.0782909 -0.299312 -0.10844 0.628376 -0.0975346 -0.771771 +-0.0350809 -0.288698 -0.27616 0.469342 0.115945 -0.875371 +0.0729045 -0.31561 -0.109844 0.649866 -0.108773 -0.752226 +-0.182305 -0.330597 -0.27409 -0.409686 -0.261675 -0.87389 +0.100407 -0.0312775 -0.171539 0.260453 -0.770317 -0.582044 +0.205396 0.129153 -0.191725 0.689067 -0.101959 -0.717489 +-0.20684 -0.487158 -0.128359 -0.631484 -0.768718 -0.10149 +-0.124731 -0.379933 -0.276988 -0.139321 -0.353241 -0.9251 +-0.0867628 -0.380264 -0.277552 0.111756 -0.368251 -0.922985 +0.0644007 -0.391049 -0.116013 0.461128 0.174095 -0.870087 +-0.265207 -0.114549 -0.28308 -0.257323 0.27224 -0.927184 +-0.281185 -0.122132 -0.274685 -0.655093 0.210031 -0.725769 +-0.279482 -0.140577 -0.279753 -0.619361 0.0538454 -0.783258 +-0.231465 -0.134354 -0.275171 0.678246 0.199192 -0.707322 +-0.241502 -0.148222 -0.285764 0.360486 0.161187 -0.918732 +-0.170106 0.137929 -0.188124 -0.40168 0.0188643 -0.915586 +0.128194 -0.43033 -0.10426 0.41257 0.637669 -0.650511 +-0.213645 -0.482213 -0.113426 -0.714135 -0.696332 -0.0716439 +-0.218334 -0.201104 -0.286758 0.21273 0.135724 -0.967639 +0.0601974 0.39558 -0.107837 0.06121 0.932719 -0.355372 +-0.292451 -0.132028 -0.262846 -0.843871 0.110149 -0.525117 +0.264516 0.339644 -0.115209 0.511848 -0.0065591 -0.859051 +0.0250082 0.285955 -0.235778 0.035811 0.478598 -0.877304 +-0.180075 -0.220115 -0.282361 0.110322 0.297092 -0.948454 +-0.163528 0.322767 -0.107313 -0.0452806 0.863979 -0.501489 +-0.231455 -0.211489 -0.287668 -0.120868 -0.13936 -0.982838 +-0.241918 0.128966 -0.129277 -0.93476 -0.222061 -0.277331 +0.249084 0.0638799 -0.113607 0.84574 -0.292491 -0.446288 +-0.18785 -0.272013 -0.285661 -0.226531 -0.12111 -0.966445 +0.0154298 -0.0687363 -0.118214 -0.114717 -0.88333 -0.454497 +-0.167932 -0.32379 -0.282046 -0.332564 -0.227855 -0.915141 +-0.152838 -0.340607 -0.282778 -0.275875 -0.248253 -0.928582 +-0.247852 -0.17279 -0.116203 -0.611709 0.777102 0.14807 +-0.260626 -0.185526 -0.1123 -0.726914 0.67038 0.148951 +-0.246227 -0.127125 -0.284448 0.350253 0.188506 -0.91749 +0.0388802 -0.20815 -0.10981 0.474892 0.64555 -0.598116 +0.053724 -0.216248 -0.106392 0.470024 0.554944 -0.686378 +-0.261095 -0.15339 -0.288887 -0.223529 0.0120635 -0.974623 +0.0713658 -0.262352 -0.114558 0.634961 0.122132 -0.762829 +0.136149 -0.460617 -0.117664 0.437878 0.16214 -0.884293 +-0.246984 -0.168988 -0.28969 0.0299652 0.0191089 -0.999368 +-0.255655 -0.187851 -0.286754 -0.332995 -0.193332 -0.922896 +0.11297 -0.483258 -0.121454 0.0994685 -0.435908 -0.894478 +-0.23575 -0.187139 -0.289007 0.0964498 0.0205327 -0.995126 +-0.162531 -0.147109 -0.176089 -0.0363015 0.952393 -0.302703 +0.0942283 -0.484826 -0.122598 0.236461 -0.524551 -0.817883 +-0.0873662 -0.495758 -0.119403 -0.0109027 -0.999872 0.0117128 +0.0711756 -0.49816 -0.103372 0.0476508 -0.992391 -0.113533 +-0.198162 -0.212799 -0.283959 0.208618 0.221781 -0.952519 +-0.111452 -0.241735 -0.285888 0.119227 0.352137 -0.928324 +-0.194735 -0.233584 -0.286603 0.017895 0.069424 -0.997427 +-0.212804 -0.246755 -0.284344 -0.199167 -0.166756 -0.965673 +-0.157406 -0.242754 -0.287717 -0.0136895 0.226189 -0.973987 +-0.171006 -0.259245 -0.289159 -0.114892 0.040973 -0.992533 +0.0399516 -0.498554 -0.117386 0.0128385 -0.999745 -0.0185895 +-0.0552237 -0.295277 -0.285944 0.344389 0.061393 -0.936818 +0.25065 0.352396 -0.122025 0.404349 0.0865082 -0.910504 +0.237812 0.364473 -0.124727 0.290091 0.183827 -0.939178 +-0.16527 0.171796 -0.190856 -0.468104 0.0474944 -0.882396 +-0.137709 -0.351061 -0.283824 -0.210912 -0.266852 -0.940375 +-0.14856 -0.00181674 -0.0675809 -0.65573 -0.742113 -0.138879 +-0.288369 0.253369 -0.117618 -0.741067 0.0285842 -0.670822 +-0.0997134 -0.2769 -0.294098 0.0832341 0.140496 -0.986576 +-0.184118 0.215059 -0.176885 -0.291276 0.192034 -0.937167 +0.243473 0.0875315 -0.134779 0.827357 -0.194491 -0.526929 +0.0558876 -0.0815689 -0.0975084 0.0262172 -0.855653 -0.516886 +-0.139468 -0.309498 -0.292448 -0.169101 -0.126835 -0.977404 +-0.108784 -0.297463 -0.29561 0.0086587 0.00269011 -0.999959 +-0.0803712 -0.323405 -0.291811 0.16662 -0.121718 -0.97848 +-0.235374 -0.166359 -0.102395 -0.516861 0.844007 0.143205 +-0.1006 -0.329798 -0.292657 0.0272822 -0.170402 -0.984997 +-0.270974 -0.195619 -0.124668 -0.797041 0.575016 0.184611 +-0.127487 -0.297051 -0.294914 -0.0793647 -0.0294045 -0.996412 +-0.1176 -0.277661 -0.294735 0.00436526 0.103832 -0.994585 +-0.117318 -0.316463 -0.294106 -0.0657502 -0.118824 -0.990736 +-0.294203 -0.267124 -0.112238 -0.998031 0.0528748 0.0337302 +-0.294101 -0.272722 -0.127227 -0.999229 -0.0206264 -0.033398 +-0.289758 -0.222544 -0.231633 -0.868371 -0.342415 -0.358725 +-0.238362 -0.438796 -0.130712 -0.8627 -0.46287 -0.203716 +-0.0150392 0.379656 -0.129165 -0.257706 0.884402 -0.389128 +-0.118911 -0.198899 -0.261619 0.173818 0.648179 -0.741385 +-0.0513549 0.368221 -0.12339 -0.38915 0.845895 -0.364724 +-0.271536 0.251527 -0.0248697 0.0977536 0.0829868 0.991745 +0.202934 0.382778 -0.124617 -0.00524028 0.387562 -0.921829 +0.169718 0.374789 -0.12656 -0.0447466 0.523911 -0.850597 +0.188391 0.37314 -0.128511 -0.0189136 0.419509 -0.907554 +0.127634 0.375972 -0.126587 0.109314 0.766776 -0.632539 +-0.134022 -0.328685 -0.290067 -0.177222 -0.198133 -0.964021 +-0.185309 0.313172 -0.122433 0.0611296 0.760328 -0.646656 +-0.164502 -0.303306 -0.287543 -0.267849 -0.160263 -0.950038 +-0.0881881 -0.289531 -0.294189 0.144859 0.0735878 -0.986712 +-0.280477 -0.257392 -0.220212 -0.86095 -0.327883 -0.388919 +-0.230179 0.0466301 -0.150113 -0.82576 -0.508541 0.243941 +-0.0230532 -0.497411 -0.154211 -0.0191322 -0.999811 0.00351903 +-0.058139 -0.0479061 -0.117893 -0.367803 -0.828012 -0.423222 +-0.0319208 -0.0473763 -0.137099 -0.281434 -0.825273 -0.489612 +-0.169938 -0.282099 -0.288795 -0.213976 -0.0772894 -0.973776 +-0.29351 -0.254032 -0.123572 -0.992629 0.116144 0.0346264 +-0.149567 -0.291722 -0.292227 -0.166483 -0.0551109 -0.984503 +-0.148632 -0.476271 -0.217837 -0.313588 -0.604902 -0.731954 +-0.103978 -0.21063 -0.267258 0.220222 0.591124 -0.775935 +-0.158626 0.19085 -0.192331 -0.482792 0.132935 -0.865587 +-0.146177 -0.463289 -0.227261 -0.270658 -0.512737 -0.814767 +-0.133631 -0.243054 -0.287971 0.0287523 0.295987 -0.954759 +-0.0909833 0.364014 -0.0816181 -0.440605 0.860463 -0.255874 +0.0871583 -0.496912 -0.109102 0.102351 -0.935738 -0.337519 +0.054094 0.38319 -0.136365 0.0739433 0.878701 -0.471612 +-0.102235 -0.350511 -0.288204 0.00579617 -0.255876 -0.966692 +0.220882 0.354159 -0.131311 0.218024 0.193327 -0.956604 +0.220222 0.334133 -0.134619 0.288982 0.123931 -0.949279 +0.235589 0.3034 -0.129638 0.48053 -0.00575208 -0.876959 +-0.215712 0.299567 -0.135202 -0.0865143 0.59213 -0.801185 +-0.0611434 -0.315724 -0.287819 0.298642 -0.0618191 -0.952361 +-0.111828 -0.00815511 -0.1383 -0.468623 -0.774289 -0.425288 +0.180902 -0.00661938 -0.143194 0.562067 -0.647408 -0.514727 +0.00534731 -0.197509 -0.131511 0.556803 0.761299 -0.332257 +-0.278094 -0.209033 -0.115717 -0.865282 0.483231 0.133319 +-0.183895 -0.29288 -0.283405 -0.303674 -0.188307 -0.933982 +-0.270922 -0.253256 -0.240353 -0.766461 -0.362827 -0.529994 +-0.00771149 0.388087 -0.113339 -0.225687 0.913369 -0.338855 +-0.0741566 0.355228 -0.127757 -0.418036 0.819611 -0.39177 +0.185151 0.357737 -0.13522 0.0819075 0.374877 -0.923449 +0.164542 0.361304 -0.134915 0.0923324 0.522351 -0.847717 +-0.0845053 -0.264587 -0.28922 0.202918 0.25725 -0.9448 +-0.115518 0.332019 -0.127174 -0.4788 0.774741 -0.412949 +-0.0697572 -0.282249 -0.289213 0.267692 0.141359 -0.953079 +0.312178 0.348491 -0.0686453 0.870448 -0.0684971 -0.487471 +-0.0622733 0.342338 -0.161515 -0.394863 0.760157 -0.515988 +-0.158214 0.30153 -0.135857 -0.233725 0.713391 -0.660641 +-0.179014 0.300765 -0.134536 -0.0167045 0.680477 -0.732579 +-0.233026 0.286726 -0.140652 -0.213123 0.477123 -0.852603 +0.245234 0.160024 -0.142964 0.851324 0.0241615 -0.524083 +-0.0769631 0.336084 -0.15938 -0.419379 0.750317 -0.511024 +-0.228268 0.0551236 -0.134192 -0.717149 -0.504922 0.480366 +-0.231354 0.0698775 -0.124825 -0.69244 -0.421415 0.585607 +-0.242629 -0.422796 -0.145953 -0.848692 -0.454459 -0.270536 +-0.11504 0.214434 -0.215069 -0.511577 0.207617 -0.833777 +0.0887611 0.405035 -0.0719635 0.0426247 0.964777 -0.259592 +-0.0978873 -0.016479 -0.138457 -0.448901 -0.774301 -0.446033 +-0.184688 0.0327187 -0.0356613 -0.79426 -0.607506 -0.00934734 +-0.0827126 -0.028361 -0.13235 -0.411252 -0.794831 -0.446224 +-0.211497 0.17737 -0.170562 -0.409597 -0.0557794 -0.91056 +-0.104761 0.361138 -0.0664613 -0.454712 0.862493 -0.222132 +-0.0866214 -0.497796 -0.168696 0.0113871 -0.999886 -0.00987392 +-0.191961 0.0587106 0.03681 -0.881029 -0.429389 0.198525 +-0.274103 -0.221027 -0.258199 -0.700174 -0.371491 -0.609714 +-0.229472 -0.16608 -0.283847 0.465966 0.221766 -0.85656 +0.0891783 -0.060057 -0.130196 0.194164 -0.867788 -0.457432 +0.0185907 -0.0604675 -0.135201 -0.110872 -0.875028 -0.471204 +0.0461251 -0.07361 -0.11275 -0.00215244 -0.885093 -0.465409 +-0.227934 -0.157094 -0.137252 -0.407817 0.908121 0.0948739 +-0.2336 -0.16281 -0.119912 -0.491509 0.859457 0.140544 +-0.0387431 -0.173822 -0.125068 0.365142 0.927237 -0.0830784 +-0.26714 -0.17272 -0.284933 -0.459576 -0.15919 -0.873755 +0.0448823 -0.241901 -0.131187 0.660239 0.343508 -0.667898 +-0.120756 0.254346 -0.197376 -0.534248 0.369603 -0.760245 +0.0367133 -0.400147 -0.149826 0.939677 -0.0536288 -0.337833 +0.0420181 -0.383009 -0.139633 0.962855 -0.0907331 -0.254316 +-0.218867 -0.462269 -0.153421 -0.813901 -0.484058 -0.321329 +-0.224103 -0.462355 -0.135823 -0.840917 -0.501838 -0.202527 +0.139173 0.349061 -0.15051 0.286763 0.636832 -0.715689 +0.0970017 -0.136882 0.142975 0.447634 0.379552 0.809669 +0.133451 0.365342 -0.136863 0.185607 0.690299 -0.699312 +0.148849 0.3606 -0.137456 0.170468 0.61181 -0.772418 +-0.262085 -0.13415 -0.287566 -0.177289 0.132561 -0.97519 +-0.0869596 -0.217401 -0.26684 0.272214 0.567779 -0.776869 +0.155977 0.345306 -0.146643 0.268505 0.549915 -0.790884 +0.21959 0.312864 -0.136988 0.402018 0.0992871 -0.910233 +0.205162 0.323581 -0.140549 0.309468 0.209834 -0.927469 +0.219441 0.293998 -0.13901 0.529106 0.1332 -0.838036 +-0.226577 0.270261 -0.150373 -0.230629 0.387375 -0.892609 +-0.237395 0.253834 -0.152654 -0.346924 0.256931 -0.902014 +0.00100093 -0.0819675 -0.0870828 -0.202013 -0.882198 -0.425344 +0.227764 0.242174 -0.147421 0.756123 0.255685 -0.602415 +0.0806066 0.399985 -0.0907462 0.0695903 0.946381 -0.315467 +-0.293641 -0.198263 -0.169302 -0.887826 0.180928 0.423119 +-0.258566 0.17931 -0.137672 -0.726623 -0.259444 -0.636166 +0.0448892 0.222369 -0.258828 0.102923 0.237016 -0.966038 +-0.198301 0.0505386 -0.0366951 -0.780922 -0.624358 0.0184025 +-0.182237 -0.311627 -0.279461 -0.364635 -0.238565 -0.900071 +-0.167323 0.00963465 -0.0192124 -0.767111 -0.639452 -0.0513894 +-0.144389 -0.0161065 -0.0124951 -0.699168 -0.708613 -0.095034 +-0.0534191 -0.175404 -0.184224 0.437573 0.867406 -0.236932 +-0.258852 -0.173744 -0.145435 -0.568634 0.727297 0.384309 +-0.0407671 0.398456 0.0171537 -0.323047 0.945015 0.0508593 +-0.289903 -0.295828 -0.145736 -0.973482 -0.176307 -0.145772 +-0.148528 -0.49713 -0.17455 -0.0587939 -0.993898 -0.0933313 +0.0387571 -0.497084 -0.149657 0.172917 -0.97534 -0.137153 +-0.181764 -0.495856 -0.146578 -0.220763 -0.970846 -0.0933951 +-0.191311 -0.252849 -0.286822 -0.127653 -0.0498414 -0.990566 +0.0131525 -0.0918221 -0.0735422 -0.235397 -0.811117 -0.535422 +-0.16054 -0.22392 -0.282377 0.0644852 0.355277 -0.932534 +-0.175513 -0.23938 -0.28712 -0.00175494 0.161758 -0.986829 +-0.143078 -0.229726 -0.283573 0.0450923 0.357839 -0.932694 +-0.12186 -0.227772 -0.281267 0.108358 0.423358 -0.899459 +0.0730992 0.37749 -0.141375 0.144414 0.838887 -0.524798 +-0.0233701 0.370621 -0.142585 -0.288849 0.849481 -0.441529 +0.111494 0.36854 -0.140525 0.222902 0.756101 -0.615326 +-0.198617 0.22043 0.0478051 -0.963281 0.23508 0.129717 +-0.185168 0.285283 -0.147094 -0.0662109 0.575315 -0.815248 +0.208135 -0.0361227 0.056778 0.670586 -0.730096 0.131434 +-0.271129 0.225813 -0.135189 -0.678013 -0.043717 -0.733748 +-0.151011 -0.153471 -0.192435 0.022176 0.93968 -0.341335 +0.236581 0.20755 -0.148059 0.815297 0.168867 -0.553872 +-0.248617 -0.204759 -0.285118 -0.343811 -0.245058 -0.906499 +0.2446 0.1972 -0.138486 0.849782 0.131711 -0.510415 +0.203392 0.0155235 -0.142901 0.65684 -0.554026 -0.511484 +0.272681 0.152929 0.0957891 0.947198 0.0852585 0.309107 +0.0816032 0.378903 0.130482 0.123575 0.851019 0.510389 +-0.291361 -0.237963 -0.132709 -0.974328 0.204765 0.0935759 +-0.104261 -0.370183 -0.282217 -0.0106608 -0.32257 -0.946485 +-0.111073 -0.497116 -0.143117 0.017877 -0.999101 0.0384471 +0.037087 -0.315238 -0.150768 0.974504 0.108071 -0.19663 +-0.295371 -0.139408 -0.190229 -0.736098 0.136808 0.662905 +-0.279126 -0.336058 -0.149082 -0.932458 -0.288004 -0.21812 +-0.270959 -0.366085 -0.140263 -0.912615 -0.347027 -0.216116 +0.0486054 -0.424015 -0.139104 0.733848 0.46322 -0.496885 +0.072949 0.367481 -0.156176 0.173264 0.795377 -0.580822 +-0.0685217 0.348613 -0.146167 -0.411924 0.793014 -0.448828 +-0.166812 0.290032 -0.145188 -0.177755 0.638186 -0.74908 +-0.256277 0.258336 -0.142767 -0.476558 0.211471 -0.85333 +-0.15729 -0.361866 -0.274802 -0.321182 -0.303446 -0.897086 +0.211886 0.249137 -0.162655 0.687861 0.307092 -0.657679 +-0.245488 0.181068 -0.150826 -0.61537 -0.181913 -0.76696 +-0.0474244 -0.328494 -0.281657 0.378574 -0.117726 -0.918054 +-0.0419044 -0.30719 -0.280802 0.418649 -0.00402671 -0.908139 +-0.235884 0.149107 -0.148128 -0.710028 -0.199986 -0.675178 +-0.248153 0.165871 -0.143223 -0.687682 -0.29201 -0.664698 +0.236136 0.148566 -0.157168 0.826166 -0.0194044 -0.563092 +-0.209483 -0.0833379 -0.191173 0.761338 -0.500038 0.412707 +0.0197742 -0.222989 -0.148981 0.752626 0.484531 -0.445851 +-0.209604 -0.264275 -0.281413 -0.29556 -0.207175 -0.93259 +-0.277215 -0.316785 -0.177678 -0.910829 -0.282582 -0.300896 +0.0672529 -0.472464 -0.145536 0.805364 -0.0145049 -0.592604 +-0.177273 -0.49469 -0.164049 -0.277797 -0.941424 -0.19118 +-0.0819024 -0.231373 -0.274237 0.27431 0.480083 -0.833231 +0.102426 0.360459 -0.154372 0.26313 0.736089 -0.623647 +-0.0928081 -0.244072 -0.283421 0.201042 0.381765 -0.90213 +0.0907608 0.37132 -0.145044 0.204398 0.794567 -0.571738 +0.162419 0.328937 -0.154932 0.380996 0.503203 -0.775648 +-0.264557 0.243356 -0.140302 -0.587159 0.0842034 -0.80508 +-0.0155381 0.364613 -0.157761 -0.242157 0.822836 -0.514101 +0.234559 0.114033 -0.155351 0.805654 -0.120952 -0.579907 +0.0054865 0.147642 -0.265756 -0.128838 -0.026093 -0.991322 +-0.241053 0.0609365 -0.143202 -0.736132 -0.551973 0.391708 +-0.225537 -0.0367212 -0.152413 -0.127039 -0.34996 0.92811 +-0.169358 -0.208448 -0.276584 0.135728 0.452616 -0.881315 +0.00887626 0.257489 -0.248505 -0.0587438 0.357813 -0.931944 +0.0377567 -0.4189 -0.152034 0.851043 0.290693 -0.43729 +-0.199022 -0.0674076 -0.196009 0.866173 -0.489614 0.100112 +0.0582865 -0.439073 -0.139262 0.712174 0.440564 -0.546546 +-0.0583829 -0.49721 -0.152006 0.00464946 -0.999641 0.0263975 +-0.0924411 -0.496583 -0.13776 0.00737981 -0.998883 0.0466803 +-0.189632 0.113221 -0.192658 0.226201 0.440393 -0.868843 +-0.172205 0.274925 -0.155681 -0.174678 0.551802 -0.815477 +-0.199074 0.256063 -0.161549 -0.167539 0.362868 -0.916656 +-0.243399 -0.399732 -0.174718 -0.812524 -0.43094 -0.39255 +-0.044257 0.104339 -0.249867 -0.295433 -0.204199 -0.933286 +0.147664 0.422652 -0.0536227 -0.526449 0.812387 -0.250757 +0.205164 0.0281474 -0.152996 0.67474 -0.472368 -0.567093 +-0.053759 -0.0204801 -0.163842 -0.319585 -0.737659 -0.594747 +-0.0974451 -0.43002 -0.252193 0.0812612 -0.526384 -0.846355 +0.0164535 -0.0517295 -0.150427 -0.125594 -0.857428 -0.499042 +0.110265 -0.0196818 -0.181418 0.3102 -0.708336 -0.634063 +-0.227254 -0.0540106 -0.16077 0.0321127 -0.43958 0.897629 +0.0404513 -0.328405 -0.164002 0.994017 0.104546 -0.0316278 +0.011263 -0.220389 -0.162599 0.795404 0.499252 -0.343627 +-0.0492696 -0.415674 -0.247699 0.36638 -0.520883 -0.771003 +0.0692192 0.0408144 -0.236805 0.150467 -0.450258 -0.880129 +-0.142762 -0.371845 -0.276005 -0.24393 -0.321831 -0.914835 +-0.233755 0.163172 -0.154983 -0.613681 -0.20932 -0.761302 +0.0900012 -0.0435234 -0.158492 0.212802 -0.822637 -0.527241 +-0.288779 -0.288114 -0.16185 -0.966395 -0.189253 -0.173966 +0.0169467 0.0266541 -0.230123 -0.110042 -0.52835 -0.841865 +-0.254893 -0.391553 -0.156972 -0.855297 -0.412339 -0.313758 +-0.0356627 -0.00585337 -0.189105 -0.296143 -0.678526 -0.672236 +-0.145336 0.0586512 -0.188236 0.0309563 -0.256593 -0.966024 +-0.250374 -0.0603217 -0.16631 -0.397064 -0.181168 0.899733 +0.0339169 0.370544 -0.158896 0.0151185 0.824893 -0.565087 +0.149551 0.307885 -0.178631 0.446505 0.53221 -0.719296 +0.15522 0.317705 -0.167673 0.440897 0.541754 -0.71562 +0.169088 0.301239 -0.170697 0.499109 0.490592 -0.71429 +-0.134325 -0.198269 -0.264351 0.139752 0.636589 -0.758435 +-0.215734 -0.372533 -0.234229 -0.622428 -0.395273 -0.675532 +-0.207238 0.241374 -0.164938 -0.224494 0.265859 -0.937508 diff -Nru cgal-4.7/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn cgal-4.8/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn --- cgal-4.7/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Poisson_surface_reconstruction_3/data/sphere926.pwn 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,926 @@ +2.78865 0.400948 -9.59493 0.27886 0.0400935 -0.959495 +4.11187 0.591198 -9.09632 0.389602 0.0560156 -0.919278 +2.81733 0 -9.59493 0.281727 4.34882e-019 -0.959495 +2.70321 0.793732 -9.59493 0.28032 0.0800395 -0.956564 +3.98588 1.17036 -9.09632 0.419268 0.123109 -0.899477 +0.793732 2.70321 -9.59493 0.0800395 0.28032 -0.956564 +0.591198 4.11187 -9.09632 0.0560156 0.389602 -0.919278 +1.17036 3.98588 -9.09632 0.123109 0.419268 -0.899477 +0.400948 2.78865 -9.59493 0.0400935 0.27886 -0.959495 +0 2.81733 -9.59493 0 0.281727 -0.959495 +0 4.15415 -9.09632 0 0.436968 -0.899477 +-0.591198 4.11187 -9.09632 -0.0560156 0.389602 -0.919278 +-0.400948 2.78865 -9.59493 -0.0400935 0.27886 -0.959495 +-0.793732 2.70321 -9.59493 -0.0800395 0.28032 -0.956564 +-1.17036 3.98588 -9.09632 -0.123109 0.419268 -0.899477 +-2.70321 0.793732 -9.59493 -0.28032 0.0800395 -0.956564 +-4.11187 0.591198 -9.09632 -0.389602 0.0560156 -0.919278 +-3.98588 1.17036 -9.09632 -0.419268 0.123109 -0.899477 +-2.78865 0.400948 -9.59493 -0.27886 0.0400935 -0.959495 +-2.81733 0 -9.59493 -0.281727 2.17441e-019 -0.959495 +-4.15415 0 -9.09632 -0.436968 0 -0.899477 +-4.11187 -0.591198 -9.09632 -0.389602 -0.0560156 -0.919278 +-2.78865 -0.400948 -9.59493 -0.27886 -0.0400935 -0.959495 +-2.70321 -0.793732 -9.59493 -0.28032 -0.0800395 -0.956564 +-3.98588 -1.17036 -9.09632 -0.419268 -0.123109 -0.899477 +-0.793732 -2.70321 -9.59493 -0.0800395 -0.28032 -0.956564 +-0.591198 -4.11187 -9.09632 -0.0560156 -0.389602 -0.919278 +-1.17036 -3.98588 -9.09632 -0.123109 -0.419268 -0.899477 +-0.400948 -2.78865 -9.59493 -0.0400935 -0.27886 -0.959495 +0 -2.81733 -9.59493 4.34882e-019 -0.281727 -0.959495 +0 -4.15415 -9.09632 1.15968e-018 -0.436968 -0.899477 +0.591198 -4.11187 -9.09632 0.0560156 -0.389602 -0.919278 +0.400948 -2.78865 -9.59493 0.0400935 -0.27886 -0.959495 +0.793732 -2.70321 -9.59493 0.0800395 -0.28032 -0.956564 +1.17036 -3.98588 -9.09632 0.123109 -0.419268 -0.899477 +4.15415 0 -9.09632 0.436968 0 -0.899477 +2.70321 -0.793732 -9.59493 0.28032 -0.0800395 -0.956564 +2.78865 -0.400948 -9.59493 0.27886 -0.0400935 -0.959495 +4.11187 -0.591198 -9.09632 0.389602 -0.0560156 -0.919278 +3.98588 -1.17036 -9.09632 0.419268 -0.123109 -0.899477 +3.49469 2.2459 -9.09632 0.356647 0.237372 -0.90358 +4.54816 2.92292 -8.41254 0.464662 0.292785 -0.835683 +3.77875 1.7257 -9.09632 0.367349 0.17316 -0.913822 +1.7257 3.77875 -9.09632 0.17316 0.367349 -0.913822 +2.92292 4.54816 -8.41254 0.292785 0.464662 -0.835683 +2.2459 3.49469 -9.09632 0.237372 0.356647 -0.90358 +-2.2459 3.49469 -9.09632 -0.237372 0.356647 -0.90358 +-2.92292 4.54816 -8.41254 -0.292785 0.464662 -0.835683 +-1.7257 3.77875 -9.09632 -0.17316 0.367349 -0.913822 +-3.77875 1.7257 -9.09632 -0.367349 0.17316 -0.913822 +-4.54816 2.92292 -8.41254 -0.464662 0.292785 -0.835683 +-3.49469 2.2459 -9.09632 -0.356647 0.237372 -0.90358 +-3.49469 -2.2459 -9.09632 -0.356647 -0.237372 -0.90358 +-4.54816 -2.92292 -8.41254 -0.464662 -0.292785 -0.835683 +-3.77875 -1.7257 -9.09632 -0.367349 -0.17316 -0.913822 +-1.7257 -3.77875 -9.09632 -0.17316 -0.367349 -0.913822 +-2.92292 -4.54816 -8.41254 -0.292785 -0.464662 -0.835683 +-2.2459 -3.49469 -9.09632 -0.237372 -0.356647 -0.90358 +2.2459 -3.49469 -9.09632 0.237372 -0.356647 -0.90358 +2.92292 -4.54816 -8.41254 0.292785 -0.464662 -0.835683 +1.7257 -3.77875 -9.09632 0.17316 -0.367349 -0.913822 +3.77875 -1.7257 -9.09632 0.367349 -0.17316 -0.913822 +4.54816 -2.92292 -8.41254 0.464662 -0.292785 -0.835683 +3.49469 -2.2459 -9.09632 0.356647 -0.237372 -0.90358 +4.91784 2.2459 -8.41254 0.483623 0.213308 -0.848886 +5.95682 2.72039 -7.5575 0.579121 0.264475 -0.77115 +5.50904 3.54044 -7.5575 0.565385 0.3513 -0.746276 +4.94911 4.28842 -7.5575 0.493771 0.418273 -0.76239 +4.08589 3.54044 -8.41254 0.393313 0.340807 -0.853906 +4.28842 4.94911 -7.5575 0.429221 0.504724 -0.749015 +3.54044 5.50904 -7.5575 0.3513 0.565385 -0.746276 +2.72039 5.95682 -7.5575 0.264475 0.579121 -0.77115 +3.54044 4.08589 -8.41254 0.355119 0.407643 -0.84126 +2.2459 4.91784 -8.41254 0.213308 0.483623 -0.848886 +-2.2459 4.91784 -8.41254 -0.213308 0.483623 -0.848886 +-2.72039 5.95682 -7.5575 -0.264475 0.579121 -0.77115 +-3.54044 5.50904 -7.5575 -0.3513 0.565385 -0.746276 +-4.28842 4.94911 -7.5575 -0.429221 0.504724 -0.749015 +-3.54044 4.08589 -8.41254 -0.355119 0.407643 -0.84126 +-4.08589 3.54044 -8.41254 -0.393313 0.340807 -0.853906 +-4.94911 4.28842 -7.5575 -0.493771 0.418273 -0.76239 +-5.50904 3.54044 -7.5575 -0.565385 0.3513 -0.746276 +-5.95682 2.72039 -7.5575 -0.579121 0.264475 -0.77115 +-4.91784 2.2459 -8.41254 -0.483623 0.213308 -0.848886 +-4.91784 -2.2459 -8.41254 -0.483623 -0.213308 -0.848886 +-5.95682 -2.72039 -7.5575 -0.579121 -0.264475 -0.77115 +-5.50904 -3.54044 -7.5575 -0.565385 -0.3513 -0.746276 +-4.94911 -4.28842 -7.5575 -0.493771 -0.418273 -0.76239 +-4.08589 -3.54044 -8.41254 -0.393313 -0.340807 -0.853906 +-3.54044 -4.08589 -8.41254 -0.355119 -0.407643 -0.84126 +-4.28842 -4.94911 -7.5575 -0.429221 -0.504724 -0.749015 +-3.54044 -5.50904 -7.5575 -0.3513 -0.565385 -0.746276 +-2.72039 -5.95682 -7.5575 -0.264475 -0.579121 -0.77115 +-2.2459 -4.91784 -8.41254 -0.213308 -0.483623 -0.848886 +2.2459 -4.91784 -8.41254 0.213308 -0.483623 -0.848886 +2.72039 -5.95682 -7.5575 0.264475 -0.579121 -0.77115 +3.54044 -5.50904 -7.5575 0.3513 -0.565385 -0.746276 +3.54044 -4.08589 -8.41254 0.355119 -0.407643 -0.84126 +4.28842 -4.94911 -7.5575 0.429221 -0.504724 -0.749015 +4.08589 -3.54044 -8.41254 0.393313 -0.340807 -0.853906 +4.94911 -4.28842 -7.5575 0.493771 -0.418273 -0.76239 +5.50904 -3.54044 -7.5575 0.565385 -0.3513 -0.746276 +5.95682 -2.72039 -7.5575 0.579121 -0.264475 -0.77115 +4.91784 -2.2459 -8.41254 0.483623 -0.213308 -0.848886 +6.35777 4.08589 -6.54861 0.636372 0.407646 -0.654871 +5.71158 4.94911 -6.54861 0.57188 0.494062 -0.654871 +4.94911 5.71158 -6.54861 0.504986 0.582786 -0.636671 +4.08589 6.35777 -6.54861 0.407646 0.636372 -0.654871 +-4.08589 6.35777 -6.54861 -0.407646 0.636372 -0.654871 +-4.94911 5.71158 -6.54861 -0.504986 0.582786 -0.636671 +-6.35777 4.08589 -6.54861 -0.636372 0.407646 -0.654871 +-5.71158 4.94911 -6.54861 -0.57188 0.494062 -0.654871 +-6.35777 -4.08589 -6.54861 -0.636372 -0.407646 -0.654871 +-5.71158 -4.94911 -6.54861 -0.57188 -0.494062 -0.654871 +-4.08589 -6.35777 -6.54861 -0.407646 -0.636372 -0.654871 +-4.94911 -5.71158 -6.54861 -0.504986 -0.582786 -0.636671 +4.08589 -6.35777 -6.54861 0.407646 -0.636372 -0.654871 +4.94911 -5.71158 -6.54861 0.504986 -0.582786 -0.636671 +6.35777 -4.08589 -6.54861 0.636372 -0.407646 -0.654871 +5.71158 -4.94911 -6.54861 0.57188 -0.494062 -0.654871 +7.65231 3.49469 -5.40641 0.753288 0.344015 -0.560545 +7.07708 4.54816 -5.40641 0.707856 0.464658 -0.532008 +6.87454 3.1395 -6.54861 0.673054 0.307374 -0.672696 +4.54816 7.07708 -5.40641 0.464658 0.707856 -0.532008 +3.49469 7.65231 -5.40641 0.344015 0.753288 -0.560545 +3.1395 6.87454 -6.54861 0.307374 0.673054 -0.672696 +-3.49469 7.65231 -5.40641 -0.344015 0.753288 -0.560545 +-4.54816 7.07708 -5.40641 -0.464658 0.707856 -0.532008 +-3.1395 6.87454 -6.54861 -0.307374 0.673054 -0.672696 +-7.65231 3.49469 -5.40641 -0.753288 0.344015 -0.560545 +-7.07708 4.54816 -5.40641 -0.707856 0.464658 -0.532008 +-6.87454 3.1395 -6.54861 -0.673054 0.307374 -0.672696 +-7.65231 -3.49469 -5.40641 -0.753288 -0.344015 -0.560545 +-7.07708 -4.54816 -5.40641 -0.707856 -0.464658 -0.532008 +-6.87454 -3.1395 -6.54861 -0.673054 -0.307374 -0.672696 +-3.49469 -7.65231 -5.40641 -0.344015 -0.753288 -0.560545 +-4.54816 -7.07708 -5.40641 -0.464658 -0.707856 -0.532008 +-3.1395 -6.87454 -6.54861 -0.307374 -0.673054 -0.672696 +3.49469 -7.65231 -5.40641 0.344015 -0.753288 -0.560545 +4.54816 -7.07708 -5.40641 0.464658 -0.707856 -0.532008 +3.1395 -6.87454 -6.54861 0.307374 -0.673054 -0.672696 +6.87454 -3.1395 -6.54861 0.673054 -0.307374 -0.672696 +7.65231 -3.49469 -5.40641 0.753288 -0.344015 -0.560545 +7.07708 -4.54816 -5.40641 0.707856 -0.464658 -0.532008 +8.07177 2.37009 -5.40641 0.819306 0.240571 -0.520445 +9.00373 1.29454 -4.15415 0.897446 0.119338 -0.424676 +8.32691 1.19723 -5.40641 0.823258 0.129964 -0.55259 +8.72786 2.56273 -4.15415 0.882098 0.245008 -0.402336 +6.87454 5.95682 -4.15415 0.679773 0.589027 -0.436984 +7.65231 4.91784 -4.15415 0.762817 0.506199 -0.402335 +6.35777 5.50904 -5.40641 0.622305 0.554421 -0.552588 +5.95682 6.87454 -4.15415 0.596213 0.686989 -0.415424 +5.50904 6.35777 -5.40641 0.565374 0.633261 -0.528519 +4.91784 7.65231 -4.15415 0.506199 0.762817 -0.402335 +2.37009 8.07177 -5.40641 0.240571 0.819306 -0.520445 +1.29454 9.00373 -4.15415 0.119338 0.897446 -0.424676 +2.56273 8.72786 -4.15415 0.245008 0.882098 -0.402336 +1.19723 8.32691 -5.40641 0.129964 0.823258 -0.55259 +0 8.41254 -5.40641 2.61344e-018 0.841248 -0.54065 +0 9.09632 -4.15415 0 0.909628 -0.415423 +-1.29454 9.00373 -4.15415 -0.119338 0.897446 -0.424676 +-1.19723 8.32691 -5.40641 -0.129964 0.823258 -0.55259 +-2.37009 8.07177 -5.40641 -0.240571 0.819306 -0.520445 +-2.56273 8.72786 -4.15415 -0.245008 0.882098 -0.402336 +-5.95682 6.87454 -4.15415 -0.596213 0.686989 -0.415424 +-4.91784 7.65231 -4.15415 -0.506199 0.762817 -0.402335 +-5.50904 6.35777 -5.40641 -0.565374 0.633261 -0.528519 +-6.87454 5.95682 -4.15415 -0.679773 0.589027 -0.436984 +-6.35777 5.50904 -5.40641 -0.622305 0.554421 -0.552588 +-7.65231 4.91784 -4.15415 -0.762817 0.506199 -0.402335 +-8.07177 2.37009 -5.40641 -0.819306 0.240571 -0.520445 +-9.00373 1.29454 -4.15415 -0.897446 0.119338 -0.424676 +-8.72786 2.56273 -4.15415 -0.882098 0.245008 -0.402336 +-8.32691 1.19723 -5.40641 -0.823258 0.129964 -0.55259 +-8.41254 0 -5.40641 -0.841248 2.61344e-018 -0.54065 +-9.09632 0 -4.15415 -0.909628 0 -0.415423 +-9.00373 -1.29454 -4.15415 -0.897446 -0.119338 -0.424676 +-8.32691 -1.19723 -5.40641 -0.823258 -0.129964 -0.55259 +-8.07177 -2.37009 -5.40641 -0.819306 -0.240571 -0.520445 +-8.72786 -2.56273 -4.15415 -0.882098 -0.245008 -0.402336 +-6.87454 -5.95682 -4.15415 -0.679773 -0.589027 -0.436984 +-7.65231 -4.91784 -4.15415 -0.762817 -0.506199 -0.402335 +-6.35777 -5.50904 -5.40641 -0.622305 -0.554421 -0.552588 +-5.95682 -6.87454 -4.15415 -0.596213 -0.686989 -0.415424 +-5.50904 -6.35777 -5.40641 -0.565374 -0.633261 -0.528519 +-4.91784 -7.65231 -4.15415 -0.506199 -0.762817 -0.402335 +-2.37009 -8.07177 -5.40641 -0.240571 -0.819306 -0.520445 +-1.29454 -9.00373 -4.15415 -0.119338 -0.897446 -0.424676 +-2.56273 -8.72786 -4.15415 -0.245008 -0.882098 -0.402336 +-1.19723 -8.32691 -5.40641 -0.129964 -0.823258 -0.55259 +0 -8.41254 -5.40641 1.74229e-018 -0.841248 -0.54065 +0 -9.09632 -4.15415 0 -0.909628 -0.415423 +1.29454 -9.00373 -4.15415 0.119338 -0.897446 -0.424676 +1.19723 -8.32691 -5.40641 0.129964 -0.823258 -0.55259 +2.37009 -8.07177 -5.40641 0.240571 -0.819306 -0.520445 +2.56273 -8.72786 -4.15415 0.245008 -0.882098 -0.402336 +5.95682 -6.87454 -4.15415 0.596213 -0.686989 -0.415424 +4.91784 -7.65231 -4.15415 0.506199 -0.762817 -0.402335 +5.50904 -6.35777 -5.40641 0.565374 -0.633261 -0.528519 +6.87454 -5.95682 -4.15415 0.679773 -0.589027 -0.436984 +6.35777 -5.50904 -5.40641 0.622305 -0.554421 -0.552588 +7.65231 -4.91784 -4.15415 0.762817 -0.506199 -0.402335 +9.09632 0 -4.15415 0.909628 0 -0.415423 +8.41254 0 -5.40641 0.841248 8.71145e-019 -0.54065 +8.07177 -2.37009 -5.40641 0.819306 -0.240571 -0.520445 +8.32691 -1.19723 -5.40641 0.823258 -0.129964 -0.55259 +9.00373 -1.29454 -4.15415 0.897446 -0.119338 -0.424676 +8.72786 -2.56273 -4.15415 0.882098 -0.245008 -0.402336 +9.59493 0 -2.81733 0.952503 -4.64713e-018 -0.30453 +9.49727 1.3655 -2.81733 0.949792 0.136075 -0.281742 +8.2743 3.77875 -4.15415 0.827426 0.377874 -0.415425 +9.20627 2.70321 -2.81733 0.920592 0.280314 -0.271909 +8.72786 3.98588 -2.81733 0.872783 0.398588 -0.28174 +3.77875 8.2743 -4.15415 0.377874 0.827426 -0.415425 +2.70321 9.20627 -2.81733 0.280314 0.920592 -0.271909 +3.98588 8.72786 -2.81733 0.398588 0.872783 -0.28174 +0 9.59493 -2.81733 0 0.952503 -0.30453 +1.3655 9.49727 -2.81733 0.136075 0.949792 -0.281742 +-1.3655 9.49727 -2.81733 -0.136075 0.949792 -0.281742 +-3.77875 8.2743 -4.15415 -0.377874 0.827426 -0.415425 +-2.70321 9.20627 -2.81733 -0.280314 0.920592 -0.271909 +-3.98588 8.72786 -2.81733 -0.398588 0.872783 -0.28174 +-8.2743 3.77875 -4.15415 -0.827426 0.377874 -0.415425 +-9.20627 2.70321 -2.81733 -0.920592 0.280314 -0.271909 +-8.72786 3.98588 -2.81733 -0.872783 0.398588 -0.28174 +-9.59493 0 -2.81733 -0.952503 0 -0.30453 +-9.49727 1.3655 -2.81733 -0.949792 0.136075 -0.281742 +-9.49727 -1.3655 -2.81733 -0.949792 -0.136075 -0.281742 +-8.2743 -3.77875 -4.15415 -0.827426 -0.377874 -0.415425 +-9.20627 -2.70321 -2.81733 -0.920592 -0.280314 -0.271909 +-8.72786 -3.98588 -2.81733 -0.872783 -0.398588 -0.28174 +-3.77875 -8.2743 -4.15415 -0.377874 -0.827426 -0.415425 +-2.70321 -9.20627 -2.81733 -0.280314 -0.920592 -0.271909 +-3.98588 -8.72786 -2.81733 -0.398588 -0.872783 -0.28174 +0 -9.59493 -2.81733 -2.32356e-018 -0.952503 -0.30453 +-1.3655 -9.49727 -2.81733 -0.136075 -0.949792 -0.281742 +1.3655 -9.49727 -2.81733 0.136075 -0.949792 -0.281742 +3.77875 -8.2743 -4.15415 0.377874 -0.827426 -0.415425 +2.70321 -9.20627 -2.81733 0.280314 -0.920592 -0.271909 +3.98588 -8.72786 -2.81733 0.398588 -0.872783 -0.28174 +8.2743 -3.77875 -4.15415 0.827426 -0.377874 -0.415425 +9.20627 -2.70321 -2.81733 0.920592 -0.280314 -0.271909 +8.72786 -3.98588 -2.81733 0.872783 -0.398588 -0.28174 +9.49727 -1.3655 -2.81733 0.949792 -0.136075 -0.281742 +9.79747 1.40866 -1.42315 0.976116 0.164179 -0.142279 +9.49727 2.78865 -1.42315 0.949726 0.278867 -0.142317 +9.00373 4.11187 -1.42315 0.900373 0.411187 -0.142317 +8.07177 5.18741 -2.81733 0.814706 0.512171 -0.27191 +8.32691 5.35138 -1.42315 0.8265 0.548159 -0.128135 +7.48057 6.48195 -1.42315 0.74528 0.64579 -0.165869 +7.25137 6.28334 -2.81733 0.719854 0.623757 -0.304528 +5.18741 8.07177 -2.81733 0.512171 0.814706 -0.27191 +6.48195 7.48057 -1.42315 0.648378 0.747898 -0.14232 +6.28334 7.25137 -2.81733 0.628694 0.724822 -0.281739 +5.35138 8.32691 -1.42315 0.548159 0.8265 -0.128135 +4.11187 9.00373 -1.42315 0.411187 0.900373 -0.142317 +2.78865 9.49727 -1.42315 0.278867 0.949726 -0.142317 +1.40866 9.79747 -1.42315 0.164179 0.976116 -0.142279 +-1.40866 9.79747 -1.42315 -0.164179 0.976116 -0.142279 +-2.78865 9.49727 -1.42315 -0.278867 0.949726 -0.142317 +-4.11187 9.00373 -1.42315 -0.411187 0.900373 -0.142317 +-5.18741 8.07177 -2.81733 -0.512171 0.814706 -0.27191 +-5.35138 8.32691 -1.42315 -0.548159 0.8265 -0.128135 +-6.48195 7.48057 -1.42315 -0.648378 0.747898 -0.14232 +-6.28334 7.25137 -2.81733 -0.628694 0.724822 -0.281739 +-8.07177 5.18741 -2.81733 -0.814706 0.512171 -0.27191 +-7.48057 6.48195 -1.42315 -0.74528 0.64579 -0.165869 +-7.25137 6.28334 -2.81733 -0.719854 0.623757 -0.304528 +-8.32691 5.35138 -1.42315 -0.8265 0.548159 -0.128135 +-9.00373 4.11187 -1.42315 -0.900373 0.411187 -0.142317 +-9.49727 2.78865 -1.42315 -0.949726 0.278867 -0.142317 +-9.79747 1.40866 -1.42315 -0.976116 0.164179 -0.142279 +-9.79747 -1.40866 -1.42315 -0.976116 -0.164179 -0.142279 +-9.49727 -2.78865 -1.42315 -0.949726 -0.278867 -0.142317 +-9.00373 -4.11187 -1.42315 -0.900373 -0.411187 -0.142317 +-8.07177 -5.18741 -2.81733 -0.814706 -0.512171 -0.27191 +-8.32691 -5.35138 -1.42315 -0.8265 -0.548159 -0.128135 +-7.48057 -6.48195 -1.42315 -0.74528 -0.64579 -0.165869 +-7.25137 -6.28334 -2.81733 -0.719854 -0.623757 -0.304528 +-5.18741 -8.07177 -2.81733 -0.512171 -0.814706 -0.27191 +-6.48195 -7.48057 -1.42315 -0.648378 -0.747898 -0.14232 +-6.28334 -7.25137 -2.81733 -0.628694 -0.724822 -0.281739 +-5.35138 -8.32691 -1.42315 -0.548159 -0.8265 -0.128135 +-4.11187 -9.00373 -1.42315 -0.411187 -0.900373 -0.142317 +-2.78865 -9.49727 -1.42315 -0.278867 -0.949726 -0.142317 +-1.40866 -9.79747 -1.42315 -0.164179 -0.976116 -0.142279 +1.40866 -9.79747 -1.42315 0.164179 -0.976116 -0.142279 +2.78865 -9.49727 -1.42315 0.278867 -0.949726 -0.142317 +4.11187 -9.00373 -1.42315 0.411187 -0.900373 -0.142317 +5.18741 -8.07177 -2.81733 0.512171 -0.814706 -0.27191 +5.35138 -8.32691 -1.42315 0.548159 -0.8265 -0.128135 +6.48195 -7.48057 -1.42315 0.648378 -0.747898 -0.14232 +6.28334 -7.25137 -2.81733 0.628694 -0.724822 -0.281739 +8.07177 -5.18741 -2.81733 0.814706 -0.512171 -0.27191 +7.48057 -6.48195 -1.42315 0.74528 -0.64579 -0.165869 +7.25137 -6.28334 -2.81733 0.719854 -0.623757 -0.304528 +8.32691 -5.35138 -1.42315 0.8265 -0.548159 -0.128135 +9.00373 -4.11187 -1.42315 0.900373 -0.411187 -0.142317 +9.49727 -2.78865 -1.42315 0.949726 -0.278867 -0.142317 +9.79747 -1.40866 -1.42315 0.976116 -0.164179 -0.142279 +9.59493 2.81733 0 0.959492 0.281735 1.74357e-018 +9.89822 1.42315 0 0.992932 0.118683 0 +8.41254 5.40641 0 0.853901 0.520435 0 +7.5575 6.54861 0 0.755749 0.654861 0 +6.54861 7.5575 0 0.636663 0.771142 0 +5.40641 8.41254 0 0.520435 0.853901 2.32411e-018 +2.81733 9.59493 0 0.281735 0.959492 1.74357e-018 +1.42315 9.89822 0 0.118683 0.992932 -2.32411e-018 +-2.81733 9.59493 0 -0.281735 0.959492 1.74357e-018 +-1.42315 9.89822 0 -0.118683 0.992932 0 +-5.40641 8.41254 0 -0.520435 0.853901 0 +-6.54861 7.5575 0 -0.636663 0.771142 -2.32411e-018 +-7.5575 6.54861 0 -0.755749 0.654861 0 +-8.41254 5.40641 0 -0.853901 0.520435 2.32411e-018 +-9.59493 2.81733 0 -0.959492 0.281735 1.74357e-018 +-9.89822 1.42315 0 -0.992932 0.118683 -2.32411e-018 +-9.59493 -2.81733 0 -0.959492 -0.281735 1.74357e-018 +-9.89822 -1.42315 0 -0.992932 -0.118683 -2.32411e-018 +-8.41254 -5.40641 0 -0.853901 -0.520435 0 +-7.5575 -6.54861 0 -0.755749 -0.654861 0 +-6.54861 -7.5575 0 -0.636663 -0.771142 0 +-5.40641 -8.41254 0 -0.520435 -0.853901 2.32411e-018 +-2.81733 -9.59493 0 -0.281735 -0.959492 1.74357e-018 +-1.42315 -9.89822 0 -0.118683 -0.992932 0 +2.81733 -9.59493 0 0.281735 -0.959492 1.74357e-018 +1.42315 -9.89822 0 0.118683 -0.992932 -2.32411e-018 +5.40641 -8.41254 0 0.520435 -0.853901 0 +6.54861 -7.5575 0 0.636663 -0.771142 -2.32411e-018 +7.5575 -6.54861 0 0.755749 -0.654861 0 +8.41254 -5.40641 0 0.853901 -0.520435 2.32411e-018 +9.59493 -2.81733 0 0.959492 -0.281735 1.74357e-018 +9.89822 -1.42315 0 0.992932 -0.118683 0 +9.79747 1.40866 1.42315 0.976116 0.164179 0.142279 +9.49727 2.78865 1.42315 0.949726 0.278867 0.142317 +9.00373 4.11187 1.42315 0.900373 0.411187 0.142317 +9.09632 4.15415 0 0.909632 0.415414 0 +8.32691 5.35138 1.42315 0.8265 0.548159 0.128135 +7.48057 6.48195 1.42315 0.74528 0.64579 0.165869 +6.48195 7.48057 1.42315 0.648378 0.747898 0.14232 +5.35138 8.32691 1.42315 0.548159 0.8265 0.128135 +4.11187 9.00373 1.42315 0.411187 0.900373 0.142317 +4.15415 9.09632 0 0.415414 0.909632 3.48715e-018 +2.78865 9.49727 1.42315 0.278867 0.949726 0.142317 +1.40866 9.79747 1.42315 0.164179 0.976116 0.142279 +-1.40866 9.79747 1.42315 -0.164179 0.976116 0.142279 +-2.78865 9.49727 1.42315 -0.278867 0.949726 0.142317 +-4.11187 9.00373 1.42315 -0.411187 0.900373 0.142317 +-4.15415 9.09632 0 -0.415414 0.909632 0 +-5.35138 8.32691 1.42315 -0.548159 0.8265 0.128135 +-6.48195 7.48057 1.42315 -0.648378 0.747898 0.14232 +-7.48057 6.48195 1.42315 -0.74528 0.64579 0.165869 +-8.32691 5.35138 1.42315 -0.8265 0.548159 0.128135 +-9.00373 4.11187 1.42315 -0.900373 0.411187 0.142317 +-9.09632 4.15415 0 -0.909632 0.415414 3.48715e-018 +-9.49727 2.78865 1.42315 -0.949726 0.278867 0.142317 +-9.79747 1.40866 1.42315 -0.976116 0.164179 0.142279 +-9.79747 -1.40866 1.42315 -0.976116 -0.164179 0.142279 +-9.49727 -2.78865 1.42315 -0.949726 -0.278867 0.142317 +-9.00373 -4.11187 1.42315 -0.900373 -0.411187 0.142317 +-9.09632 -4.15415 0 -0.909632 -0.415414 0 +-8.32691 -5.35138 1.42315 -0.8265 -0.548159 0.128135 +-7.48057 -6.48195 1.42315 -0.74528 -0.64579 0.165869 +-6.48195 -7.48057 1.42315 -0.648378 -0.747898 0.14232 +-5.35138 -8.32691 1.42315 -0.548159 -0.8265 0.128135 +-4.11187 -9.00373 1.42315 -0.411187 -0.900373 0.142317 +-4.15415 -9.09632 0 -0.415414 -0.909632 3.48715e-018 +-2.78865 -9.49727 1.42315 -0.278867 -0.949726 0.142317 +-1.40866 -9.79747 1.42315 -0.164179 -0.976116 0.142279 +1.40866 -9.79747 1.42315 0.164179 -0.976116 0.142279 +2.78865 -9.49727 1.42315 0.278867 -0.949726 0.142317 +4.11187 -9.00373 1.42315 0.411187 -0.900373 0.142317 +4.15415 -9.09632 0 0.415414 -0.909632 0 +5.35138 -8.32691 1.42315 0.548159 -0.8265 0.128135 +6.48195 -7.48057 1.42315 0.648378 -0.747898 0.14232 +7.48057 -6.48195 1.42315 0.74528 -0.64579 0.165869 +8.32691 -5.35138 1.42315 0.8265 -0.548159 0.128135 +9.00373 -4.11187 1.42315 0.900373 -0.411187 0.142317 +9.09632 -4.15415 0 0.909632 -0.415414 3.48715e-018 +9.49727 -2.78865 1.42315 0.949726 -0.278867 0.142317 +9.79747 -1.40866 1.42315 0.976116 -0.164179 0.142279 +9.20627 2.70321 2.81733 0.920592 0.280314 0.271909 +9.49727 1.3655 2.81733 0.949792 0.136075 0.281742 +2.70321 9.20627 2.81733 0.280314 0.920592 0.271909 +1.3655 9.49727 2.81733 0.136075 0.949792 0.281742 +-2.70321 9.20627 2.81733 -0.280314 0.920592 0.271909 +-1.3655 9.49727 2.81733 -0.136075 0.949792 0.281742 +-9.20627 2.70321 2.81733 -0.920592 0.280314 0.271909 +-9.49727 1.3655 2.81733 -0.949792 0.136075 0.281742 +-9.20627 -2.70321 2.81733 -0.920592 -0.280314 0.271909 +-9.49727 -1.3655 2.81733 -0.949792 -0.136075 0.281742 +-2.70321 -9.20627 2.81733 -0.280314 -0.920592 0.271909 +-1.3655 -9.49727 2.81733 -0.136075 -0.949792 0.281742 +2.70321 -9.20627 2.81733 0.280314 -0.920592 0.271909 +1.3655 -9.49727 2.81733 0.136075 -0.949792 0.281742 +9.20627 -2.70321 2.81733 0.920592 -0.280314 0.271909 +9.49727 -1.3655 2.81733 0.949792 -0.136075 0.281742 +9.00373 1.29454 4.15415 0.897446 0.119338 0.424676 +9.59493 0 2.81733 0.952503 -4.64713e-018 0.30453 +8.2743 3.77875 4.15415 0.827426 0.377874 0.415425 +8.72786 2.56273 4.15415 0.882098 0.245008 0.402336 +8.72786 3.98588 2.81733 0.872783 0.398588 0.28174 +8.07177 5.18741 2.81733 0.814706 0.512171 0.27191 +7.25137 6.28334 2.81733 0.719854 0.623757 0.304528 +6.28334 7.25137 2.81733 0.628694 0.724822 0.281739 +5.18741 8.07177 2.81733 0.512171 0.814706 0.27191 +3.98588 8.72786 2.81733 0.398588 0.872783 0.28174 +2.56273 8.72786 4.15415 0.245008 0.882098 0.402336 +3.77875 8.2743 4.15415 0.377874 0.827426 0.415425 +0 9.59493 2.81733 -2.32356e-018 0.952503 0.30453 +1.29454 9.00373 4.15415 0.119338 0.897446 0.424676 +0 9.09632 4.15415 0 0.909628 0.415423 +-1.29454 9.00373 4.15415 -0.119338 0.897446 0.424676 +-3.77875 8.2743 4.15415 -0.377874 0.827426 0.415425 +-2.56273 8.72786 4.15415 -0.245008 0.882098 0.402336 +-3.98588 8.72786 2.81733 -0.398588 0.872783 0.28174 +-5.18741 8.07177 2.81733 -0.512171 0.814706 0.27191 +-6.28334 7.25137 2.81733 -0.628694 0.724822 0.281739 +-7.25137 6.28334 2.81733 -0.719854 0.623757 0.304528 +-8.07177 5.18741 2.81733 -0.814706 0.512171 0.27191 +-8.72786 3.98588 2.81733 -0.872783 0.398588 0.28174 +-8.72786 2.56273 4.15415 -0.882098 0.245008 0.402336 +-8.2743 3.77875 4.15415 -0.827426 0.377874 0.415425 +-9.59493 0 2.81733 -0.952503 -2.32356e-018 0.30453 +-9.00373 1.29454 4.15415 -0.897446 0.119338 0.424676 +-9.09632 0 4.15415 -0.909628 0 0.415423 +-9.00373 -1.29454 4.15415 -0.897446 -0.119338 0.424676 +-8.2743 -3.77875 4.15415 -0.827426 -0.377874 0.415425 +-8.72786 -2.56273 4.15415 -0.882098 -0.245008 0.402336 +-8.72786 -3.98588 2.81733 -0.872783 -0.398588 0.28174 +-8.07177 -5.18741 2.81733 -0.814706 -0.512171 0.27191 +-7.25137 -6.28334 2.81733 -0.719854 -0.623757 0.304528 +-6.28334 -7.25137 2.81733 -0.628694 -0.724822 0.281739 +-5.18741 -8.07177 2.81733 -0.512171 -0.814706 0.27191 +-3.98588 -8.72786 2.81733 -0.398588 -0.872783 0.28174 +-2.56273 -8.72786 4.15415 -0.245008 -0.882098 0.402336 +-3.77875 -8.2743 4.15415 -0.377874 -0.827426 0.415425 +0 -9.59493 2.81733 0 -0.952503 0.30453 +-1.29454 -9.00373 4.15415 -0.119338 -0.897446 0.424676 +0 -9.09632 4.15415 0 -0.909628 0.415423 +1.29454 -9.00373 4.15415 0.119338 -0.897446 0.424676 +3.77875 -8.2743 4.15415 0.377874 -0.827426 0.415425 +2.56273 -8.72786 4.15415 0.245008 -0.882098 0.402336 +3.98588 -8.72786 2.81733 0.398588 -0.872783 0.28174 +5.18741 -8.07177 2.81733 0.512171 -0.814706 0.27191 +6.28334 -7.25137 2.81733 0.628694 -0.724822 0.281739 +7.25137 -6.28334 2.81733 0.719854 -0.623757 0.304528 +8.07177 -5.18741 2.81733 0.814706 -0.512171 0.27191 +8.72786 -3.98588 2.81733 0.872783 -0.398588 0.28174 +9.09632 0 4.15415 0.909628 0 0.415423 +9.00373 -1.29454 4.15415 0.897446 -0.119338 0.424676 +8.2743 -3.77875 4.15415 0.827426 -0.377874 0.415425 +8.72786 -2.56273 4.15415 0.882098 -0.245008 0.402336 +8.41254 0 5.40641 0.841248 1.74229e-018 0.54065 +8.32691 1.19723 5.40641 0.823258 0.129964 0.55259 +8.07177 2.37009 5.40641 0.819306 0.240571 0.520445 +6.87454 5.95682 4.15415 0.679773 0.589027 0.436984 +7.07708 4.54816 5.40641 0.707856 0.464658 0.532008 +7.65231 4.91784 4.15415 0.762817 0.506199 0.402335 +6.35777 5.50904 5.40641 0.622305 0.554421 0.552588 +5.50904 6.35777 5.40641 0.565374 0.633261 0.528519 +5.95682 6.87454 4.15415 0.596213 0.686989 0.415424 +4.54816 7.07708 5.40641 0.464658 0.707856 0.532008 +4.91784 7.65231 4.15415 0.506199 0.762817 0.402335 +2.37009 8.07177 5.40641 0.240571 0.819306 0.520445 +1.19723 8.32691 5.40641 0.129964 0.823258 0.55259 +0 8.41254 5.40641 1.74229e-018 0.841248 0.54065 +-1.19723 8.32691 5.40641 -0.129964 0.823258 0.55259 +-2.37009 8.07177 5.40641 -0.240571 0.819306 0.520445 +-5.95682 6.87454 4.15415 -0.596213 0.686989 0.415424 +-4.54816 7.07708 5.40641 -0.464658 0.707856 0.532008 +-4.91784 7.65231 4.15415 -0.506199 0.762817 0.402335 +-5.50904 6.35777 5.40641 -0.565374 0.633261 0.528519 +-6.35777 5.50904 5.40641 -0.622305 0.554421 0.552588 +-6.87454 5.95682 4.15415 -0.679773 0.589027 0.436984 +-7.07708 4.54816 5.40641 -0.707856 0.464658 0.532008 +-7.65231 4.91784 4.15415 -0.762817 0.506199 0.402335 +-8.07177 2.37009 5.40641 -0.819306 0.240571 0.520445 +-8.32691 1.19723 5.40641 -0.823258 0.129964 0.55259 +-8.41254 0 5.40641 -0.841248 8.71145e-019 0.54065 +-8.32691 -1.19723 5.40641 -0.823258 -0.129964 0.55259 +-8.07177 -2.37009 5.40641 -0.819306 -0.240571 0.520445 +-6.87454 -5.95682 4.15415 -0.679773 -0.589027 0.436984 +-7.07708 -4.54816 5.40641 -0.707856 -0.464658 0.532008 +-7.65231 -4.91784 4.15415 -0.762817 -0.506199 0.402335 +-6.35777 -5.50904 5.40641 -0.622305 -0.554421 0.552588 +-5.50904 -6.35777 5.40641 -0.565374 -0.633261 0.528519 +-5.95682 -6.87454 4.15415 -0.596213 -0.686989 0.415424 +-4.54816 -7.07708 5.40641 -0.464658 -0.707856 0.532008 +-4.91784 -7.65231 4.15415 -0.506199 -0.762817 0.402335 +-2.37009 -8.07177 5.40641 -0.240571 -0.819306 0.520445 +-1.19723 -8.32691 5.40641 -0.129964 -0.823258 0.55259 +0 -8.41254 5.40641 2.61344e-018 -0.841248 0.54065 +1.19723 -8.32691 5.40641 0.129964 -0.823258 0.55259 +2.37009 -8.07177 5.40641 0.240571 -0.819306 0.520445 +5.95682 -6.87454 4.15415 0.596213 -0.686989 0.415424 +4.54816 -7.07708 5.40641 0.464658 -0.707856 0.532008 +4.91784 -7.65231 4.15415 0.506199 -0.762817 0.402335 +5.50904 -6.35777 5.40641 0.565374 -0.633261 0.528519 +6.35777 -5.50904 5.40641 0.622305 -0.554421 0.552588 +6.87454 -5.95682 4.15415 0.679773 -0.589027 0.436984 +7.07708 -4.54816 5.40641 0.707856 -0.464658 0.532008 +7.65231 -4.91784 4.15415 0.762817 -0.506199 0.402335 +8.32691 -1.19723 5.40641 0.823258 -0.129964 0.55259 +8.07177 -2.37009 5.40641 0.819306 -0.240571 0.520445 +7.65231 3.49469 5.40641 0.753288 0.344015 0.560545 +6.35777 4.08589 6.54861 0.636372 0.407646 0.654871 +6.87454 3.1395 6.54861 0.673054 0.307374 0.672696 +3.49469 7.65231 5.40641 0.344015 0.753288 0.560545 +4.08589 6.35777 6.54861 0.407646 0.636372 0.654871 +3.1395 6.87454 6.54861 0.307374 0.673054 0.672696 +-3.49469 7.65231 5.40641 -0.344015 0.753288 0.560545 +-4.08589 6.35777 6.54861 -0.407646 0.636372 0.654871 +-3.1395 6.87454 6.54861 -0.307374 0.673054 0.672696 +-7.65231 3.49469 5.40641 -0.753288 0.344015 0.560545 +-6.35777 4.08589 6.54861 -0.636372 0.407646 0.654871 +-6.87454 3.1395 6.54861 -0.673054 0.307374 0.672696 +-7.65231 -3.49469 5.40641 -0.753288 -0.344015 0.560545 +-6.35777 -4.08589 6.54861 -0.636372 -0.407646 0.654871 +-6.87454 -3.1395 6.54861 -0.673054 -0.307374 0.672696 +-3.49469 -7.65231 5.40641 -0.344015 -0.753288 0.560545 +-4.08589 -6.35777 6.54861 -0.407646 -0.636372 0.654871 +-3.1395 -6.87454 6.54861 -0.307374 -0.673054 0.672696 +3.49469 -7.65231 5.40641 0.344015 -0.753288 0.560545 +4.08589 -6.35777 6.54861 0.407646 -0.636372 0.654871 +3.1395 -6.87454 6.54861 0.307374 -0.673054 0.672696 +7.65231 -3.49469 5.40641 0.753288 -0.344015 0.560545 +6.35777 -4.08589 6.54861 0.636372 -0.407646 0.654871 +6.87454 -3.1395 6.54861 0.673054 -0.307374 0.672696 +4.94911 4.28842 7.5575 0.493771 0.418273 0.76239 +5.50904 3.54044 7.5575 0.565385 0.3513 0.746276 +5.71158 4.94911 6.54861 0.57188 0.494062 0.654871 +4.28842 4.94911 7.5575 0.429221 0.504724 0.749015 +4.94911 5.71158 6.54861 0.504986 0.582786 0.636671 +3.54044 5.50904 7.5575 0.3513 0.565385 0.746276 +-4.28842 4.94911 7.5575 -0.429221 0.504724 0.749015 +-3.54044 5.50904 7.5575 -0.3513 0.565385 0.746276 +-4.94911 5.71158 6.54861 -0.504986 0.582786 0.636671 +-4.94911 4.28842 7.5575 -0.493771 0.418273 0.76239 +-5.71158 4.94911 6.54861 -0.57188 0.494062 0.654871 +-5.50904 3.54044 7.5575 -0.565385 0.3513 0.746276 +-4.94911 -4.28842 7.5575 -0.493771 -0.418273 0.76239 +-5.50904 -3.54044 7.5575 -0.565385 -0.3513 0.746276 +-5.71158 -4.94911 6.54861 -0.57188 -0.494062 0.654871 +-4.28842 -4.94911 7.5575 -0.429221 -0.504724 0.749015 +-4.94911 -5.71158 6.54861 -0.504986 -0.582786 0.636671 +-3.54044 -5.50904 7.5575 -0.3513 -0.565385 0.746276 +4.28842 -4.94911 7.5575 0.429221 -0.504724 0.749015 +3.54044 -5.50904 7.5575 0.3513 -0.565385 0.746276 +4.94911 -5.71158 6.54861 0.504986 -0.582786 0.636671 +4.94911 -4.28842 7.5575 0.493771 -0.418273 0.76239 +5.71158 -4.94911 6.54861 0.57188 -0.494062 0.654871 +5.50904 -3.54044 7.5575 0.565385 -0.3513 0.746276 +4.54816 2.92292 8.41254 0.464662 0.292785 0.835683 +5.95682 2.72039 7.5575 0.579121 0.264475 0.77115 +4.08589 3.54044 8.41254 0.393313 0.340807 0.853906 +2.92292 4.54816 8.41254 0.292785 0.464662 0.835683 +3.54044 4.08589 8.41254 0.355119 0.407643 0.84126 +2.72039 5.95682 7.5575 0.264475 0.579121 0.77115 +-2.92292 4.54816 8.41254 -0.292785 0.464662 0.835683 +-2.72039 5.95682 7.5575 -0.264475 0.579121 0.77115 +-3.54044 4.08589 8.41254 -0.355119 0.407643 0.84126 +-4.54816 2.92292 8.41254 -0.464662 0.292785 0.835683 +-4.08589 3.54044 8.41254 -0.393313 0.340807 0.853906 +-5.95682 2.72039 7.5575 -0.579121 0.264475 0.77115 +-4.54816 -2.92292 8.41254 -0.464662 -0.292785 0.835683 +-5.95682 -2.72039 7.5575 -0.579121 -0.264475 0.77115 +-4.08589 -3.54044 8.41254 -0.393313 -0.340807 0.853906 +-2.92292 -4.54816 8.41254 -0.292785 -0.464662 0.835683 +-3.54044 -4.08589 8.41254 -0.355119 -0.407643 0.84126 +-2.72039 -5.95682 7.5575 -0.264475 -0.579121 0.77115 +2.92292 -4.54816 8.41254 0.292785 -0.464662 0.835683 +2.72039 -5.95682 7.5575 0.264475 -0.579121 0.77115 +3.54044 -4.08589 8.41254 0.355119 -0.407643 0.84126 +4.54816 -2.92292 8.41254 0.464662 -0.292785 0.835683 +4.08589 -3.54044 8.41254 0.393313 -0.340807 0.853906 +5.95682 -2.72039 7.5575 0.579121 -0.264475 0.77115 +4.91784 2.2459 8.41254 0.483623 0.213308 0.848886 +3.77875 1.7257 9.09632 0.367349 0.17316 0.913822 +3.49469 2.2459 9.09632 0.356647 0.237372 0.90358 +2.2459 4.91784 8.41254 0.213308 0.483623 0.848886 +1.7257 3.77875 9.09632 0.17316 0.367349 0.913822 +2.2459 3.49469 9.09632 0.237372 0.356647 0.90358 +-2.2459 4.91784 8.41254 -0.213308 0.483623 0.848886 +-1.7257 3.77875 9.09632 -0.17316 0.367349 0.913822 +-2.2459 3.49469 9.09632 -0.237372 0.356647 0.90358 +-3.77875 1.7257 9.09632 -0.367349 0.17316 0.913822 +-3.49469 2.2459 9.09632 -0.356647 0.237372 0.90358 +-4.91784 2.2459 8.41254 -0.483623 0.213308 0.848886 +-4.91784 -2.2459 8.41254 -0.483623 -0.213308 0.848886 +-3.77875 -1.7257 9.09632 -0.367349 -0.17316 0.913822 +-3.49469 -2.2459 9.09632 -0.356647 -0.237372 0.90358 +-2.2459 -4.91784 8.41254 -0.213308 -0.483623 0.848886 +-1.7257 -3.77875 9.09632 -0.17316 -0.367349 0.913822 +-2.2459 -3.49469 9.09632 -0.237372 -0.356647 0.90358 +2.2459 -4.91784 8.41254 0.213308 -0.483623 0.848886 +1.7257 -3.77875 9.09632 0.17316 -0.367349 0.913822 +2.2459 -3.49469 9.09632 0.237372 -0.356647 0.90358 +3.77875 -1.7257 9.09632 0.367349 -0.17316 0.913822 +3.49469 -2.2459 9.09632 0.356647 -0.237372 0.90358 +4.91784 -2.2459 8.41254 0.483623 -0.213308 0.848886 +4.11187 0.591198 9.09632 0.389602 0.0560156 0.919278 +2.81733 0 9.59493 0.281727 1.0872e-018 0.959495 +4.15415 0 9.09632 0.436968 0 0.899477 +2.78865 0.400948 9.59493 0.27886 0.0400935 0.959495 +2.70321 0.793732 9.59493 0.28032 0.0800395 0.956564 +3.98588 1.17036 9.09632 0.419268 0.123109 0.899477 +0.591198 4.11187 9.09632 0.0560156 0.389602 0.919278 +0.793732 2.70321 9.59493 0.0800395 0.28032 0.956564 +1.17036 3.98588 9.09632 0.123109 0.419268 0.899477 +0.400948 2.78865 9.59493 0.0400935 0.27886 0.959495 +0 2.81733 9.59493 -1.30464e-018 0.281727 0.959495 +0 4.15415 9.09632 1.15968e-018 0.436968 0.899477 +-0.591198 4.11187 9.09632 -0.0560156 0.389602 0.919278 +-0.400948 2.78865 9.59493 -0.0400935 0.27886 0.959495 +-0.793732 2.70321 9.59493 -0.0800395 0.28032 0.956564 +-1.17036 3.98588 9.09632 -0.123109 0.419268 0.899477 +-4.11187 0.591198 9.09632 -0.389602 0.0560156 0.919278 +-2.70321 0.793732 9.59493 -0.28032 0.0800395 0.956564 +-3.98588 1.17036 9.09632 -0.419268 0.123109 0.899477 +-2.78865 0.400948 9.59493 -0.27886 0.0400935 0.959495 +-2.81733 0 9.59493 -0.281727 -4.34882e-019 0.959495 +-4.15415 0 9.09632 -0.436968 0 0.899477 +-4.11187 -0.591198 9.09632 -0.389602 -0.0560156 0.919278 +-2.78865 -0.400948 9.59493 -0.27886 -0.0400935 0.959495 +-2.70321 -0.793732 9.59493 -0.28032 -0.0800395 0.956564 +-3.98588 -1.17036 9.09632 -0.419268 -0.123109 0.899477 +-0.591198 -4.11187 9.09632 -0.0560156 -0.389602 0.919278 +-0.793732 -2.70321 9.59493 -0.0800395 -0.28032 0.956564 +-1.17036 -3.98588 9.09632 -0.123109 -0.419268 0.899477 +-0.400948 -2.78865 9.59493 -0.0400935 -0.27886 0.959495 +0 -2.81733 9.59493 6.52322e-019 -0.281727 0.959495 +0 -4.15415 9.09632 -1.15968e-018 -0.436968 0.899477 +0.591198 -4.11187 9.09632 0.0560156 -0.389602 0.919278 +0.400948 -2.78865 9.59493 0.0400935 -0.27886 0.959495 +0.793732 -2.70321 9.59493 0.0800395 -0.28032 0.956564 +1.17036 -3.98588 9.09632 0.123109 -0.419268 0.899477 +4.11187 -0.591198 9.09632 0.389602 -0.0560156 0.919278 +2.78865 -0.400948 9.59493 0.27886 -0.0400935 0.959495 +2.70321 -0.793732 9.59493 0.28032 -0.0800395 0.956564 +3.98588 -1.17036 9.09632 0.419268 -0.123109 0.899477 +-7.25137 -2.12919 -6.54861 -0.733532 -0.207834 -0.647098 +-7.25137 -2.12919 6.54861 -0.733532 -0.207834 0.647098 +-6.48195 -0.931965 -7.5575 -0.654909 -0.100366 -0.749014 +-7.48057 -1.07554 -6.54861 -0.758827 -0.0975079 -0.643952 +-7.5575 0 -6.54861 -0.73992 0 -0.672695 +-9.89822 0 -1.42315 -0.989821 1.74349e-018 -0.142319 +-10 0 0 -1 0 0 +-9.89822 0 1.42315 -0.989821 1.74349e-018 0.142319 +-7.48057 -1.07554 6.54861 -0.758827 -0.0975079 0.643952 +-7.5575 0 6.54861 -0.73992 -1.16073e-018 0.672695 +-6.48195 -0.931965 7.5575 -0.654909 -0.100366 0.749014 +-6.48195 0.931965 -7.5575 -0.654909 0.100366 -0.749014 +-7.48057 1.07554 -6.54861 -0.758827 0.0975079 -0.643952 +-6.54861 0 -7.5575 -0.636654 0 -0.77115 +-7.25137 2.12919 -6.54861 -0.733532 0.207834 -0.647098 +-7.48057 1.07554 6.54861 -0.758827 0.0975079 0.643952 +-7.25137 2.12919 6.54861 -0.733532 0.207834 0.647098 +-6.48195 0.931965 7.5575 -0.654909 0.100366 0.749014 +-6.54861 0 7.5575 -0.636654 0 0.77115 +7.25137 -2.12919 -6.54861 0.733532 -0.207834 -0.647098 +7.25137 -2.12919 6.54861 0.733532 -0.207834 0.647098 +6.54861 0 -7.5575 0.636654 1.16031e-018 -0.77115 +7.5575 0 -6.54861 0.73992 0 -0.672695 +6.48195 -0.931965 -7.5575 0.654909 -0.100366 -0.749014 +7.48057 -1.07554 -6.54861 0.758827 -0.0975079 -0.643952 +10 0 0 1 0 0 +9.89822 0 -1.42315 0.989821 -1.74349e-018 -0.142319 +9.89822 0 1.42315 0.989821 0 0.142319 +7.48057 -1.07554 6.54861 0.758827 -0.0975079 0.643952 +7.5575 0 6.54861 0.73992 1.16073e-018 0.672695 +6.54861 0 7.5575 0.636654 0 0.77115 +6.48195 -0.931965 7.5575 0.654909 -0.100366 0.749014 +6.48195 0.931965 -7.5575 0.654909 0.100366 -0.749014 +7.48057 1.07554 -6.54861 0.758827 0.0975079 -0.643952 +7.25137 2.12919 -6.54861 0.733532 0.207834 -0.647098 +7.48057 1.07554 6.54861 0.758827 0.0975079 0.643952 +7.25137 2.12919 6.54861 0.733532 0.207834 0.647098 +6.48195 0.931965 7.5575 0.654909 0.100366 0.749014 +-2.12919 -7.25137 -6.54861 -0.207834 -0.733532 -0.647098 +-2.12919 -7.25137 6.54861 -0.207834 -0.733532 0.647098 +-0.931965 -6.48195 -7.5575 -0.100366 -0.654909 -0.749014 +0 -7.5575 -6.54861 -1.16073e-018 -0.73992 -0.672695 +-1.07554 -7.48057 -6.54861 -0.0975079 -0.758827 -0.643952 +0 -9.89822 -1.42315 -1.74349e-018 -0.989821 -0.142319 +0 -10 0 0 -1 0 +0 -9.89822 1.42315 -1.74349e-018 -0.989821 0.142319 +-1.07554 -7.48057 6.54861 -0.0975079 -0.758827 0.643952 +0 -7.5575 6.54861 0 -0.73992 0.672695 +-0.931965 -6.48195 7.5575 -0.100366 -0.654909 0.749014 +0.931965 -6.48195 -7.5575 0.100366 -0.654909 -0.749014 +1.07554 -7.48057 -6.54861 0.0975079 -0.758827 -0.643952 +0 -6.54861 -7.5575 -1.16031e-018 -0.636654 -0.77115 +2.12919 -7.25137 -6.54861 0.207834 -0.733532 -0.647098 +1.07554 -7.48057 6.54861 0.0975079 -0.758827 0.643952 +2.12919 -7.25137 6.54861 0.207834 -0.733532 0.647098 +0.931965 -6.48195 7.5575 0.100366 -0.654909 0.749014 +0 -6.54861 7.5575 1.16031e-018 -0.636654 0.77115 +-2.12919 7.25137 -6.54861 -0.207834 0.733532 -0.647098 +-2.12919 7.25137 6.54861 -0.207834 0.733532 0.647098 +-0.931965 6.48195 -7.5575 -0.100366 0.654909 -0.749014 +-1.07554 7.48057 -6.54861 -0.0975079 0.758827 -0.643952 +0 7.5575 -6.54861 1.16073e-018 0.73992 -0.672695 +0 6.54861 -7.5575 0 0.636654 -0.77115 +0 9.89822 -1.42315 1.74349e-018 0.989821 -0.142319 +0 10 0 0 1 0 +0 9.89822 1.42315 1.74349e-018 0.989821 0.142319 +-1.07554 7.48057 6.54861 -0.0975079 0.758827 0.643952 +0 7.5575 6.54861 0 0.73992 0.672695 +-0.931965 6.48195 7.5575 -0.100366 0.654909 0.749014 +0 6.54861 7.5575 1.16031e-018 0.636654 0.77115 +0.931965 6.48195 -7.5575 0.100366 0.654909 -0.749014 +1.07554 7.48057 -6.54861 0.0975079 0.758827 -0.643952 +2.12919 7.25137 -6.54861 0.207834 0.733532 -0.647098 +1.07554 7.48057 6.54861 0.0975079 0.758827 0.643952 +2.12919 7.25137 6.54861 0.207834 0.733532 0.647098 +0.931965 6.48195 7.5575 0.100366 0.654909 0.749014 +-6.28334 -1.84495 -7.5575 -0.635743 -0.197237 -0.746276 +-6.28334 1.84495 -7.5575 -0.635743 0.197237 -0.746276 +-5.35138 -0.769413 -8.41254 -0.527455 -0.0696372 -0.846724 +-5.40641 0 -8.41254 -0.540629 -1.74046e-018 -0.841261 +-5.18741 -1.52316 -8.41254 -0.537823 -0.15792 -0.828135 +-5.18741 1.52316 -8.41254 -0.537823 0.15792 -0.828135 +-5.35138 0.769413 -8.41254 -0.527455 0.0696372 -0.846724 +-1.84495 -6.28334 -7.5575 -0.197237 -0.635743 -0.746276 +-2.72039 -3.1395 -9.09632 -0.273203 -0.312927 -0.909635 +-3.1395 -2.72039 -9.09632 -0.297469 -0.257758 -0.919278 +-1.84495 -2.12919 -9.59493 -0.18573 -0.211842 -0.959493 +-2.12919 -1.84495 -9.59493 -0.195571 -0.169467 -0.965936 +-2.56273 -1.17036 -9.59493 -0.235395 -0.107501 -0.965936 +-2.37009 -1.52316 -9.59493 -0.256174 -0.164635 -0.952507 +-2.37009 1.52316 -9.59493 -0.256174 0.164635 -0.952507 +-3.1395 2.72039 -9.09632 -0.297469 0.257758 -0.919278 +-2.12919 1.84495 -9.59493 -0.195571 0.169467 -0.965936 +-2.56273 1.17036 -9.59493 -0.235395 0.107501 -0.965936 +-2.72039 3.1395 -9.09632 -0.273203 0.312927 -0.909635 +-1.84495 2.12919 -9.59493 -0.18573 0.211842 -0.959493 +-1.84495 6.28334 -7.5575 -0.197237 0.635743 -0.746276 +0 -5.40641 -8.41254 0 -0.540629 -0.841261 +-0.769413 -5.35138 -8.41254 -0.0696372 -0.527455 -0.846724 +-1.52316 -5.18741 -8.41254 -0.15792 -0.537823 -0.828135 +-1.52316 -2.37009 -9.59493 -0.164635 -0.256174 -0.952507 +-1.17036 -2.56273 -9.59493 -0.107501 -0.235395 -0.965936 +-1.40866 -0.202534 -9.89822 -0.164175 -0.0236052 -0.986149 +-1.42315 0 -9.89822 -0.142311 -2.17408e-019 -0.989822 +0 0 -10 1.10675e-018 1.26486e-018 -1 +-1.3655 -0.400948 -9.89822 -0.149257 -0.0470025 -0.987681 +-1.29454 -0.591198 -9.89822 -0.129451 -0.0591175 -0.989822 +-1.19723 -0.769413 -9.89822 -0.139532 -0.0896732 -0.986149 +-1.07554 -0.931965 -9.89822 -0.107551 -0.0931952 -0.989822 +-0.931965 -1.07554 -9.89822 -0.10476 -0.116244 -0.98768 +-0.769413 -1.19723 -9.89822 -0.0896732 -0.139532 -0.986149 +-0.591198 -1.29454 -9.89822 -0.0591175 -0.129451 -0.989822 +-0.400948 -1.3655 -9.89822 -0.0470025 -0.149257 -0.987681 +-0.202534 -1.40866 -9.89822 -0.0236052 -0.164175 -0.986149 +0 -1.42315 -9.89822 -4.34817e-019 -0.142311 -0.989822 +-0.202534 1.40866 -9.89822 -0.0236052 0.164175 -0.986149 +0 1.42315 -9.89822 -2.17408e-019 0.142311 -0.989822 +-0.400948 1.3655 -9.89822 -0.0470025 0.149257 -0.987681 +-1.17036 2.56273 -9.59493 -0.107501 0.235395 -0.965936 +-0.591198 1.29454 -9.89822 -0.0591175 0.129451 -0.989822 +-0.769413 1.19723 -9.89822 -0.0896732 0.139532 -0.986149 +-1.52316 2.37009 -9.59493 -0.164635 0.256174 -0.952507 +-0.931965 1.07554 -9.89822 -0.10476 0.116244 -0.98768 +-1.07554 0.931965 -9.89822 -0.107551 0.0931952 -0.989822 +-1.19723 0.769413 -9.89822 -0.139532 0.0896732 -0.986149 +-1.29454 0.591198 -9.89822 -0.129451 0.0591175 -0.989822 +-1.3655 0.400948 -9.89822 -0.149257 0.0470025 -0.987681 +-1.40866 0.202534 -9.89822 -0.164175 0.0236052 -0.986149 +-0.769413 5.35138 -8.41254 -0.0696372 0.527455 -0.846724 +-1.52316 5.18741 -8.41254 -0.15792 0.537823 -0.828135 +0 5.40641 -8.41254 -1.74046e-018 0.540629 -0.841261 +1.84495 -6.28334 -7.5575 0.197237 -0.635743 -0.746276 +1.52316 -5.18741 -8.41254 0.15792 -0.537823 -0.828135 +0.769413 -5.35138 -8.41254 0.0696372 -0.527455 -0.846724 +1.17036 -2.56273 -9.59493 0.107501 -0.235395 -0.965936 +1.52316 -2.37009 -9.59493 0.164635 -0.256174 -0.952507 +1.84495 -2.12919 -9.59493 0.18573 -0.211842 -0.959493 +2.72039 -3.1395 -9.09632 0.273203 -0.312927 -0.909635 +0.202534 -1.40866 -9.89822 0.0236052 -0.164175 -0.986149 +0.400948 -1.3655 -9.89822 0.0470025 -0.149257 -0.987681 +0.591198 -1.29454 -9.89822 0.0591175 -0.129451 -0.989822 +0.769413 -1.19723 -9.89822 0.0896732 -0.139532 -0.986149 +0.931965 -1.07554 -9.89822 0.10476 -0.116244 -0.98768 +2.12919 -1.84495 -9.59493 0.195571 -0.169467 -0.965936 +1.07554 -0.931965 -9.89822 0.107551 -0.0931952 -0.989822 +1.19723 -0.769413 -9.89822 0.139532 -0.0896732 -0.986149 +2.37009 -1.52316 -9.59493 0.256174 -0.164635 -0.952507 +2.56273 -1.17036 -9.59493 0.235395 -0.107501 -0.965936 +1.29454 -0.591198 -9.89822 0.129451 -0.0591175 -0.989822 +1.3655 -0.400948 -9.89822 0.149257 -0.0470025 -0.987681 +1.40866 -0.202534 -9.89822 0.164175 -0.0236052 -0.986149 +1.42315 0 -9.89822 0.142311 0 -0.989822 +0.202534 1.40866 -9.89822 0.0236052 0.164175 -0.986149 +0.400948 1.3655 -9.89822 0.0470025 0.149257 -0.987681 +1.17036 2.56273 -9.59493 0.107501 0.235395 -0.965936 +0.591198 1.29454 -9.89822 0.0591175 0.129451 -0.989822 +0.769413 1.19723 -9.89822 0.0896732 0.139532 -0.986149 +1.52316 2.37009 -9.59493 0.164635 0.256174 -0.952507 +1.84495 2.12919 -9.59493 0.18573 0.211842 -0.959493 +1.40866 0.202534 -9.89822 0.164175 0.0236052 -0.986149 +1.3655 0.400948 -9.89822 0.149257 0.0470025 -0.987681 +1.29454 0.591198 -9.89822 0.129451 0.0591175 -0.989822 +2.56273 1.17036 -9.59493 0.235395 0.107501 -0.965936 +1.19723 0.769413 -9.89822 0.139532 0.0896732 -0.986149 +1.07554 0.931965 -9.89822 0.107551 0.0931952 -0.989822 +2.12919 1.84495 -9.59493 0.195571 0.169467 -0.965936 +2.37009 1.52316 -9.59493 0.256174 0.164635 -0.952507 +0.931965 1.07554 -9.89822 0.10476 0.116244 -0.98768 +2.72039 3.1395 -9.09632 0.273203 0.312927 -0.909635 +1.52316 5.18741 -8.41254 0.15792 0.537823 -0.828135 +0.769413 5.35138 -8.41254 0.0696372 0.527455 -0.846724 +1.84495 6.28334 -7.5575 0.197237 0.635743 -0.746276 +3.1395 -2.72039 -9.09632 0.297469 -0.257758 -0.919278 +5.35138 -0.769413 -8.41254 0.527455 -0.0696372 -0.846724 +5.18741 -1.52316 -8.41254 0.537823 -0.15792 -0.828135 +3.1395 2.72039 -9.09632 0.297469 0.257758 -0.919278 +5.18741 1.52316 -8.41254 0.537823 0.15792 -0.828135 +5.35138 0.769413 -8.41254 0.527455 0.0696372 -0.846724 +5.40641 0 -8.41254 0.540629 0 -0.841261 +6.28334 -1.84495 -7.5575 0.635743 -0.197237 -0.746276 +6.28334 1.84495 -7.5575 0.635743 0.197237 -0.746276 +-6.28334 -1.84495 7.5575 -0.635743 -0.197237 0.746276 +-6.28334 1.84495 7.5575 -0.635743 0.197237 0.746276 +-5.35138 -0.769413 8.41254 -0.527455 -0.0696372 0.846724 +-5.40641 0 8.41254 -0.540629 -1.74046e-018 0.841261 +-5.18741 -1.52316 8.41254 -0.537823 -0.15792 0.828135 +-5.18741 1.52316 8.41254 -0.537823 0.15792 0.828135 +-5.35138 0.769413 8.41254 -0.527455 0.0696372 0.846724 +-1.84495 -6.28334 7.5575 -0.197237 -0.635743 0.746276 +-2.72039 -3.1395 9.09632 -0.273203 -0.312927 0.909635 +-3.1395 -2.72039 9.09632 -0.297469 -0.257758 0.919278 +-1.84495 -2.12919 9.59493 -0.18573 -0.211842 0.959493 +-2.12919 -1.84495 9.59493 -0.195571 -0.169467 0.965936 +-2.37009 -1.52316 9.59493 -0.256174 -0.164635 0.952507 +-2.56273 -1.17036 9.59493 -0.235395 -0.107501 0.965936 +-2.37009 1.52316 9.59493 -0.256174 0.164635 0.952507 +-3.1395 2.72039 9.09632 -0.297469 0.257758 0.919278 +-2.12919 1.84495 9.59493 -0.195571 0.169467 0.965936 +-2.56273 1.17036 9.59493 -0.235395 0.107501 0.965936 +-2.72039 3.1395 9.09632 -0.273203 0.312927 0.909635 +-1.84495 2.12919 9.59493 -0.18573 0.211842 0.959493 +-1.84495 6.28334 7.5575 -0.197237 0.635743 0.746276 +-1.52316 -5.18741 8.41254 -0.15792 -0.537823 0.828135 +-0.769413 -5.35138 8.41254 -0.0696372 -0.527455 0.846724 +0 -5.40641 8.41254 0 -0.540629 0.841261 +-1.52316 -2.37009 9.59493 -0.164635 -0.256174 0.952507 +-1.17036 -2.56273 9.59493 -0.107501 -0.235395 0.965936 +0 -1.42315 9.89822 0 -0.142311 0.989822 +0 0 10 -2.03563e-018 -1.58107e-018 1 +-0.202534 -1.40866 9.89822 -0.0236052 -0.164175 0.986149 +-0.400948 -1.3655 9.89822 -0.0470025 -0.149257 0.987681 +-0.591198 -1.29454 9.89822 -0.0591175 -0.129451 0.989822 +-0.769413 -1.19723 9.89822 -0.0896732 -0.139532 0.986149 +-0.931965 -1.07554 9.89822 -0.10476 -0.116244 0.98768 +-1.07554 -0.931965 9.89822 -0.107551 -0.0931952 0.989822 +-1.19723 -0.769413 9.89822 -0.139532 -0.0896732 0.986149 +-1.29454 -0.591198 9.89822 -0.129451 -0.0591175 0.989822 +-1.3655 -0.400948 9.89822 -0.149257 -0.0470025 0.987681 +-1.40866 -0.202534 9.89822 -0.164175 -0.0236052 0.986149 +-1.42315 0 9.89822 -0.142311 -4.34817e-019 0.989822 +-1.40866 0.202534 9.89822 -0.164175 0.0236052 0.986149 +-1.3655 0.400948 9.89822 -0.149257 0.0470025 0.987681 +-1.29454 0.591198 9.89822 -0.129451 0.0591175 0.989822 +-1.19723 0.769413 9.89822 -0.139532 0.0896732 0.986149 +-1.07554 0.931965 9.89822 -0.107551 0.0931952 0.989822 +-0.931965 1.07554 9.89822 -0.10476 0.116244 0.98768 +-0.769413 1.19723 9.89822 -0.0896732 0.139532 0.986149 +-0.591198 1.29454 9.89822 -0.0591175 0.129451 0.989822 +-0.400948 1.3655 9.89822 -0.0470025 0.149257 0.987681 +-0.202534 1.40866 9.89822 -0.0236052 0.164175 0.986149 +0 1.42315 9.89822 -4.34817e-019 0.142311 0.989822 +-1.17036 2.56273 9.59493 -0.107501 0.235395 0.965936 +-1.52316 2.37009 9.59493 -0.164635 0.256174 0.952507 +-1.52316 5.18741 8.41254 -0.15792 0.537823 0.828135 +-0.769413 5.35138 8.41254 -0.0696372 0.527455 0.846724 +0 5.40641 8.41254 0 0.540629 0.841261 +1.84495 -6.28334 7.5575 0.197237 -0.635743 0.746276 +0.769413 -5.35138 8.41254 0.0696372 -0.527455 0.846724 +1.52316 -5.18741 8.41254 0.15792 -0.537823 0.828135 +1.17036 -2.56273 9.59493 0.107501 -0.235395 0.965936 +1.52316 -2.37009 9.59493 0.164635 -0.256174 0.952507 +2.72039 -3.1395 9.09632 0.273203 -0.312927 0.909635 +1.84495 -2.12919 9.59493 0.18573 -0.211842 0.959493 +1.42315 0 9.89822 0.142311 -2.17408e-019 0.989822 +1.40866 -0.202534 9.89822 0.164175 -0.0236052 0.986149 +1.3655 -0.400948 9.89822 0.149257 -0.0470025 0.987681 +1.29454 -0.591198 9.89822 0.129451 -0.0591175 0.989822 +1.19723 -0.769413 9.89822 0.139532 -0.0896732 0.986149 +1.07554 -0.931965 9.89822 0.107551 -0.0931952 0.989822 +0.931965 -1.07554 9.89822 0.10476 -0.116244 0.98768 +0.769413 -1.19723 9.89822 0.0896732 -0.139532 0.986149 +0.591198 -1.29454 9.89822 0.0591175 -0.129451 0.989822 +0.400948 -1.3655 9.89822 0.0470025 -0.149257 0.987681 +0.202534 -1.40866 9.89822 0.0236052 -0.164175 0.986149 +2.56273 -1.17036 9.59493 0.235395 -0.107501 0.965936 +2.37009 -1.52316 9.59493 0.256174 -0.164635 0.952507 +2.12919 -1.84495 9.59493 0.195571 -0.169467 0.965936 +1.40866 0.202534 9.89822 0.164175 0.0236052 0.986149 +1.3655 0.400948 9.89822 0.149257 0.0470025 0.987681 +2.56273 1.17036 9.59493 0.235395 0.107501 0.965936 +1.29454 0.591198 9.89822 0.129451 0.0591175 0.989822 +1.19723 0.769413 9.89822 0.139532 0.0896732 0.986149 +2.37009 1.52316 9.59493 0.256174 0.164635 0.952507 +2.12919 1.84495 9.59493 0.195571 0.169467 0.965936 +1.07554 0.931965 9.89822 0.107551 0.0931952 0.989822 +0.931965 1.07554 9.89822 0.10476 0.116244 0.98768 +1.84495 2.12919 9.59493 0.18573 0.211842 0.959493 +1.52316 2.37009 9.59493 0.164635 0.256174 0.952507 +0.769413 1.19723 9.89822 0.0896732 0.139532 0.986149 +0.591198 1.29454 9.89822 0.0591175 0.129451 0.989822 +1.17036 2.56273 9.59493 0.107501 0.235395 0.965936 +0.400948 1.3655 9.89822 0.0470025 0.149257 0.987681 +0.202534 1.40866 9.89822 0.0236052 0.164175 0.986149 +2.72039 3.1395 9.09632 0.273203 0.312927 0.909635 +1.52316 5.18741 8.41254 0.15792 0.537823 0.828135 +0.769413 5.35138 8.41254 0.0696372 0.527455 0.846724 +1.84495 6.28334 7.5575 0.197237 0.635743 0.746276 +3.1395 -2.72039 9.09632 0.297469 -0.257758 0.919278 +5.18741 -1.52316 8.41254 0.537823 -0.15792 0.828135 +5.35138 -0.769413 8.41254 0.527455 -0.0696372 0.846724 +3.1395 2.72039 9.09632 0.297469 0.257758 0.919278 +5.18741 1.52316 8.41254 0.537823 0.15792 0.828135 +5.35138 0.769413 8.41254 0.527455 0.0696372 0.846724 +5.40641 0 8.41254 0.540629 -1.74046e-018 0.841261 +6.28334 -1.84495 7.5575 0.635743 -0.197237 0.746276 +6.28334 1.84495 7.5575 0.635743 0.197237 0.746276 diff -Nru cgal-4.7/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd cgal-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd --- cgal-4.7/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cmd 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1 @@ +data/kitten.xyz kitten_poisson-20-100-0.5.off -sm_distance 0.5 diff -Nru cgal-4.7/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp cgal-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp --- cgal-4.7/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -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 // must be included before kernel +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +// 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 Point_with_normal; +typedef Kernel::Sphere_3 Sphere; +typedef std::deque PointList; + +// polyhedron +typedef CGAL::Polyhedron_3 Polyhedron; + +// Poisson implicit function +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; + +// Surface mesher +typedef CGAL::Surface_mesh_default_triangulation_3 STr; +typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; +typedef CGAL::Poisson_implicit_surface_3 Surface_3; + +// AABB tree +typedef CGAL::AABB_face_graph_triangle_primitive Primitive; +typedef CGAL::AABB_traits AABB_traits; +typedef CGAL::AABB_tree 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 Radius upper bound (default=100 * average spacing)\n"; + std::cerr << " -sm_distance 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::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::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 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=("< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +// Types +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::FT FT; +typedef Kernel::Point_3 Point; +typedef CGAL::Point_with_normal_3 Point_with_normal; +typedef Kernel::Sphere_3 Sphere; +typedef std::vector PointList; +typedef CGAL::Polyhedron_3 Polyhedron; +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; +typedef CGAL::Surface_mesh_default_triangulation_3 STr; +typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; +typedef CGAL::Implicit_surface_3 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 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 -Nru cgal-4.7/examples/Polygon_mesh_processing/CMakeLists.txt cgal-4.8/examples/Polygon_mesh_processing/CMakeLists.txt --- cgal-4.7/examples/Polygon_mesh_processing/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -13,8 +13,6 @@ endif() endif() -set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) - if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) @@ -82,6 +80,7 @@ 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" ) diff -Nru cgal-4.7/examples/Polygon_mesh_processing/connected_components_example.cpp cgal-4.8/examples/Polygon_mesh_processing/connected_components_example.cpp --- cgal-4.7/examples/Polygon_mesh_processing/connected_components_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/connected_components_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -117,6 +117,11 @@ << " 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, bound))); + std::cerr << "- We keep the two largest components" << std::endl; PMP::keep_largest_connected_components(mesh, 2, diff -Nru cgal-4.7/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp cgal-4.8/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp --- cgal-4.7/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,71 @@ +#include +#include +#include + +#include +#include + +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Surface_mesh Mesh; + +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::edge_descriptor edge_descriptor; + +namespace PMP = CGAL::Polygon_mesh_processing; + +struct halfedge2edge +{ + halfedge2edge(const Mesh& m, std::vector& 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& 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 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 -Nru cgal-4.7/examples/Polygon_mesh_processing/polygon_soup_example.cpp cgal-4.8/examples/Polygon_mesh_processing/polygon_soup_example.cpp --- cgal-4.7/examples/Polygon_mesh_processing/polygon_soup_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/polygon_soup_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,8 +1,8 @@ #include #include #include +#include #include - #include #include #include @@ -38,7 +38,7 @@ Polyhedron mesh; CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(points, polygons, mesh); - if (!CGAL::Polygon_mesh_processing::is_outward_oriented(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"); diff -Nru cgal-4.7/examples/Polygon_mesh_processing/stitch_borders_example.cpp cgal-4.8/examples/Polygon_mesh_processing/stitch_borders_example.cpp --- cgal-4.7/examples/Polygon_mesh_processing/stitch_borders_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/stitch_borders_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -1,6 +1,7 @@ #include #include +#include #include #include diff -Nru cgal-4.7/examples/Polygon_mesh_processing/triangulate_faces_example.cpp cgal-4.8/examples/Polygon_mesh_processing/triangulate_faces_example.cpp --- cgal-4.7/examples/Polygon_mesh_processing/triangulate_faces_example.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/triangulate_faces_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -4,6 +4,8 @@ #include +#include + #include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; @@ -13,6 +15,7 @@ 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; @@ -24,9 +27,14 @@ CGAL::Polygon_mesh_processing::triangulate_faces(mesh); - std::ofstream cube_off("P_tri.off"); + // Confirm that all faces are triangles. + BOOST_FOREACH(boost::graph_traits::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; - cube_off.close(); return 0; } diff -Nru cgal-4.7/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp cgal-4.8/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp --- cgal-4.7/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polygon_mesh_processing/triangulate_faces_example_OM.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -16,6 +16,7 @@ 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; @@ -25,7 +26,8 @@ CGAL::Polygon_mesh_processing::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)). geom_traits(Kernel())); - OpenMesh::IO::write_mesh(mesh,"cube_tri.off"); + mesh.garbage_collection(); + OpenMesh::IO::write_mesh(mesh,outfilename); return 0; } diff -Nru cgal-4.7/examples/Polynomial/construction.cpp cgal-4.8/examples/Polynomial/construction.cpp --- cgal-4.7/examples/Polynomial/construction.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Polynomial/construction.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -11,7 +11,9 @@ 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; diff -Nru cgal-4.7/examples/Ridges_3/Compute_Ridges_Umbilics.cpp cgal-4.8/examples/Ridges_3/Compute_Ridges_Umbilics.cpp --- cgal-4.7/examples/Ridges_3/Compute_Ridges_Umbilics.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Ridges_3/Compute_Ridges_Umbilics.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -12,7 +12,7 @@ -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; #endif @@ -179,7 +179,7 @@ ///////////////MAIN/////////////////////////////////////////////////////// -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) int main(int argc, char *argv[]) #else int main() @@ -188,7 +188,7 @@ std::string if_name, of_name;// of_name same as if_name with '/' -> '_' try { -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#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() diff -Nru cgal-4.7/examples/Ridges_3/Ridges_Umbilics_SM.cpp cgal-4.8/examples/Ridges_3/Ridges_Umbilics_SM.cpp --- cgal-4.7/examples/Ridges_3/Ridges_Umbilics_SM.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Ridges_3/Ridges_Umbilics_SM.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -9,7 +9,7 @@ #include #include -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; #endif @@ -168,7 +168,7 @@ ///////////////MAIN/////////////////////////////////////////////////////// -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) int main(int argc, char *argv[]) #else int main() @@ -177,7 +177,7 @@ std::string if_name, of_name;// of_name same as if_name with '/' -> '_' try { -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#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() diff -Nru cgal-4.7/examples/Scale_space_reconstruction_3/CMakeLists.txt cgal-4.8/examples/Scale_space_reconstruction_3/CMakeLists.txt --- cgal-4.7/examples/Scale_space_reconstruction_3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/examples/Scale_space_reconstruction_3/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -29,6 +29,7 @@ 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() diff -Nru cgal-4.7/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd cgal-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd --- cgal-4.7/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cmd 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1 @@ +data/kitten.off diff -Nru cgal-4.7/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp cgal-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp --- cgal-4.7/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,69 @@ + +#include +#include + +#include + +#include + +#include +#include + +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 -Nru cgal-4.7/examples/Solver_interface/CMakeLists.txt cgal-4.8/examples/Solver_interface/CMakeLists.txt --- cgal-4.7/examples/Solver_interface/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Solver_interface/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Solver_interface/diagonalize_matrix.cpp cgal-4.8/examples/Solver_interface/diagonalize_matrix.cpp --- cgal-4.7/examples/Solver_interface/diagonalize_matrix.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Solver_interface/diagonalize_matrix.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,51 @@ +#include + +#ifdef CGAL_EIGEN3_ENABLED +#include +#else +#include +#endif + +typedef double FT; +typedef CGAL::cpp11::array Eigen_matrix; +typedef CGAL::cpp11::array Eigen_vector; +typedef CGAL::cpp11::array Eigen_three_vectors; + +// If Eigen is enabled, use it, otherwise fallback to the internal model +#ifdef CGAL_EIGEN3_ENABLED +typedef CGAL::Eigen_diagonalize_traits Diagonalize_traits; +#else +typedef CGAL::Diagonalize_traits 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 -Nru cgal-4.7/examples/Solver_interface/singular_value_decomposition.cpp cgal-4.8/examples/Solver_interface/singular_value_decomposition.cpp --- cgal-4.7/examples/Solver_interface/singular_value_decomposition.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Solver_interface/singular_value_decomposition.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,37 @@ +#ifdef CGAL_EIGEN3_ENABLED +#include +#include +#include +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 -Nru cgal-4.7/examples/Solver_interface/sparse_solvers.cpp cgal-4.8/examples/Solver_interface/sparse_solvers.cpp --- cgal-4.7/examples/Solver_interface/sparse_solvers.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Solver_interface/sparse_solvers.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,49 @@ +#include +#include + + +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(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 -Nru cgal-4.7/examples/Spatial_searching/CMakeLists.txt cgal-4.8/examples/Spatial_searching/CMakeLists.txt --- cgal-4.7/examples/Spatial_searching/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Spatial_searching/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -7,8 +7,6 @@ cmake_minimum_required(VERSION 2.8.11) -set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) - if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) @@ -70,6 +68,8 @@ 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" ) diff -Nru cgal-4.7/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp cgal-4.8/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp --- cgal-4.7/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Spatial_searching/searching_polyhedron_vertices_with_fuzzy_sphere.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,55 @@ +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; + +typedef CGAL::Polyhedron_3 Mesh; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +typedef boost::property_map::type Vertex_point_pmap; + +typedef CGAL::Search_traits_3 Traits_base; +typedef CGAL::Search_traits_adapter Traits; + +typedef CGAL::Kd_tree 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 fz(query, radius, epsilon); + + //collect vertices that are inside the sphere + std::list result; + tree.search(std::back_inserter(result), fz); + std::cout << "There are " << result.size() << " vertices inside the fuzzy sphere\n"; + + return 0; +} diff -Nru cgal-4.7/examples/Spatial_searching/searching_with_circular_query.cpp cgal-4.8/examples/Spatial_searching/searching_with_circular_query.cpp --- cgal-4.7/examples/Spatial_searching/searching_with_circular_query.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Spatial_searching/searching_with_circular_query.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -30,6 +30,12 @@ Point center(0.2, 0.2); Fuzzy_circle exact_range(center, 0.2); + boost::optional 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 result; tree.search(std::back_inserter( result ), exact_range); diff -Nru cgal-4.7/examples/Surface_mesh/sm_iterators.cpp cgal-4.8/examples/Surface_mesh/sm_iterators.cpp --- cgal-4.7/examples/Surface_mesh/sm_iterators.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh/sm_iterators.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -57,7 +57,7 @@ } // 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 + #ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR for(vertex_descriptor vd : m.vertices()){ std::cout << vd << std::endl; } diff -Nru cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example.cpp cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example.cpp --- cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,99 @@ +#include +#include +#include +#include +// HalfedgeGraph adapters for Polyhedron_3 +#include +#include + +#include + +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; + +typedef CGAL::Surface_mesh_deformation 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; + } + + // 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); + deform_mesh.insert_roi_vertices(vb, ve); + + // Select two control vertices ... + vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); + vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); + + // ... and insert them + 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 << "Error in preprocessing, 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); + + // Save the deformed mesh into a file + std::ofstream output("deform_1.off"); + output << mesh; + output.close(); + + // Add another control vertex which requires another call to preprocess + 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; + return 1; + } + + // Deform the mesh + 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 -Nru cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp --- cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,156 @@ +#include +#include +#include +#include +#include + +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 +#include +#include +// Halfedge adapters for Polyhedron_3 +#include +#include + +#include + +struct Custom_traits{ + typedef Custom_point_3 Point_3; + struct Plane_3{}; +}; + +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::halfedge_iterator halfedge_iterator; + +typedef std::map Internal_vertex_map; +typedef std::map Internal_hedge_map; + +typedef boost::associative_property_map Vertex_index_map; +typedef boost::associative_property_map Hedge_index_map; + +typedef CGAL::Surface_mesh_deformation 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 -Nru cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp --- cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_3 Point_3; +typedef CGAL::Surface_mesh Mesh; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_iterator halfedge_iterator; + +typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; + +int main() +{ + Mesh mesh; + std::ifstream in("data/plane.off"); + in >>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); + deform_mesh.insert_roi_vertices(vb, ve); + + // Select two control vertices ... + vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); + vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); + + // ... and insert them + 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 << "Error in preprocessing, 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); + + // Save the deformed mesh into a file + std::ofstream out1("deform_1.off"); + out1 << mesh; + + // Add another control vertex which requires another call to preprocess + 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; + return 1; + } + + // Deform the mesh + 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); + + std::ofstream out2("deform_2.off"); + out2 << mesh; + return 0; +} diff -Nru cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp --- cgal-4.7/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,83 @@ +#include +#include + +// HalfedgeGraph adapters +#include + +#include + +typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_iterator halfedge_iterator; + +typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; + +int main() +{ + Mesh mesh; + OpenMesh::IO::read_mesh(mesh, "data/plane.off"); + + // 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); + deform_mesh.insert_roi_vertices(vb, ve); + + // Select two control vertices ... + vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); + vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); + + // ... and insert them + 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 << "Error in preprocessing, 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); + + // Save the deformed mesh into a file + OpenMesh::IO::write_mesh(mesh,"deform_1.off"); + + // Add another control vertex which requires another call to preprocess + 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; + return 1; + } + + // Deform the mesh + 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); + + OpenMesh::IO::write_mesh(mesh,"deform_2.off"); +} diff -Nru cgal-4.7/examples/Surface_mesh_deformation/CMakeLists.txt cgal-4.8/examples/Surface_mesh_deformation/CMakeLists.txt --- cgal-4.7/examples/Surface_mesh_deformation/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp cgal-4.8/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp --- cgal-4.7/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/custom_weight_for_edges_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,85 @@ +#include +#include +#include +// HalfedgeGraph adapters for Polyhedron_3 +#include +#include + +#include + +#include +#include +#include + +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::halfedge_iterator halfedge_iterator; + +typedef std::map Internal_vertex_map; +typedef std::map Internal_hedge_map; + +typedef boost::associative_property_map Vertex_index_map; +typedef boost::associative_property_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* weight_map) : weight_map(weight_map) + { } + template + double operator()(halfedge_descriptor e, Polyhedron& /*P*/, VertexPointMap /*vpm*/) { + return (*weight_map)[e]; + } + std::map* weight_map; +}; + +typedef CGAL::Surface_mesh_deformation 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 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 -Nru cgal-4.7/examples/Surface_mesh_deformation/data/plane.off cgal-4.8/examples/Surface_mesh_deformation/data/plane.off --- cgal-4.7/examples/Surface_mesh_deformation/data/plane.off 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/data/plane.off 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,2443 @@ +COFF +841 1600 0 +-0.374972 0 -0.249956 192 192 192 255 +-0.249956 0 -0.249956 192 192 192 255 +-0.312464 0 -0.312464 192 192 192 255 +-0.249956 0 -0.374972 192 192 192 255 +-0.374972 0 -0.374972 192 192 192 255 +-0.124942 0 -0.249956 192 192 192 255 +-0.18745 0 -0.312464 192 192 192 255 +-0.124942 0 -0.374972 192 192 192 255 +1.49012e-008 0 -0.249956 192 192 192 255 +-0.0624345 0 -0.312464 192 192 192 255 +1.49012e-008 0 -0.374972 192 192 192 255 +-0.499986 0 -0.249956 192 192 192 255 +-0.437478 0 -0.312464 192 192 192 255 +-0.499986 0 -0.374972 192 192 192 255 +-0.625 0 -0.249956 192 192 192 255 +-0.562492 0 -0.312464 192 192 192 255 +-0.625 0 -0.374972 192 192 192 255 +-0.312464 0 -0.437478 192 192 192 255 +-0.249956 0 -0.499986 192 192 192 255 +-0.374972 0 -0.499986 192 192 192 255 +-0.18745 0 -0.437478 192 192 192 255 +-0.124942 0 -0.499986 192 192 192 255 +-0.0624345 0 -0.437478 192 192 192 255 +1.49012e-008 0 -0.499986 192 192 192 255 +-0.437478 0 -0.437478 192 192 192 255 +-0.499986 0 -0.499986 192 192 192 255 +-0.562492 0 -0.437478 192 192 192 255 +-0.625 0 -0.499986 192 192 192 255 +-0.312464 0 -0.562492 192 192 192 255 +-0.249956 0 -0.625 192 192 192 255 +-0.374972 0 -0.625 192 192 192 255 +-0.18745 0 -0.562492 192 192 192 255 +-0.124942 0 -0.625 192 192 192 255 +-0.0624345 0 -0.562492 192 192 192 255 +1.49012e-008 0 -0.625 192 192 192 255 +-0.437478 0 -0.562492 192 192 192 255 +-0.499986 0 -0.625 192 192 192 255 +-0.562492 0 -0.562492 192 192 192 255 +-0.625 0 -0.625 192 192 192 255 +-0.374972 0 8.03719e-008 192 192 192 255 +-0.249956 0 8.03719e-008 192 192 192 255 +-0.312464 0 -0.0624344 192 192 192 255 +-0.249956 0 -0.124942 192 192 192 255 +-0.374972 0 -0.124942 192 192 192 255 +-0.124942 0 -3.56804e-005 192 192 192 255 +-0.18745 0 -0.0624344 192 192 192 255 +-0.124942 0 -0.124942 192 192 192 255 +1.49012e-008 0 8.03719e-008 192 192 192 255 +-0.0624345 0 -0.0624344 192 192 192 255 +1.49012e-008 0 -0.124942 192 192 192 255 +-0.499986 -0 8.03719e-008 192 192 192 255 +-0.437478 0 -0.0624344 192 192 192 255 +-0.499986 0 -0.124942 192 192 192 255 +-0.625 0 8.03719e-008 192 192 192 255 +-0.562492 0 -0.0624344 192 192 192 255 +-0.625 0 -0.124942 192 192 192 255 +-0.312464 0 -0.18745 192 192 192 255 +-0.18745 0 -0.18745 192 192 192 255 +-0.0624345 0 -0.18745 192 192 192 255 +-0.437478 0 -0.18745 192 192 192 255 +-0.562492 0 -0.18745 192 192 192 255 +0.249956 0 -0.249956 192 192 192 255 +0.374972 0 -0.249956 192 192 192 255 +0.312464 0 -0.312464 192 192 192 255 +0.374972 0 -0.374972 192 192 192 255 +0.249956 0 -0.374972 192 192 192 255 +0.499986 0 -0.249956 192 192 192 255 +0.437478 0 -0.312464 192 192 192 255 +0.499986 0 -0.374972 192 192 192 255 +0.625 0 -0.249956 192 192 192 255 +0.562492 0 -0.312464 192 192 192 255 +0.625 0 -0.374972 192 192 192 255 +0.124942 -0 -0.249956 192 192 192 255 +0.18745 0 -0.312464 192 192 192 255 +0.124942 0 -0.374972 192 192 192 255 +0.0624345 0 -0.312464 192 192 192 255 +0.312464 0 -0.437478 192 192 192 255 +0.374972 0 -0.499986 192 192 192 255 +0.249956 0 -0.499986 192 192 192 255 +0.437478 0 -0.437478 192 192 192 255 +0.499986 0 -0.499986 192 192 192 255 +0.562492 0 -0.437478 192 192 192 255 +0.625 0 -0.499986 192 192 192 255 +0.18745 0 -0.437478 192 192 192 255 +0.124942 0 -0.499986 192 192 192 255 +0.0624345 0 -0.437478 192 192 192 255 +0.312464 0 -0.562492 192 192 192 255 +0.374972 0 -0.625 192 192 192 255 +0.249956 0 -0.625 192 192 192 255 +0.437478 0 -0.562492 192 192 192 255 +0.499986 0 -0.625 192 192 192 255 +0.562492 0 -0.562492 192 192 192 255 +0.625 0 -0.625 192 192 192 255 +0.18745 0 -0.562492 192 192 192 255 +0.124942 0 -0.625 192 192 192 255 +0.0624345 0 -0.562492 192 192 192 255 +0.249956 0 8.03719e-008 192 192 192 255 +0.374972 0 8.03719e-008 192 192 192 255 +0.312464 0 -0.0624344 192 192 192 255 +0.374972 0 -0.124942 192 192 192 255 +0.249956 0 -0.124942 192 192 192 255 +0.499986 0 8.03719e-008 192 192 192 255 +0.437478 0 -0.0624344 192 192 192 255 +0.499986 0 -0.124942 192 192 192 255 +0.625 0 8.03719e-008 192 192 192 255 +0.562492 0 -0.0624344 192 192 192 255 +0.625 0 -0.124942 192 192 192 255 +0.124942 0 8.03719e-008 192 192 192 255 +0.18745 0 -0.0624344 192 192 192 255 +0.124942 0 -0.124942 192 192 192 255 +0.0624345 0 -0.0624344 192 192 192 255 +0.312464 0 -0.18745 192 192 192 255 +0.437478 0 -0.18745 192 192 192 255 +0.562492 0 -0.18745 192 192 192 255 +0.18745 0 -0.18745 192 192 192 255 +0.0624345 0 -0.18745 192 192 192 255 +0.249956 0 0.374972 192 192 192 255 +0.374972 0 0.374972 192 192 192 255 +0.312464 0 0.312464 192 192 192 255 +0.374972 0 0.249956 192 192 192 255 +0.249956 0 0.249956 192 192 192 255 +0.499986 0 0.374972 192 192 192 255 +0.437478 0 0.312464 192 192 192 255 +0.499986 0 0.249956 192 192 192 255 +0.625 0 0.374972 192 192 192 255 +0.562492 0 0.312464 192 192 192 255 +0.625 0 0.249956 192 192 192 255 +0.124942 0 0.374972 192 192 192 255 +0.18745 0 0.312464 192 192 192 255 +0.124942 0 0.249956 192 192 192 255 +1.49012e-008 0 0.374972 192 192 192 255 +0.0624345 0 0.312464 192 192 192 255 +1.49012e-008 0 0.249956 192 192 192 255 +0.312464 0 0.18745 192 192 192 255 +0.374972 0 0.124942 192 192 192 255 +0.249956 0 0.124942 192 192 192 255 +0.437478 0 0.18745 192 192 192 255 +0.499986 0 0.124942 192 192 192 255 +0.562492 0 0.18745 192 192 192 255 +0.625 0 0.124942 192 192 192 255 +0.18745 0 0.18745 192 192 192 255 +0.124942 0 0.124942 192 192 192 255 +0.0624345 0 0.18745 192 192 192 255 +1.49012e-008 0 0.124942 192 192 192 255 +0.312464 0 0.0624346 192 192 192 255 +0.437478 0 0.0624346 192 192 192 255 +0.562492 0 0.0624346 192 192 192 255 +0.18745 0 0.0624346 192 192 192 255 +0.0624345 0 0.0624346 192 192 192 255 +0.249956 0 0.625 192 192 192 255 +0.374972 0 0.625 192 192 192 255 +0.312464 0 0.562492 192 192 192 255 +0.374972 0 0.499986 192 192 192 255 +0.249956 0 0.499986 192 192 192 255 +0.499986 0 0.625 192 192 192 255 +0.437478 0 0.562492 192 192 192 255 +0.499986 0 0.499986 192 192 192 255 +0.625 0 0.625 192 192 192 255 +0.562492 0 0.562492 192 192 192 255 +0.625 0 0.499986 192 192 192 255 +0.124942 0 0.625 192 192 192 255 +0.18745 0 0.562492 192 192 192 255 +0.124942 0 0.499986 192 192 192 255 +1.49012e-008 0 0.625 192 192 192 255 +0.0624345 0 0.562492 192 192 192 255 +1.49012e-008 0 0.499986 192 192 192 255 +0.312464 0 0.437478 192 192 192 255 +0.437478 0 0.437478 192 192 192 255 +0.562492 0 0.437478 192 192 192 255 +0.18745 0 0.437478 192 192 192 255 +0.0624345 0 0.437478 192 192 192 255 +-0.374972 0 0.374972 192 192 192 255 +-0.249956 0 0.374972 192 192 192 255 +-0.312464 0 0.312464 192 192 192 255 +-0.249956 0 0.249956 192 192 192 255 +-0.374972 0 0.249956 192 192 192 255 +-0.124942 0 0.374972 192 192 192 255 +-0.18745 0 0.312464 192 192 192 255 +-0.124942 0 0.249956 192 192 192 255 +-0.0624345 0 0.312464 192 192 192 255 +-0.499986 0 0.374972 192 192 192 255 +-0.437478 0 0.312464 192 192 192 255 +-0.499986 0 0.249956 192 192 192 255 +-0.625 0 0.374972 192 192 192 255 +-0.562492 0 0.312464 192 192 192 255 +-0.625 0 0.249956 192 192 192 255 +-0.312464 0 0.18745 192 192 192 255 +-0.249956 0 0.124942 192 192 192 255 +-0.374972 0 0.124942 192 192 192 255 +-0.18745 0 0.18745 192 192 192 255 +-0.124942 0 0.124942 192 192 192 255 +-0.0624345 0 0.18745 192 192 192 255 +-0.437478 0 0.18745 192 192 192 255 +-0.499986 0 0.124942 192 192 192 255 +-0.562492 0 0.18745 192 192 192 255 +-0.625 0 0.124942 192 192 192 255 +-0.312464 0 0.0624346 192 192 192 255 +-0.18745 0 0.0624346 192 192 192 255 +-0.0624345 0 0.0624346 192 192 192 255 +-0.437478 0 0.0624346 192 192 192 255 +-0.562492 0 0.0624346 192 192 192 255 +-0.374972 0 0.625 192 192 192 255 +-0.249956 0 0.625 192 192 192 255 +-0.312464 0 0.562492 192 192 192 255 +-0.249956 0 0.499986 192 192 192 255 +-0.374972 0 0.499986 192 192 192 255 +-0.124942 0 0.625 192 192 192 255 +-0.18745 0 0.562492 192 192 192 255 +-0.124942 0 0.499986 192 192 192 255 +-0.0624345 0 0.562492 192 192 192 255 +-0.499986 0 0.625 192 192 192 255 +-0.437478 0 0.562492 192 192 192 255 +-0.499986 0 0.499986 192 192 192 255 +-0.625 0 0.625 192 192 192 255 +-0.562492 0 0.562492 192 192 192 255 +-0.625 0 0.499986 192 192 192 255 +-0.312464 0 0.437478 192 192 192 255 +-0.18745 0 0.437478 192 192 192 255 +-0.0624345 0 0.437478 192 192 192 255 +-0.437478 0 0.437478 192 192 192 255 +-0.562492 0 0.437478 192 192 192 255 +-0.312464 0 -0.249956 192 192 192 255 +-0.343718 0 -0.28121 192 192 192 255 +-0.28121 0 -0.28121 192 192 192 255 +-0.249956 0 -0.312464 192 192 192 255 +-0.28121 0 -0.343718 192 192 192 255 +-0.312464 0 -0.374972 192 192 192 255 +-0.343718 0 -0.343718 192 192 192 255 +-0.374972 0 -0.312464 192 192 192 255 +-0.187449 0 -0.249956 192 192 192 255 +-0.218703 0 -0.28121 192 192 192 255 +-0.156196 0 -0.28121 192 192 192 255 +-0.124942 0 -0.312464 192 192 192 255 +-0.156196 0 -0.343718 192 192 192 255 +-0.187449 0 -0.374972 192 192 192 255 +-0.218703 0 -0.343718 192 192 192 255 +-0.0624712 0 -0.249956 192 192 192 255 +-0.0936884 0 -0.28121 192 192 192 255 +-0.0312172 0 -0.28121 192 192 192 255 +1.49012e-008 0 -0.312464 192 192 192 255 +-0.0312172 0 -0.343718 192 192 192 255 +-0.0624712 0 -0.374972 192 192 192 255 +-0.0936884 0 -0.343718 192 192 192 255 +-0.437479 0 -0.249956 192 192 192 255 +-0.468732 0 -0.28121 192 192 192 255 +-0.406225 0 -0.28121 192 192 192 255 +-0.406225 0 -0.343718 192 192 192 255 +-0.437479 0 -0.374972 192 192 192 255 +-0.468732 0 -0.343718 192 192 192 255 +-0.499986 0 -0.312464 192 192 192 255 +-0.562493 0 -0.249956 192 192 192 255 +-0.593746 0 -0.28121 192 192 192 255 +-0.531239 0 -0.28121 192 192 192 255 +-0.531239 0 -0.343718 192 192 192 255 +-0.562493 0 -0.374972 192 192 192 255 +-0.593746 0 -0.343718 192 192 192 255 +-0.625 0 -0.312464 192 192 192 255 +-0.343718 0 -0.406225 192 192 192 255 +-0.28121 0 -0.406225 192 192 192 255 +-0.249956 0 -0.437479 192 192 192 255 +-0.28121 0 -0.468732 192 192 192 255 +-0.312464 0 -0.499986 192 192 192 255 +-0.343718 0 -0.468732 192 192 192 255 +-0.374972 0 -0.437479 192 192 192 255 +-0.218703 0 -0.406225 192 192 192 255 +-0.156196 0 -0.406225 192 192 192 255 +-0.124942 0 -0.437479 192 192 192 255 +-0.156196 0 -0.468732 192 192 192 255 +-0.187449 0 -0.499986 192 192 192 255 +-0.218703 0 -0.468732 192 192 192 255 +-0.0936884 0 -0.406225 192 192 192 255 +-0.0312172 0 -0.406225 192 192 192 255 +1.49012e-008 0 -0.437479 192 192 192 255 +-0.0312172 0 -0.468732 192 192 192 255 +-0.0624712 0 -0.499986 192 192 192 255 +-0.0936884 0 -0.468732 192 192 192 255 +-0.468732 0 -0.406225 192 192 192 255 +-0.406225 0 -0.406225 192 192 192 255 +-0.406225 0 -0.468732 192 192 192 255 +-0.437479 0 -0.499986 192 192 192 255 +-0.468732 0 -0.468732 192 192 192 255 +-0.499986 0 -0.437479 192 192 192 255 +-0.593746 0 -0.406225 192 192 192 255 +-0.531239 0 -0.406225 192 192 192 255 +-0.531239 0 -0.468732 192 192 192 255 +-0.562493 0 -0.499986 192 192 192 255 +-0.593746 0 -0.468732 192 192 192 255 +-0.625 0 -0.437479 192 192 192 255 +-0.343718 0 -0.531239 192 192 192 255 +-0.28121 0 -0.531239 192 192 192 255 +-0.249956 0 -0.562493 192 192 192 255 +-0.28121 0 -0.593746 192 192 192 255 +-0.312464 0 -0.625 192 192 192 255 +-0.343718 0 -0.593746 192 192 192 255 +-0.374972 0 -0.562493 192 192 192 255 +-0.218703 0 -0.531239 192 192 192 255 +-0.156196 0 -0.531239 192 192 192 255 +-0.124942 0 -0.562493 192 192 192 255 +-0.156196 0 -0.593746 192 192 192 255 +-0.187449 0 -0.625 192 192 192 255 +-0.218703 0 -0.593746 192 192 192 255 +-0.0936884 0 -0.531239 192 192 192 255 +-0.0312172 0 -0.531239 192 192 192 255 +1.49012e-008 0 -0.562493 192 192 192 255 +-0.0312172 0 -0.593746 192 192 192 255 +-0.0624712 0 -0.625 192 192 192 255 +-0.0936884 0 -0.593746 192 192 192 255 +-0.468732 0 -0.531239 192 192 192 255 +-0.406225 0 -0.531239 192 192 192 255 +-0.406225 0 -0.593746 192 192 192 255 +-0.437479 0 -0.625 192 192 192 255 +-0.468732 0 -0.593746 192 192 192 255 +-0.499986 0 -0.562493 192 192 192 255 +-0.593746 0 -0.531239 192 192 192 255 +-0.531239 0 -0.531239 192 192 192 255 +-0.531239 0 -0.593746 192 192 192 255 +-0.562493 0 -0.625 192 192 192 255 +-0.593746 0 -0.593746 192 192 192 255 +-0.625 0 -0.562493 192 192 192 255 +-0.312464 0 8.03719e-008 192 192 192 255 +-0.343718 0 -0.0312172 192 192 192 255 +-0.28121 0 -0.0312172 192 192 192 255 +-0.249956 0 -0.0624711 192 192 192 255 +-0.28121 0 -0.0936884 192 192 192 255 +-0.312464 0 -0.124942 192 192 192 255 +-0.343718 0 -0.0936884 192 192 192 255 +-0.374972 0 -0.0624711 192 192 192 255 +-0.187449 0 -1.78e-005 192 192 192 255 +-0.218703 0 -0.0312172 192 192 192 255 +-0.156196 0 -0.0312351 192 192 192 255 +-0.124942 0 -0.062489 192 192 192 255 +-0.156196 0 -0.0936884 192 192 192 255 +-0.187449 0 -0.124942 192 192 192 255 +-0.218703 0 -0.0936884 192 192 192 255 +-0.0624712 0 -1.78e-005 192 192 192 255 +-0.0936884 0 -0.0312351 192 192 192 255 +-0.0312172 0 -0.0312172 192 192 192 255 +1.49012e-008 0 -0.0624711 192 192 192 255 +-0.0312172 0 -0.0936884 192 192 192 255 +-0.0624712 0 -0.124942 192 192 192 255 +-0.0936884 0 -0.0936884 192 192 192 255 +-0.437479 0 8.03719e-008 192 192 192 255 +-0.468732 0 -0.0312172 192 192 192 255 +-0.406225 0 -0.0312172 192 192 192 255 +-0.406225 0 -0.0936884 192 192 192 255 +-0.437479 0 -0.124942 192 192 192 255 +-0.468732 0 -0.0936884 192 192 192 255 +-0.499986 0 -0.0624711 192 192 192 255 +-0.562493 0 8.03719e-008 192 192 192 255 +-0.593746 0 -0.0312172 192 192 192 255 +-0.531239 0 -0.0312172 192 192 192 255 +-0.531239 0 -0.0936884 192 192 192 255 +-0.562493 0 -0.124942 192 192 192 255 +-0.593746 0 -0.0936884 192 192 192 255 +-0.625 0 -0.0624711 192 192 192 255 +-0.343718 0 -0.156196 192 192 192 255 +-0.28121 0 -0.156196 192 192 192 255 +-0.249956 0 -0.187449 192 192 192 255 +-0.28121 0 -0.218703 192 192 192 255 +-0.343718 0 -0.218703 192 192 192 255 +-0.374972 0 -0.187449 192 192 192 255 +-0.218703 0 -0.156196 192 192 192 255 +-0.156196 0 -0.156196 192 192 192 255 +-0.124942 0 -0.187449 192 192 192 255 +-0.156196 0 -0.218703 192 192 192 255 +-0.218703 0 -0.218703 192 192 192 255 +-0.0936884 0 -0.156196 192 192 192 255 +-0.0312172 0 -0.156196 192 192 192 255 +1.49012e-008 0 -0.187449 192 192 192 255 +-0.0312172 0 -0.218703 192 192 192 255 +-0.0936884 0 -0.218703 192 192 192 255 +-0.468732 0 -0.156196 192 192 192 255 +-0.406225 0 -0.156196 192 192 192 255 +-0.406225 0 -0.218703 192 192 192 255 +-0.468732 0 -0.218703 192 192 192 255 +-0.499986 0 -0.187449 192 192 192 255 +-0.593746 0 -0.156196 192 192 192 255 +-0.531239 0 -0.156196 192 192 192 255 +-0.531239 0 -0.218703 192 192 192 255 +-0.593746 0 -0.218703 192 192 192 255 +-0.625 0 -0.187449 192 192 192 255 +0.312464 0 -0.249956 192 192 192 255 +0.28121 0 -0.28121 192 192 192 255 +0.343718 0 -0.28121 192 192 192 255 +0.374972 0 -0.312464 192 192 192 255 +0.343718 0 -0.343718 192 192 192 255 +0.312464 0 -0.374972 192 192 192 255 +0.28121 0 -0.343718 192 192 192 255 +0.249956 0 -0.312464 192 192 192 255 +0.437479 0 -0.249956 192 192 192 255 +0.406225 0 -0.28121 192 192 192 255 +0.468732 0 -0.28121 192 192 192 255 +0.499986 0 -0.312464 192 192 192 255 +0.468732 0 -0.343718 192 192 192 255 +0.437479 0 -0.374972 192 192 192 255 +0.406225 0 -0.343718 192 192 192 255 +0.562493 0 -0.249956 192 192 192 255 +0.531239 0 -0.28121 192 192 192 255 +0.593746 0 -0.28121 192 192 192 255 +0.625 0 -0.312464 192 192 192 255 +0.593746 0 -0.343718 192 192 192 255 +0.562493 0 -0.374972 192 192 192 255 +0.531239 0 -0.343718 192 192 192 255 +0.187449 0 -0.249956 192 192 192 255 +0.156196 0 -0.28121 192 192 192 255 +0.218703 0 -0.28121 192 192 192 255 +0.218703 0 -0.343718 192 192 192 255 +0.187449 0 -0.374972 192 192 192 255 +0.156196 0 -0.343718 192 192 192 255 +0.124942 0 -0.312464 192 192 192 255 +0.0624712 0 -0.249956 192 192 192 255 +0.0312173 0 -0.28121 192 192 192 255 +0.0936885 0 -0.28121 192 192 192 255 +0.0936885 0 -0.343718 192 192 192 255 +0.0624712 0 -0.374972 192 192 192 255 +0.0312173 0 -0.343718 192 192 192 255 +0.28121 0 -0.406225 192 192 192 255 +0.343718 0 -0.406225 192 192 192 255 +0.374972 0 -0.437479 192 192 192 255 +0.343718 0 -0.468732 192 192 192 255 +0.312464 0 -0.499986 192 192 192 255 +0.28121 0 -0.468732 192 192 192 255 +0.249956 0 -0.437479 192 192 192 255 +0.406225 0 -0.406225 192 192 192 255 +0.468732 0 -0.406225 192 192 192 255 +0.499986 0 -0.437479 192 192 192 255 +0.468732 0 -0.468732 192 192 192 255 +0.437479 0 -0.499986 192 192 192 255 +0.406225 0 -0.468732 192 192 192 255 +0.531239 0 -0.406225 192 192 192 255 +0.593746 0 -0.406225 192 192 192 255 +0.625 0 -0.437479 192 192 192 255 +0.593746 0 -0.468732 192 192 192 255 +0.562493 0 -0.499986 192 192 192 255 +0.531239 0 -0.468732 192 192 192 255 +0.156196 0 -0.406225 192 192 192 255 +0.218703 0 -0.406225 192 192 192 255 +0.218703 0 -0.468732 192 192 192 255 +0.187449 0 -0.499986 192 192 192 255 +0.156196 0 -0.468732 192 192 192 255 +0.124942 0 -0.437479 192 192 192 255 +0.0312173 0 -0.406225 192 192 192 255 +0.0936885 0 -0.406225 192 192 192 255 +0.0936885 0 -0.468732 192 192 192 255 +0.0624712 0 -0.499986 192 192 192 255 +0.0312173 0 -0.468732 192 192 192 255 +0.28121 0 -0.531239 192 192 192 255 +0.343718 0 -0.531239 192 192 192 255 +0.374972 0 -0.562493 192 192 192 255 +0.343718 0 -0.593746 192 192 192 255 +0.312464 0 -0.625 192 192 192 255 +0.28121 0 -0.593746 192 192 192 255 +0.249956 0 -0.562493 192 192 192 255 +0.406225 0 -0.531239 192 192 192 255 +0.468732 0 -0.531239 192 192 192 255 +0.499986 0 -0.562493 192 192 192 255 +0.468732 0 -0.593746 192 192 192 255 +0.437479 0 -0.625 192 192 192 255 +0.406225 0 -0.593746 192 192 192 255 +0.531239 0 -0.531239 192 192 192 255 +0.593746 0 -0.531239 192 192 192 255 +0.625 0 -0.562493 192 192 192 255 +0.593746 0 -0.593746 192 192 192 255 +0.562493 0 -0.625 192 192 192 255 +0.531239 0 -0.593746 192 192 192 255 +0.156196 0 -0.531239 192 192 192 255 +0.218703 0 -0.531239 192 192 192 255 +0.218703 0 -0.593746 192 192 192 255 +0.187449 0 -0.625 192 192 192 255 +0.156196 0 -0.593746 192 192 192 255 +0.124942 0 -0.562493 192 192 192 255 +0.0312173 0 -0.531239 192 192 192 255 +0.0936885 0 -0.531239 192 192 192 255 +0.0936885 0 -0.593746 192 192 192 255 +0.0624712 0 -0.625 192 192 192 255 +0.0312173 0 -0.593746 192 192 192 255 +0.312464 0 8.03719e-008 192 192 192 255 +0.28121 0 -0.0312172 192 192 192 255 +0.343718 0 -0.0312172 192 192 192 255 +0.374972 0 -0.0624711 192 192 192 255 +0.343718 0 -0.0936884 192 192 192 255 +0.312464 0 -0.124942 192 192 192 255 +0.28121 0 -0.0936884 192 192 192 255 +0.249956 0 -0.0624711 192 192 192 255 +0.437479 0 8.03719e-008 192 192 192 255 +0.406225 0 -0.0312172 192 192 192 255 +0.468732 0 -0.0312172 192 192 192 255 +0.499986 0 -0.0624711 192 192 192 255 +0.468732 0 -0.0936884 192 192 192 255 +0.437479 0 -0.124942 192 192 192 255 +0.406225 0 -0.0936884 192 192 192 255 +0.562493 0 8.03719e-008 192 192 192 255 +0.531239 0 -0.0312172 192 192 192 255 +0.593746 0 -0.0312172 192 192 192 255 +0.625 0 -0.0624711 192 192 192 255 +0.593746 0 -0.0936884 192 192 192 255 +0.562493 0 -0.124942 192 192 192 255 +0.531239 0 -0.0936884 192 192 192 255 +0.187449 0 8.03719e-008 192 192 192 255 +0.156196 0 -0.0312172 192 192 192 255 +0.218703 0 -0.0312172 192 192 192 255 +0.218703 0 -0.0936884 192 192 192 255 +0.187449 0 -0.124942 192 192 192 255 +0.156196 0 -0.0936884 192 192 192 255 +0.124942 0 -0.0624711 192 192 192 255 +0.0624712 0 8.03719e-008 192 192 192 255 +0.0312173 0 -0.0312172 192 192 192 255 +0.0936885 0 -0.0312172 192 192 192 255 +0.0936885 0 -0.0936884 192 192 192 255 +0.0624712 0 -0.124942 192 192 192 255 +0.0312173 0 -0.0936884 192 192 192 255 +0.28121 0 -0.156196 192 192 192 255 +0.343718 0 -0.156196 192 192 192 255 +0.374972 0 -0.187449 192 192 192 255 +0.343718 0 -0.218703 192 192 192 255 +0.28121 0 -0.218703 192 192 192 255 +0.249956 0 -0.187449 192 192 192 255 +0.406225 0 -0.156196 192 192 192 255 +0.468732 0 -0.156196 192 192 192 255 +0.499986 0 -0.187449 192 192 192 255 +0.468732 0 -0.218703 192 192 192 255 +0.406225 0 -0.218703 192 192 192 255 +0.531239 0 -0.156196 192 192 192 255 +0.593746 0 -0.156196 192 192 192 255 +0.625 0 -0.187449 192 192 192 255 +0.593746 0 -0.218703 192 192 192 255 +0.531239 0 -0.218703 192 192 192 255 +0.156196 0 -0.156196 192 192 192 255 +0.218703 0 -0.156196 192 192 192 255 +0.218703 0 -0.218703 192 192 192 255 +0.156196 0 -0.218703 192 192 192 255 +0.124942 0 -0.187449 192 192 192 255 +0.0312173 0 -0.156196 192 192 192 255 +0.0936885 0 -0.156196 192 192 192 255 +0.0936885 0 -0.218703 192 192 192 255 +0.0312173 0 -0.218703 192 192 192 255 +0.312464 0 0.374972 192 192 192 255 +0.28121 0 0.343718 192 192 192 255 +0.343718 0 0.343718 192 192 192 255 +0.374972 0 0.312464 192 192 192 255 +0.343718 0 0.28121 192 192 192 255 +0.312464 0 0.249956 192 192 192 255 +0.28121 0 0.28121 192 192 192 255 +0.249956 0 0.312464 192 192 192 255 +0.437479 0 0.374972 192 192 192 255 +0.406225 0 0.343718 192 192 192 255 +0.468732 0 0.343718 192 192 192 255 +0.499986 0 0.312464 192 192 192 255 +0.468732 0 0.28121 192 192 192 255 +0.437479 0 0.249956 192 192 192 255 +0.406225 0 0.28121 192 192 192 255 +0.562493 0 0.374972 192 192 192 255 +0.531239 0 0.343718 192 192 192 255 +0.593746 0 0.343718 192 192 192 255 +0.625 0 0.312464 192 192 192 255 +0.593746 0 0.28121 192 192 192 255 +0.562493 0 0.249956 192 192 192 255 +0.531239 0 0.28121 192 192 192 255 +0.187449 0 0.374972 192 192 192 255 +0.156196 0 0.343718 192 192 192 255 +0.218703 0 0.343718 192 192 192 255 +0.218703 0 0.28121 192 192 192 255 +0.187449 0 0.249956 192 192 192 255 +0.156196 0 0.28121 192 192 192 255 +0.124942 0 0.312464 192 192 192 255 +0.0624712 0 0.374972 192 192 192 255 +0.0312173 0 0.343718 192 192 192 255 +0.0936885 0 0.343718 192 192 192 255 +0.0936885 0 0.28121 192 192 192 255 +0.0624712 0 0.249956 192 192 192 255 +0.0312173 0 0.28121 192 192 192 255 +1.49012e-008 0 0.312464 192 192 192 255 +0.28121 0 0.218703 192 192 192 255 +0.343718 0 0.218703 192 192 192 255 +0.374972 0 0.187449 192 192 192 255 +0.343718 0 0.156196 192 192 192 255 +0.312464 0 0.124942 192 192 192 255 +0.28121 0 0.156196 192 192 192 255 +0.249956 0 0.187449 192 192 192 255 +0.406225 0 0.218703 192 192 192 255 +0.468732 0 0.218703 192 192 192 255 +0.499986 0 0.187449 192 192 192 255 +0.468732 0 0.156196 192 192 192 255 +0.437479 0 0.124942 192 192 192 255 +0.406225 0 0.156196 192 192 192 255 +0.531239 0 0.218703 192 192 192 255 +0.593746 0 0.218703 192 192 192 255 +0.625 0 0.187449 192 192 192 255 +0.593746 0 0.156196 192 192 192 255 +0.562493 0 0.124942 192 192 192 255 +0.531239 0 0.156196 192 192 192 255 +0.156196 0 0.218703 192 192 192 255 +0.218703 0 0.218703 192 192 192 255 +0.218703 0 0.156196 192 192 192 255 +0.187449 0 0.124942 192 192 192 255 +0.156196 0 0.156196 192 192 192 255 +0.124942 0 0.187449 192 192 192 255 +0.0312173 0 0.218703 192 192 192 255 +0.0936885 0 0.218703 192 192 192 255 +0.0936885 0 0.156196 192 192 192 255 +0.0624712 0 0.124942 192 192 192 255 +0.0312173 0 0.156196 192 192 192 255 +1.49012e-008 0 0.187449 192 192 192 255 +0.28121 0 0.0936885 192 192 192 255 +0.343718 0 0.0936885 192 192 192 255 +0.374972 0 0.0624713 192 192 192 255 +0.343718 0 0.0312173 192 192 192 255 +0.28121 0 0.0312173 192 192 192 255 +0.249956 0 0.0624713 192 192 192 255 +0.406225 0 0.0936885 192 192 192 255 +0.468732 0 0.0936885 192 192 192 255 +0.499986 0 0.0624713 192 192 192 255 +0.468732 0 0.0312173 192 192 192 255 +0.406225 0 0.0312173 192 192 192 255 +0.531239 0 0.0936885 192 192 192 255 +0.593746 0 0.0936885 192 192 192 255 +0.625 0 0.0624713 192 192 192 255 +0.593746 0 0.0312173 192 192 192 255 +0.531239 0 0.0312173 192 192 192 255 +0.156196 0 0.0936885 192 192 192 255 +0.218703 0 0.0936885 192 192 192 255 +0.218703 0 0.0312173 192 192 192 255 +0.156196 0 0.0312173 192 192 192 255 +0.124942 0 0.0624713 192 192 192 255 +0.0312173 0 0.0936885 192 192 192 255 +0.0936885 0 0.0936885 192 192 192 255 +0.0936885 0 0.0312173 192 192 192 255 +0.0312173 0 0.0312173 192 192 192 255 +1.49012e-008 0 0.0624713 192 192 192 255 +0.312464 0 0.625 192 192 192 255 +0.28121 0 0.593746 192 192 192 255 +0.343718 0 0.593746 192 192 192 255 +0.374972 0 0.562493 192 192 192 255 +0.343718 0 0.531239 192 192 192 255 +0.312464 0 0.499986 192 192 192 255 +0.28121 0 0.531239 192 192 192 255 +0.249956 0 0.562493 192 192 192 255 +0.437479 0 0.625 192 192 192 255 +0.406225 0 0.593746 192 192 192 255 +0.468732 0 0.593746 192 192 192 255 +0.499986 0 0.562493 192 192 192 255 +0.468732 0 0.531239 192 192 192 255 +0.437479 0 0.499986 192 192 192 255 +0.406225 0 0.531239 192 192 192 255 +0.562493 0 0.625 192 192 192 255 +0.531239 0 0.593746 192 192 192 255 +0.593746 0 0.593746 192 192 192 255 +0.625 0 0.562493 192 192 192 255 +0.593746 0 0.531239 192 192 192 255 +0.562493 0 0.499986 192 192 192 255 +0.531239 0 0.531239 192 192 192 255 +0.187449 0 0.625 192 192 192 255 +0.156196 0 0.593746 192 192 192 255 +0.218703 0 0.593746 192 192 192 255 +0.218703 0 0.531239 192 192 192 255 +0.187449 0 0.499986 192 192 192 255 +0.156196 0 0.531239 192 192 192 255 +0.124942 0 0.562493 192 192 192 255 +0.0624712 0 0.625 192 192 192 255 +0.0312173 0 0.593746 192 192 192 255 +0.0936885 0 0.593746 192 192 192 255 +0.0936885 0 0.531239 192 192 192 255 +0.0624712 0 0.499986 192 192 192 255 +0.0312173 0 0.531239 192 192 192 255 +1.49012e-008 0 0.562493 192 192 192 255 +0.28121 0 0.468732 192 192 192 255 +0.343718 0 0.468732 192 192 192 255 +0.374972 0 0.437479 192 192 192 255 +0.343718 0 0.406225 192 192 192 255 +0.28121 0 0.406225 192 192 192 255 +0.249956 0 0.437479 192 192 192 255 +0.406225 0 0.468732 192 192 192 255 +0.468732 0 0.468732 192 192 192 255 +0.499986 0 0.437479 192 192 192 255 +0.468732 0 0.406225 192 192 192 255 +0.406225 0 0.406225 192 192 192 255 +0.531239 0 0.468732 192 192 192 255 +0.593746 0 0.468732 192 192 192 255 +0.625 0 0.437479 192 192 192 255 +0.593746 0 0.406225 192 192 192 255 +0.531239 0 0.406225 192 192 192 255 +0.156196 0 0.468732 192 192 192 255 +0.218703 0 0.468732 192 192 192 255 +0.218703 0 0.406225 192 192 192 255 +0.156196 0 0.406225 192 192 192 255 +0.124942 0 0.437479 192 192 192 255 +0.0312173 0 0.468732 192 192 192 255 +0.0936885 0 0.468732 192 192 192 255 +0.0936885 0 0.406225 192 192 192 255 +0.0312173 0 0.406225 192 192 192 255 +1.49012e-008 0 0.437479 192 192 192 255 +-0.312464 0 0.374972 192 192 192 255 +-0.343718 0 0.343718 192 192 192 255 +-0.28121 0 0.343718 192 192 192 255 +-0.249956 0 0.312464 192 192 192 255 +-0.28121 0 0.28121 192 192 192 255 +-0.312464 0 0.249956 192 192 192 255 +-0.343718 0 0.28121 192 192 192 255 +-0.374972 0 0.312464 192 192 192 255 +-0.187449 0 0.374972 192 192 192 255 +-0.218703 0 0.343718 192 192 192 255 +-0.156196 0 0.343718 192 192 192 255 +-0.124942 0 0.312464 192 192 192 255 +-0.156196 0 0.28121 192 192 192 255 +-0.187449 0 0.249956 192 192 192 255 +-0.218703 0 0.28121 192 192 192 255 +-0.0624712 0 0.374972 192 192 192 255 +-0.0936884 0 0.343718 192 192 192 255 +-0.0312172 0 0.343718 192 192 192 255 +-0.0312172 0 0.28121 192 192 192 255 +-0.0624712 0 0.249956 192 192 192 255 +-0.0936884 0 0.28121 192 192 192 255 +-0.437479 0 0.374972 192 192 192 255 +-0.468732 0 0.343718 192 192 192 255 +-0.406225 0 0.343718 192 192 192 255 +-0.406225 0 0.28121 192 192 192 255 +-0.437479 0 0.249956 192 192 192 255 +-0.468732 0 0.28121 192 192 192 255 +-0.499986 0 0.312464 192 192 192 255 +-0.562493 0 0.374972 192 192 192 255 +-0.593746 0 0.343718 192 192 192 255 +-0.531239 0 0.343718 192 192 192 255 +-0.531239 0 0.28121 192 192 192 255 +-0.562493 0 0.249956 192 192 192 255 +-0.593746 0 0.28121 192 192 192 255 +-0.625 0 0.312464 192 192 192 255 +-0.343718 0 0.218703 192 192 192 255 +-0.28121 0 0.218703 192 192 192 255 +-0.249956 0 0.187449 192 192 192 255 +-0.28121 0 0.156196 192 192 192 255 +-0.312464 0 0.124942 192 192 192 255 +-0.343718 0 0.156196 192 192 192 255 +-0.374972 0 0.187449 192 192 192 255 +-0.218703 0 0.218703 192 192 192 255 +-0.156196 0 0.218703 192 192 192 255 +-0.124942 0 0.187449 192 192 192 255 +-0.156196 0 0.156196 192 192 192 255 +-0.187449 0 0.124942 192 192 192 255 +-0.218703 0 0.156196 192 192 192 255 +-0.0936884 0 0.218703 192 192 192 255 +-0.0312172 0 0.218703 192 192 192 255 +-0.0312172 0 0.156196 192 192 192 255 +-0.0624712 0 0.124942 192 192 192 255 +-0.0936884 0 0.156196 192 192 192 255 +-0.468732 0 0.218703 192 192 192 255 +-0.406225 0 0.218703 192 192 192 255 +-0.406225 0 0.156196 192 192 192 255 +-0.437479 0 0.124942 192 192 192 255 +-0.468732 0 0.156196 192 192 192 255 +-0.499986 0 0.187449 192 192 192 255 +-0.593746 0 0.218703 192 192 192 255 +-0.531239 0 0.218703 192 192 192 255 +-0.531239 0 0.156196 192 192 192 255 +-0.562493 0 0.124942 192 192 192 255 +-0.593746 0 0.156196 192 192 192 255 +-0.625 0 0.187449 192 192 192 255 +-0.343718 0 0.0936885 192 192 192 255 +-0.28121 0 0.0936885 192 192 192 255 +-0.249956 0 0.0624713 192 192 192 255 +-0.28121 0 0.0312173 192 192 192 255 +-0.343718 0 0.0312173 192 192 192 255 +-0.374972 0 0.0624713 192 192 192 255 +-0.218703 0 0.0936885 192 192 192 255 +-0.156196 0 0.0936885 192 192 192 255 +-0.124942 0 0.0624534 192 192 192 255 +-0.156196 0 0.0311995 192 192 192 255 +-0.218703 0 0.0312173 192 192 192 255 +-0.0936884 0 0.0936885 192 192 192 255 +-0.0312172 0 0.0936885 192 192 192 255 +-0.0312172 0 0.0312173 192 192 192 255 +-0.0936884 0 0.0311995 192 192 192 255 +-0.468732 0 0.0936885 192 192 192 255 +-0.406225 0 0.0936885 192 192 192 255 +-0.406225 0 0.0312173 192 192 192 255 +-0.468732 0 0.0312173 192 192 192 255 +-0.499986 0 0.0624713 192 192 192 255 +-0.593746 0 0.0936885 192 192 192 255 +-0.531239 0 0.0936885 192 192 192 255 +-0.531239 0 0.0312173 192 192 192 255 +-0.593746 0 0.0312173 192 192 192 255 +-0.625 0 0.0624713 192 192 192 255 +-0.312464 0 0.625 192 192 192 255 +-0.343718 0 0.593746 192 192 192 255 +-0.28121 0 0.593746 192 192 192 255 +-0.249956 0 0.562493 192 192 192 255 +-0.28121 0 0.531239 192 192 192 255 +-0.312464 0 0.499986 192 192 192 255 +-0.343718 0 0.531239 192 192 192 255 +-0.374972 0 0.562493 192 192 192 255 +-0.187449 0 0.625 192 192 192 255 +-0.218703 0 0.593746 192 192 192 255 +-0.156196 0 0.593746 192 192 192 255 +-0.124942 0 0.562493 192 192 192 255 +-0.156196 0 0.531239 192 192 192 255 +-0.187449 0 0.499986 192 192 192 255 +-0.218703 0 0.531239 192 192 192 255 +-0.0624712 0 0.625 192 192 192 255 +-0.0936884 0 0.593746 192 192 192 255 +-0.0312172 0 0.593746 192 192 192 255 +-0.0312172 0 0.531239 192 192 192 255 +-0.0624712 0 0.499986 192 192 192 255 +-0.0936884 0 0.531239 192 192 192 255 +-0.437479 0 0.625 192 192 192 255 +-0.468732 0 0.593746 192 192 192 255 +-0.406225 0 0.593746 192 192 192 255 +-0.406225 0 0.531239 192 192 192 255 +-0.437479 0 0.499986 192 192 192 255 +-0.468732 0 0.531239 192 192 192 255 +-0.499986 0 0.562493 192 192 192 255 +-0.562493 0 0.625 192 192 192 255 +-0.593746 0 0.593746 192 192 192 255 +-0.531239 0 0.593746 192 192 192 255 +-0.531239 0 0.531239 192 192 192 255 +-0.562493 0 0.499986 192 192 192 255 +-0.593746 0 0.531239 192 192 192 255 +-0.625 0 0.562493 192 192 192 255 +-0.343718 0 0.468732 192 192 192 255 +-0.28121 0 0.468732 192 192 192 255 +-0.249956 0 0.437479 192 192 192 255 +-0.28121 0 0.406225 192 192 192 255 +-0.343718 0 0.406225 192 192 192 255 +-0.374972 0 0.437479 192 192 192 255 +-0.218703 0 0.468732 192 192 192 255 +-0.156196 0 0.468732 192 192 192 255 +-0.124942 0 0.437479 192 192 192 255 +-0.156196 0 0.406225 192 192 192 255 +-0.218703 0 0.406225 192 192 192 255 +-0.0936884 0 0.468732 192 192 192 255 +-0.0312172 0 0.468732 192 192 192 255 +-0.0312172 0 0.406225 192 192 192 255 +-0.0936884 0 0.406225 192 192 192 255 +-0.468732 0 0.468732 192 192 192 255 +-0.406225 0 0.468732 192 192 192 255 +-0.406225 0 0.406225 192 192 192 255 +-0.468732 0 0.406225 192 192 192 255 +-0.499986 0 0.437479 192 192 192 255 +-0.593746 0 0.468732 192 192 192 255 +-0.531239 0 0.468732 192 192 192 255 +-0.531239 0 0.406225 192 192 192 255 +-0.593746 0 0.406225 192 192 192 255 +-0.625 0 0.437479 192 192 192 255 +3 0 221 222 +3 221 1 223 +3 221 223 222 +3 222 223 2 +3 1 224 223 +3 224 3 225 +3 224 225 223 +3 223 225 2 +3 3 226 225 +3 226 4 227 +3 226 227 225 +3 225 227 2 +3 4 228 227 +3 228 0 222 +3 228 222 227 +3 227 222 2 +3 1 229 230 +3 229 5 231 +3 229 231 230 +3 230 231 6 +3 5 232 231 +3 232 7 233 +3 232 233 231 +3 231 233 6 +3 7 234 233 +3 234 3 235 +3 234 235 233 +3 233 235 6 +3 3 224 235 +3 224 1 230 +3 224 230 235 +3 235 230 6 +3 5 236 237 +3 236 8 238 +3 236 238 237 +3 237 238 9 +3 8 239 238 +3 239 10 240 +3 239 240 238 +3 238 240 9 +3 10 241 240 +3 241 7 242 +3 241 242 240 +3 240 242 9 +3 7 232 242 +3 232 5 237 +3 232 237 242 +3 242 237 9 +3 11 243 244 +3 243 0 245 +3 243 245 244 +3 244 245 12 +3 0 228 245 +3 228 4 246 +3 228 246 245 +3 245 246 12 +3 4 247 246 +3 247 13 248 +3 247 248 246 +3 246 248 12 +3 13 249 248 +3 249 11 244 +3 249 244 248 +3 248 244 12 +3 14 250 251 +3 250 11 252 +3 250 252 251 +3 251 252 15 +3 11 249 252 +3 249 13 253 +3 249 253 252 +3 252 253 15 +3 13 254 253 +3 254 16 255 +3 254 255 253 +3 253 255 15 +3 16 256 255 +3 256 14 251 +3 256 251 255 +3 255 251 15 +3 4 226 257 +3 226 3 258 +3 226 258 257 +3 257 258 17 +3 3 259 258 +3 259 18 260 +3 259 260 258 +3 258 260 17 +3 18 261 260 +3 261 19 262 +3 261 262 260 +3 260 262 17 +3 19 263 262 +3 263 4 257 +3 263 257 262 +3 262 257 17 +3 3 234 264 +3 234 7 265 +3 234 265 264 +3 264 265 20 +3 7 266 265 +3 266 21 267 +3 266 267 265 +3 265 267 20 +3 21 268 267 +3 268 18 269 +3 268 269 267 +3 267 269 20 +3 18 259 269 +3 259 3 264 +3 259 264 269 +3 269 264 20 +3 7 241 270 +3 241 10 271 +3 241 271 270 +3 270 271 22 +3 10 272 271 +3 272 23 273 +3 272 273 271 +3 271 273 22 +3 23 274 273 +3 274 21 275 +3 274 275 273 +3 273 275 22 +3 21 266 275 +3 266 7 270 +3 266 270 275 +3 275 270 22 +3 13 247 276 +3 247 4 277 +3 247 277 276 +3 276 277 24 +3 4 263 277 +3 263 19 278 +3 263 278 277 +3 277 278 24 +3 19 279 278 +3 279 25 280 +3 279 280 278 +3 278 280 24 +3 25 281 280 +3 281 13 276 +3 281 276 280 +3 280 276 24 +3 16 254 282 +3 254 13 283 +3 254 283 282 +3 282 283 26 +3 13 281 283 +3 281 25 284 +3 281 284 283 +3 283 284 26 +3 25 285 284 +3 285 27 286 +3 285 286 284 +3 284 286 26 +3 27 287 286 +3 287 16 282 +3 287 282 286 +3 286 282 26 +3 19 261 288 +3 261 18 289 +3 261 289 288 +3 288 289 28 +3 18 290 289 +3 290 29 291 +3 290 291 289 +3 289 291 28 +3 29 292 291 +3 292 30 293 +3 292 293 291 +3 291 293 28 +3 30 294 293 +3 294 19 288 +3 294 288 293 +3 293 288 28 +3 18 268 295 +3 268 21 296 +3 268 296 295 +3 295 296 31 +3 21 297 296 +3 297 32 298 +3 297 298 296 +3 296 298 31 +3 32 299 298 +3 299 29 300 +3 299 300 298 +3 298 300 31 +3 29 290 300 +3 290 18 295 +3 290 295 300 +3 300 295 31 +3 21 274 301 +3 274 23 302 +3 274 302 301 +3 301 302 33 +3 23 303 302 +3 303 34 304 +3 303 304 302 +3 302 304 33 +3 34 305 304 +3 305 32 306 +3 305 306 304 +3 304 306 33 +3 32 297 306 +3 297 21 301 +3 297 301 306 +3 306 301 33 +3 25 279 307 +3 279 19 308 +3 279 308 307 +3 307 308 35 +3 19 294 308 +3 294 30 309 +3 294 309 308 +3 308 309 35 +3 30 310 309 +3 310 36 311 +3 310 311 309 +3 309 311 35 +3 36 312 311 +3 312 25 307 +3 312 307 311 +3 311 307 35 +3 27 285 313 +3 285 25 314 +3 285 314 313 +3 313 314 37 +3 25 312 314 +3 312 36 315 +3 312 315 314 +3 314 315 37 +3 36 316 315 +3 316 38 317 +3 316 317 315 +3 315 317 37 +3 38 318 317 +3 318 27 313 +3 318 313 317 +3 317 313 37 +3 39 319 320 +3 319 40 321 +3 319 321 320 +3 320 321 41 +3 40 322 321 +3 322 42 323 +3 322 323 321 +3 321 323 41 +3 42 324 323 +3 324 43 325 +3 324 325 323 +3 323 325 41 +3 43 326 325 +3 326 39 320 +3 326 320 325 +3 325 320 41 +3 40 327 328 +3 327 44 329 +3 327 329 328 +3 328 329 45 +3 44 330 329 +3 330 46 331 +3 330 331 329 +3 329 331 45 +3 46 332 331 +3 332 42 333 +3 332 333 331 +3 331 333 45 +3 42 322 333 +3 322 40 328 +3 322 328 333 +3 333 328 45 +3 44 334 335 +3 334 47 336 +3 334 336 335 +3 335 336 48 +3 47 337 336 +3 337 49 338 +3 337 338 336 +3 336 338 48 +3 49 339 338 +3 339 46 340 +3 339 340 338 +3 338 340 48 +3 46 330 340 +3 330 44 335 +3 330 335 340 +3 340 335 48 +3 50 341 342 +3 341 39 343 +3 341 343 342 +3 342 343 51 +3 39 326 343 +3 326 43 344 +3 326 344 343 +3 343 344 51 +3 43 345 344 +3 345 52 346 +3 345 346 344 +3 344 346 51 +3 52 347 346 +3 347 50 342 +3 347 342 346 +3 346 342 51 +3 53 348 349 +3 348 50 350 +3 348 350 349 +3 349 350 54 +3 50 347 350 +3 347 52 351 +3 347 351 350 +3 350 351 54 +3 52 352 351 +3 352 55 353 +3 352 353 351 +3 351 353 54 +3 55 354 353 +3 354 53 349 +3 354 349 353 +3 353 349 54 +3 43 324 355 +3 324 42 356 +3 324 356 355 +3 355 356 56 +3 42 357 356 +3 357 1 358 +3 357 358 356 +3 356 358 56 +3 1 221 358 +3 221 0 359 +3 221 359 358 +3 358 359 56 +3 0 360 359 +3 360 43 355 +3 360 355 359 +3 359 355 56 +3 42 332 361 +3 332 46 362 +3 332 362 361 +3 361 362 57 +3 46 363 362 +3 363 5 364 +3 363 364 362 +3 362 364 57 +3 5 229 364 +3 229 1 365 +3 229 365 364 +3 364 365 57 +3 1 357 365 +3 357 42 361 +3 357 361 365 +3 365 361 57 +3 46 339 366 +3 339 49 367 +3 339 367 366 +3 366 367 58 +3 49 368 367 +3 368 8 369 +3 368 369 367 +3 367 369 58 +3 8 236 369 +3 236 5 370 +3 236 370 369 +3 369 370 58 +3 5 363 370 +3 363 46 366 +3 363 366 370 +3 370 366 58 +3 52 345 371 +3 345 43 372 +3 345 372 371 +3 371 372 59 +3 43 360 372 +3 360 0 373 +3 360 373 372 +3 372 373 59 +3 0 243 373 +3 243 11 374 +3 243 374 373 +3 373 374 59 +3 11 375 374 +3 375 52 371 +3 375 371 374 +3 374 371 59 +3 55 352 376 +3 352 52 377 +3 352 377 376 +3 376 377 60 +3 52 375 377 +3 375 11 378 +3 375 378 377 +3 377 378 60 +3 11 250 378 +3 250 14 379 +3 250 379 378 +3 378 379 60 +3 14 380 379 +3 380 55 376 +3 380 376 379 +3 379 376 60 +3 61 381 382 +3 381 62 383 +3 381 383 382 +3 382 383 63 +3 62 384 383 +3 384 64 385 +3 384 385 383 +3 383 385 63 +3 64 386 385 +3 386 65 387 +3 386 387 385 +3 385 387 63 +3 65 388 387 +3 388 61 382 +3 388 382 387 +3 387 382 63 +3 62 389 390 +3 389 66 391 +3 389 391 390 +3 390 391 67 +3 66 392 391 +3 392 68 393 +3 392 393 391 +3 391 393 67 +3 68 394 393 +3 394 64 395 +3 394 395 393 +3 393 395 67 +3 64 384 395 +3 384 62 390 +3 384 390 395 +3 395 390 67 +3 66 396 397 +3 396 69 398 +3 396 398 397 +3 397 398 70 +3 69 399 398 +3 399 71 400 +3 399 400 398 +3 398 400 70 +3 71 401 400 +3 401 68 402 +3 401 402 400 +3 400 402 70 +3 68 392 402 +3 392 66 397 +3 392 397 402 +3 402 397 70 +3 72 403 404 +3 403 61 405 +3 403 405 404 +3 404 405 73 +3 61 388 405 +3 388 65 406 +3 388 406 405 +3 405 406 73 +3 65 407 406 +3 407 74 408 +3 407 408 406 +3 406 408 73 +3 74 409 408 +3 409 72 404 +3 409 404 408 +3 408 404 73 +3 8 410 411 +3 410 72 412 +3 410 412 411 +3 411 412 75 +3 72 409 412 +3 409 74 413 +3 409 413 412 +3 412 413 75 +3 74 414 413 +3 414 10 415 +3 414 415 413 +3 413 415 75 +3 10 239 415 +3 239 8 411 +3 239 411 415 +3 415 411 75 +3 65 386 416 +3 386 64 417 +3 386 417 416 +3 416 417 76 +3 64 418 417 +3 418 77 419 +3 418 419 417 +3 417 419 76 +3 77 420 419 +3 420 78 421 +3 420 421 419 +3 419 421 76 +3 78 422 421 +3 422 65 416 +3 422 416 421 +3 421 416 76 +3 64 394 423 +3 394 68 424 +3 394 424 423 +3 423 424 79 +3 68 425 424 +3 425 80 426 +3 425 426 424 +3 424 426 79 +3 80 427 426 +3 427 77 428 +3 427 428 426 +3 426 428 79 +3 77 418 428 +3 418 64 423 +3 418 423 428 +3 428 423 79 +3 68 401 429 +3 401 71 430 +3 401 430 429 +3 429 430 81 +3 71 431 430 +3 431 82 432 +3 431 432 430 +3 430 432 81 +3 82 433 432 +3 433 80 434 +3 433 434 432 +3 432 434 81 +3 80 425 434 +3 425 68 429 +3 425 429 434 +3 434 429 81 +3 74 407 435 +3 407 65 436 +3 407 436 435 +3 435 436 83 +3 65 422 436 +3 422 78 437 +3 422 437 436 +3 436 437 83 +3 78 438 437 +3 438 84 439 +3 438 439 437 +3 437 439 83 +3 84 440 439 +3 440 74 435 +3 440 435 439 +3 439 435 83 +3 10 414 441 +3 414 74 442 +3 414 442 441 +3 441 442 85 +3 74 440 442 +3 440 84 443 +3 440 443 442 +3 442 443 85 +3 84 444 443 +3 444 23 445 +3 444 445 443 +3 443 445 85 +3 23 272 445 +3 272 10 441 +3 272 441 445 +3 445 441 85 +3 78 420 446 +3 420 77 447 +3 420 447 446 +3 446 447 86 +3 77 448 447 +3 448 87 449 +3 448 449 447 +3 447 449 86 +3 87 450 449 +3 450 88 451 +3 450 451 449 +3 449 451 86 +3 88 452 451 +3 452 78 446 +3 452 446 451 +3 451 446 86 +3 77 427 453 +3 427 80 454 +3 427 454 453 +3 453 454 89 +3 80 455 454 +3 455 90 456 +3 455 456 454 +3 454 456 89 +3 90 457 456 +3 457 87 458 +3 457 458 456 +3 456 458 89 +3 87 448 458 +3 448 77 453 +3 448 453 458 +3 458 453 89 +3 80 433 459 +3 433 82 460 +3 433 460 459 +3 459 460 91 +3 82 461 460 +3 461 92 462 +3 461 462 460 +3 460 462 91 +3 92 463 462 +3 463 90 464 +3 463 464 462 +3 462 464 91 +3 90 455 464 +3 455 80 459 +3 455 459 464 +3 464 459 91 +3 84 438 465 +3 438 78 466 +3 438 466 465 +3 465 466 93 +3 78 452 466 +3 452 88 467 +3 452 467 466 +3 466 467 93 +3 88 468 467 +3 468 94 469 +3 468 469 467 +3 467 469 93 +3 94 470 469 +3 470 84 465 +3 470 465 469 +3 469 465 93 +3 23 444 471 +3 444 84 472 +3 444 472 471 +3 471 472 95 +3 84 470 472 +3 470 94 473 +3 470 473 472 +3 472 473 95 +3 94 474 473 +3 474 34 475 +3 474 475 473 +3 473 475 95 +3 34 303 475 +3 303 23 471 +3 303 471 475 +3 475 471 95 +3 96 476 477 +3 476 97 478 +3 476 478 477 +3 477 478 98 +3 97 479 478 +3 479 99 480 +3 479 480 478 +3 478 480 98 +3 99 481 480 +3 481 100 482 +3 481 482 480 +3 480 482 98 +3 100 483 482 +3 483 96 477 +3 483 477 482 +3 482 477 98 +3 97 484 485 +3 484 101 486 +3 484 486 485 +3 485 486 102 +3 101 487 486 +3 487 103 488 +3 487 488 486 +3 486 488 102 +3 103 489 488 +3 489 99 490 +3 489 490 488 +3 488 490 102 +3 99 479 490 +3 479 97 485 +3 479 485 490 +3 490 485 102 +3 101 491 492 +3 491 104 493 +3 491 493 492 +3 492 493 105 +3 104 494 493 +3 494 106 495 +3 494 495 493 +3 493 495 105 +3 106 496 495 +3 496 103 497 +3 496 497 495 +3 495 497 105 +3 103 487 497 +3 487 101 492 +3 487 492 497 +3 497 492 105 +3 107 498 499 +3 498 96 500 +3 498 500 499 +3 499 500 108 +3 96 483 500 +3 483 100 501 +3 483 501 500 +3 500 501 108 +3 100 502 501 +3 502 109 503 +3 502 503 501 +3 501 503 108 +3 109 504 503 +3 504 107 499 +3 504 499 503 +3 503 499 108 +3 47 505 506 +3 505 107 507 +3 505 507 506 +3 506 507 110 +3 107 504 507 +3 504 109 508 +3 504 508 507 +3 507 508 110 +3 109 509 508 +3 509 49 510 +3 509 510 508 +3 508 510 110 +3 49 337 510 +3 337 47 506 +3 337 506 510 +3 510 506 110 +3 100 481 511 +3 481 99 512 +3 481 512 511 +3 511 512 111 +3 99 513 512 +3 513 62 514 +3 513 514 512 +3 512 514 111 +3 62 381 514 +3 381 61 515 +3 381 515 514 +3 514 515 111 +3 61 516 515 +3 516 100 511 +3 516 511 515 +3 515 511 111 +3 99 489 517 +3 489 103 518 +3 489 518 517 +3 517 518 112 +3 103 519 518 +3 519 66 520 +3 519 520 518 +3 518 520 112 +3 66 389 520 +3 389 62 521 +3 389 521 520 +3 520 521 112 +3 62 513 521 +3 513 99 517 +3 513 517 521 +3 521 517 112 +3 103 496 522 +3 496 106 523 +3 496 523 522 +3 522 523 113 +3 106 524 523 +3 524 69 525 +3 524 525 523 +3 523 525 113 +3 69 396 525 +3 396 66 526 +3 396 526 525 +3 525 526 113 +3 66 519 526 +3 519 103 522 +3 519 522 526 +3 526 522 113 +3 109 502 527 +3 502 100 528 +3 502 528 527 +3 527 528 114 +3 100 516 528 +3 516 61 529 +3 516 529 528 +3 528 529 114 +3 61 403 529 +3 403 72 530 +3 403 530 529 +3 529 530 114 +3 72 531 530 +3 531 109 527 +3 531 527 530 +3 530 527 114 +3 49 509 532 +3 509 109 533 +3 509 533 532 +3 532 533 115 +3 109 531 533 +3 531 72 534 +3 531 534 533 +3 533 534 115 +3 72 410 534 +3 410 8 535 +3 410 535 534 +3 534 535 115 +3 8 368 535 +3 368 49 532 +3 368 532 535 +3 535 532 115 +3 116 536 537 +3 536 117 538 +3 536 538 537 +3 537 538 118 +3 117 539 538 +3 539 119 540 +3 539 540 538 +3 538 540 118 +3 119 541 540 +3 541 120 542 +3 541 542 540 +3 540 542 118 +3 120 543 542 +3 543 116 537 +3 543 537 542 +3 542 537 118 +3 117 544 545 +3 544 121 546 +3 544 546 545 +3 545 546 122 +3 121 547 546 +3 547 123 548 +3 547 548 546 +3 546 548 122 +3 123 549 548 +3 549 119 550 +3 549 550 548 +3 548 550 122 +3 119 539 550 +3 539 117 545 +3 539 545 550 +3 550 545 122 +3 121 551 552 +3 551 124 553 +3 551 553 552 +3 552 553 125 +3 124 554 553 +3 554 126 555 +3 554 555 553 +3 553 555 125 +3 126 556 555 +3 556 123 557 +3 556 557 555 +3 555 557 125 +3 123 547 557 +3 547 121 552 +3 547 552 557 +3 557 552 125 +3 127 558 559 +3 558 116 560 +3 558 560 559 +3 559 560 128 +3 116 543 560 +3 543 120 561 +3 543 561 560 +3 560 561 128 +3 120 562 561 +3 562 129 563 +3 562 563 561 +3 561 563 128 +3 129 564 563 +3 564 127 559 +3 564 559 563 +3 563 559 128 +3 130 565 566 +3 565 127 567 +3 565 567 566 +3 566 567 131 +3 127 564 567 +3 564 129 568 +3 564 568 567 +3 567 568 131 +3 129 569 568 +3 569 132 570 +3 569 570 568 +3 568 570 131 +3 132 571 570 +3 571 130 566 +3 571 566 570 +3 570 566 131 +3 120 541 572 +3 541 119 573 +3 541 573 572 +3 572 573 133 +3 119 574 573 +3 574 134 575 +3 574 575 573 +3 573 575 133 +3 134 576 575 +3 576 135 577 +3 576 577 575 +3 575 577 133 +3 135 578 577 +3 578 120 572 +3 578 572 577 +3 577 572 133 +3 119 549 579 +3 549 123 580 +3 549 580 579 +3 579 580 136 +3 123 581 580 +3 581 137 582 +3 581 582 580 +3 580 582 136 +3 137 583 582 +3 583 134 584 +3 583 584 582 +3 582 584 136 +3 134 574 584 +3 574 119 579 +3 574 579 584 +3 584 579 136 +3 123 556 585 +3 556 126 586 +3 556 586 585 +3 585 586 138 +3 126 587 586 +3 587 139 588 +3 587 588 586 +3 586 588 138 +3 139 589 588 +3 589 137 590 +3 589 590 588 +3 588 590 138 +3 137 581 590 +3 581 123 585 +3 581 585 590 +3 590 585 138 +3 129 562 591 +3 562 120 592 +3 562 592 591 +3 591 592 140 +3 120 578 592 +3 578 135 593 +3 578 593 592 +3 592 593 140 +3 135 594 593 +3 594 141 595 +3 594 595 593 +3 593 595 140 +3 141 596 595 +3 596 129 591 +3 596 591 595 +3 595 591 140 +3 132 569 597 +3 569 129 598 +3 569 598 597 +3 597 598 142 +3 129 596 598 +3 596 141 599 +3 596 599 598 +3 598 599 142 +3 141 600 599 +3 600 143 601 +3 600 601 599 +3 599 601 142 +3 143 602 601 +3 602 132 597 +3 602 597 601 +3 601 597 142 +3 135 576 603 +3 576 134 604 +3 576 604 603 +3 603 604 144 +3 134 605 604 +3 605 97 606 +3 605 606 604 +3 604 606 144 +3 97 476 606 +3 476 96 607 +3 476 607 606 +3 606 607 144 +3 96 608 607 +3 608 135 603 +3 608 603 607 +3 607 603 144 +3 134 583 609 +3 583 137 610 +3 583 610 609 +3 609 610 145 +3 137 611 610 +3 611 101 612 +3 611 612 610 +3 610 612 145 +3 101 484 612 +3 484 97 613 +3 484 613 612 +3 612 613 145 +3 97 605 613 +3 605 134 609 +3 605 609 613 +3 613 609 145 +3 137 589 614 +3 589 139 615 +3 589 615 614 +3 614 615 146 +3 139 616 615 +3 616 104 617 +3 616 617 615 +3 615 617 146 +3 104 491 617 +3 491 101 618 +3 491 618 617 +3 617 618 146 +3 101 611 618 +3 611 137 614 +3 611 614 618 +3 618 614 146 +3 141 594 619 +3 594 135 620 +3 594 620 619 +3 619 620 147 +3 135 608 620 +3 608 96 621 +3 608 621 620 +3 620 621 147 +3 96 498 621 +3 498 107 622 +3 498 622 621 +3 621 622 147 +3 107 623 622 +3 623 141 619 +3 623 619 622 +3 622 619 147 +3 143 600 624 +3 600 141 625 +3 600 625 624 +3 624 625 148 +3 141 623 625 +3 623 107 626 +3 623 626 625 +3 625 626 148 +3 107 505 626 +3 505 47 627 +3 505 627 626 +3 626 627 148 +3 47 628 627 +3 628 143 624 +3 628 624 627 +3 627 624 148 +3 149 629 630 +3 629 150 631 +3 629 631 630 +3 630 631 151 +3 150 632 631 +3 632 152 633 +3 632 633 631 +3 631 633 151 +3 152 634 633 +3 634 153 635 +3 634 635 633 +3 633 635 151 +3 153 636 635 +3 636 149 630 +3 636 630 635 +3 635 630 151 +3 150 637 638 +3 637 154 639 +3 637 639 638 +3 638 639 155 +3 154 640 639 +3 640 156 641 +3 640 641 639 +3 639 641 155 +3 156 642 641 +3 642 152 643 +3 642 643 641 +3 641 643 155 +3 152 632 643 +3 632 150 638 +3 632 638 643 +3 643 638 155 +3 154 644 645 +3 644 157 646 +3 644 646 645 +3 645 646 158 +3 157 647 646 +3 647 159 648 +3 647 648 646 +3 646 648 158 +3 159 649 648 +3 649 156 650 +3 649 650 648 +3 648 650 158 +3 156 640 650 +3 640 154 645 +3 640 645 650 +3 650 645 158 +3 160 651 652 +3 651 149 653 +3 651 653 652 +3 652 653 161 +3 149 636 653 +3 636 153 654 +3 636 654 653 +3 653 654 161 +3 153 655 654 +3 655 162 656 +3 655 656 654 +3 654 656 161 +3 162 657 656 +3 657 160 652 +3 657 652 656 +3 656 652 161 +3 163 658 659 +3 658 160 660 +3 658 660 659 +3 659 660 164 +3 160 657 660 +3 657 162 661 +3 657 661 660 +3 660 661 164 +3 162 662 661 +3 662 165 663 +3 662 663 661 +3 661 663 164 +3 165 664 663 +3 664 163 659 +3 664 659 663 +3 663 659 164 +3 153 634 665 +3 634 152 666 +3 634 666 665 +3 665 666 166 +3 152 667 666 +3 667 117 668 +3 667 668 666 +3 666 668 166 +3 117 536 668 +3 536 116 669 +3 536 669 668 +3 668 669 166 +3 116 670 669 +3 670 153 665 +3 670 665 669 +3 669 665 166 +3 152 642 671 +3 642 156 672 +3 642 672 671 +3 671 672 167 +3 156 673 672 +3 673 121 674 +3 673 674 672 +3 672 674 167 +3 121 544 674 +3 544 117 675 +3 544 675 674 +3 674 675 167 +3 117 667 675 +3 667 152 671 +3 667 671 675 +3 675 671 167 +3 156 649 676 +3 649 159 677 +3 649 677 676 +3 676 677 168 +3 159 678 677 +3 678 124 679 +3 678 679 677 +3 677 679 168 +3 124 551 679 +3 551 121 680 +3 551 680 679 +3 679 680 168 +3 121 673 680 +3 673 156 676 +3 673 676 680 +3 680 676 168 +3 162 655 681 +3 655 153 682 +3 655 682 681 +3 681 682 169 +3 153 670 682 +3 670 116 683 +3 670 683 682 +3 682 683 169 +3 116 558 683 +3 558 127 684 +3 558 684 683 +3 683 684 169 +3 127 685 684 +3 685 162 681 +3 685 681 684 +3 684 681 169 +3 165 662 686 +3 662 162 687 +3 662 687 686 +3 686 687 170 +3 162 685 687 +3 685 127 688 +3 685 688 687 +3 687 688 170 +3 127 565 688 +3 565 130 689 +3 565 689 688 +3 688 689 170 +3 130 690 689 +3 690 165 686 +3 690 686 689 +3 689 686 170 +3 171 691 692 +3 691 172 693 +3 691 693 692 +3 692 693 173 +3 172 694 693 +3 694 174 695 +3 694 695 693 +3 693 695 173 +3 174 696 695 +3 696 175 697 +3 696 697 695 +3 695 697 173 +3 175 698 697 +3 698 171 692 +3 698 692 697 +3 697 692 173 +3 172 699 700 +3 699 176 701 +3 699 701 700 +3 700 701 177 +3 176 702 701 +3 702 178 703 +3 702 703 701 +3 701 703 177 +3 178 704 703 +3 704 174 705 +3 704 705 703 +3 703 705 177 +3 174 694 705 +3 694 172 700 +3 694 700 705 +3 705 700 177 +3 176 706 707 +3 706 130 708 +3 706 708 707 +3 707 708 179 +3 130 571 708 +3 571 132 709 +3 571 709 708 +3 708 709 179 +3 132 710 709 +3 710 178 711 +3 710 711 709 +3 709 711 179 +3 178 702 711 +3 702 176 707 +3 702 707 711 +3 711 707 179 +3 180 712 713 +3 712 171 714 +3 712 714 713 +3 713 714 181 +3 171 698 714 +3 698 175 715 +3 698 715 714 +3 714 715 181 +3 175 716 715 +3 716 182 717 +3 716 717 715 +3 715 717 181 +3 182 718 717 +3 718 180 713 +3 718 713 717 +3 717 713 181 +3 183 719 720 +3 719 180 721 +3 719 721 720 +3 720 721 184 +3 180 718 721 +3 718 182 722 +3 718 722 721 +3 721 722 184 +3 182 723 722 +3 723 185 724 +3 723 724 722 +3 722 724 184 +3 185 725 724 +3 725 183 720 +3 725 720 724 +3 724 720 184 +3 175 696 726 +3 696 174 727 +3 696 727 726 +3 726 727 186 +3 174 728 727 +3 728 187 729 +3 728 729 727 +3 727 729 186 +3 187 730 729 +3 730 188 731 +3 730 731 729 +3 729 731 186 +3 188 732 731 +3 732 175 726 +3 732 726 731 +3 731 726 186 +3 174 704 733 +3 704 178 734 +3 704 734 733 +3 733 734 189 +3 178 735 734 +3 735 190 736 +3 735 736 734 +3 734 736 189 +3 190 737 736 +3 737 187 738 +3 737 738 736 +3 736 738 189 +3 187 728 738 +3 728 174 733 +3 728 733 738 +3 738 733 189 +3 178 710 739 +3 710 132 740 +3 710 740 739 +3 739 740 191 +3 132 602 740 +3 602 143 741 +3 602 741 740 +3 740 741 191 +3 143 742 741 +3 742 190 743 +3 742 743 741 +3 741 743 191 +3 190 735 743 +3 735 178 739 +3 735 739 743 +3 743 739 191 +3 182 716 744 +3 716 175 745 +3 716 745 744 +3 744 745 192 +3 175 732 745 +3 732 188 746 +3 732 746 745 +3 745 746 192 +3 188 747 746 +3 747 193 748 +3 747 748 746 +3 746 748 192 +3 193 749 748 +3 749 182 744 +3 749 744 748 +3 748 744 192 +3 185 723 750 +3 723 182 751 +3 723 751 750 +3 750 751 194 +3 182 749 751 +3 749 193 752 +3 749 752 751 +3 751 752 194 +3 193 753 752 +3 753 195 754 +3 753 754 752 +3 752 754 194 +3 195 755 754 +3 755 185 750 +3 755 750 754 +3 754 750 194 +3 188 730 756 +3 730 187 757 +3 730 757 756 +3 756 757 196 +3 187 758 757 +3 758 40 759 +3 758 759 757 +3 757 759 196 +3 40 319 759 +3 319 39 760 +3 319 760 759 +3 759 760 196 +3 39 761 760 +3 761 188 756 +3 761 756 760 +3 760 756 196 +3 187 737 762 +3 737 190 763 +3 737 763 762 +3 762 763 197 +3 190 764 763 +3 764 44 765 +3 764 765 763 +3 763 765 197 +3 44 327 765 +3 327 40 766 +3 327 766 765 +3 765 766 197 +3 40 758 766 +3 758 187 762 +3 758 762 766 +3 766 762 197 +3 190 742 767 +3 742 143 768 +3 742 768 767 +3 767 768 198 +3 143 628 768 +3 628 47 769 +3 628 769 768 +3 768 769 198 +3 47 334 769 +3 334 44 770 +3 334 770 769 +3 769 770 198 +3 44 764 770 +3 764 190 767 +3 764 767 770 +3 770 767 198 +3 193 747 771 +3 747 188 772 +3 747 772 771 +3 771 772 199 +3 188 761 772 +3 761 39 773 +3 761 773 772 +3 772 773 199 +3 39 341 773 +3 341 50 774 +3 341 774 773 +3 773 774 199 +3 50 775 774 +3 775 193 771 +3 775 771 774 +3 774 771 199 +3 195 753 776 +3 753 193 777 +3 753 777 776 +3 776 777 200 +3 193 775 777 +3 775 50 778 +3 775 778 777 +3 777 778 200 +3 50 348 778 +3 348 53 779 +3 348 779 778 +3 778 779 200 +3 53 780 779 +3 780 195 776 +3 780 776 779 +3 779 776 200 +3 201 781 782 +3 781 202 783 +3 781 783 782 +3 782 783 203 +3 202 784 783 +3 784 204 785 +3 784 785 783 +3 783 785 203 +3 204 786 785 +3 786 205 787 +3 786 787 785 +3 785 787 203 +3 205 788 787 +3 788 201 782 +3 788 782 787 +3 787 782 203 +3 202 789 790 +3 789 206 791 +3 789 791 790 +3 790 791 207 +3 206 792 791 +3 792 208 793 +3 792 793 791 +3 791 793 207 +3 208 794 793 +3 794 204 795 +3 794 795 793 +3 793 795 207 +3 204 784 795 +3 784 202 790 +3 784 790 795 +3 795 790 207 +3 206 796 797 +3 796 163 798 +3 796 798 797 +3 797 798 209 +3 163 664 798 +3 664 165 799 +3 664 799 798 +3 798 799 209 +3 165 800 799 +3 800 208 801 +3 800 801 799 +3 799 801 209 +3 208 792 801 +3 792 206 797 +3 792 797 801 +3 801 797 209 +3 210 802 803 +3 802 201 804 +3 802 804 803 +3 803 804 211 +3 201 788 804 +3 788 205 805 +3 788 805 804 +3 804 805 211 +3 205 806 805 +3 806 212 807 +3 806 807 805 +3 805 807 211 +3 212 808 807 +3 808 210 803 +3 808 803 807 +3 807 803 211 +3 213 809 810 +3 809 210 811 +3 809 811 810 +3 810 811 214 +3 210 808 811 +3 808 212 812 +3 808 812 811 +3 811 812 214 +3 212 813 812 +3 813 215 814 +3 813 814 812 +3 812 814 214 +3 215 815 814 +3 815 213 810 +3 815 810 814 +3 814 810 214 +3 205 786 816 +3 786 204 817 +3 786 817 816 +3 816 817 216 +3 204 818 817 +3 818 172 819 +3 818 819 817 +3 817 819 216 +3 172 691 819 +3 691 171 820 +3 691 820 819 +3 819 820 216 +3 171 821 820 +3 821 205 816 +3 821 816 820 +3 820 816 216 +3 204 794 822 +3 794 208 823 +3 794 823 822 +3 822 823 217 +3 208 824 823 +3 824 176 825 +3 824 825 823 +3 823 825 217 +3 176 699 825 +3 699 172 826 +3 699 826 825 +3 825 826 217 +3 172 818 826 +3 818 204 822 +3 818 822 826 +3 826 822 217 +3 208 800 827 +3 800 165 828 +3 800 828 827 +3 827 828 218 +3 165 690 828 +3 690 130 829 +3 690 829 828 +3 828 829 218 +3 130 706 829 +3 706 176 830 +3 706 830 829 +3 829 830 218 +3 176 824 830 +3 824 208 827 +3 824 827 830 +3 830 827 218 +3 212 806 831 +3 806 205 832 +3 806 832 831 +3 831 832 219 +3 205 821 832 +3 821 171 833 +3 821 833 832 +3 832 833 219 +3 171 712 833 +3 712 180 834 +3 712 834 833 +3 833 834 219 +3 180 835 834 +3 835 212 831 +3 835 831 834 +3 834 831 219 +3 215 813 836 +3 813 212 837 +3 813 837 836 +3 836 837 220 +3 212 835 837 +3 835 180 838 +3 835 838 837 +3 837 838 220 +3 180 719 838 +3 719 183 839 +3 719 839 838 +3 838 839 220 +3 183 840 839 +3 840 215 836 +3 840 836 839 +3 839 836 220 diff -Nru cgal-4.7/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp cgal-4.8/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp --- cgal-4.7/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/deform_polyhedron_with_custom_pmap_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,60 @@ +#include +#include +#include +// Halfedge adaptors for Polyhedron_3 +#include +#include +#include +#include + +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::halfedge_iterator halfedge_iterator; + +// Define the maps +typedef std::map Vertex_id_map; +typedef std::map Hedge_id_map; +typedef boost::associative_property_map Vertex_id_pmap; +typedef boost::associative_property_map Hedge_id_pmap; + + +typedef CGAL::Surface_mesh_deformation 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"; + return 1; + } + + // Init the indices of the vertices from 0 to num_vertices(mesh)-1 + Vertex_id_map vertex_index_map; + vertex_iterator vb, ve; + std::size_t counter = 0; + for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) + vertex_index_map[*vb]=counter; + + // Init the indices of the halfedges from 0 to 2*num_edges(mesh)-1 + Hedge_id_map hedge_index_map; + counter = 0; + halfedge_iterator eb, ee; + for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) + hedge_index_map[*eb]=counter; + + Surface_mesh_deformation deform_mesh( mesh, + Vertex_id_pmap(vertex_index_map), + Hedge_id_pmap(hedge_index_map) ); + + // Now deform mesh as desired + // ..... +} diff -Nru cgal-4.7/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp cgal-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp --- cgal-4.7/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,111 @@ +#include +#include +#include +#include +// HalfedgeGraph adaptors for Polyhedron_3 +#include +#include + +#include + +#include +#include +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedron_3 Polyhedron; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::out_edge_iterator out_edge_iterator; + +typedef Eigen::Vector3d Vector3d; + +typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; + +// Collect the vertices which are at distance less or equal to k +// from the vertex v in the graph of vertices connected by the edges of P +std::vector extract_k_ring(const Polyhedron &P, vertex_descriptor v, int k) +{ + std::map D; + std::vector Q; + Q.push_back(v); D[v] = 0; + std::size_t current_index = 0; + + int dist_v; + while( current_index < Q.size() && (dist_v = D[ Q[current_index] ]) < k ) { + v = Q[current_index++]; + + out_edge_iterator e, e_end; + for(boost::tie(e, e_end) = out_edges(v, P); e != e_end; e++) + { + halfedge_descriptor he = halfedge(*e, P); + vertex_descriptor new_v = target(he, P); + if(D.insert(std::make_pair(new_v, dist_v + 1)).second) { + Q.push_back(new_v); + } + } + } + return Q; +} + +int main() +{ + Polyhedron mesh; + std::ifstream input("data/plane.off"); + + if ( !input || !(input >> mesh) || mesh.empty() ) { + std::cerr<< "Cannot open data/plane.off"; + return 1; + } + + // Init the indices of the halfedges and the vertices. + set_halfedgeds_items_id(mesh); + + // Create the deformation object + Surface_mesh_deformation deform_mesh(mesh); + + // Select and insert the vertices of the region of interest + vertex_iterator vb, ve; + boost::tie(vb,ve) = vertices(mesh); + std::vector roi = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 47), 9); + deform_mesh.insert_roi_vertices(roi.begin(), roi.end()); + + // Select and insert the control vertices + std::vector cvertices_1 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 39), 1); + std::vector cvertices_2 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 97), 1); + deform_mesh.insert_control_vertices(cvertices_1.begin(), cvertices_1.end()); + deform_mesh.insert_control_vertices(cvertices_2.begin(), cvertices_2.end()); + + // Apply a rotation to the control vertices + Eigen::Quaternion quad(0.92, 0, 0, -0.38); + deform_mesh.rotate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0,0), quad); + deform_mesh.rotate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0,0), quad); + + deform_mesh.deform(); + + // Save the deformed mesh + std::ofstream output("deform_1.off"); + output << mesh; + output.close(); + + // Restore the positions of the vertices + deform_mesh.reset(); + + // Apply a translation on the original positions of the vertices (reset() was called before) + deform_mesh.translate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0.3,0)); + deform_mesh.translate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0.3,0)); + + // Call the function deform() with one-time parameters: + // iterate 10 times and do not use energy based termination criterion + deform_mesh.set_iterations(10); + deform_mesh.set_tolerance(0.0); + deform_mesh.deform(); + + // Save the deformed mesh + output.open("deform_2.off"); + output << mesh; +} + diff -Nru cgal-4.7/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp cgal-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp --- cgal-4.7/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_deformation/k_ring_roi_translate_rotate_Surface_mesh.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,103 @@ +#include +#include +#include +#include + +#include +#include + + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh Mesh; + +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::out_edge_iterator out_edge_iterator; + +typedef Eigen::Vector3d Vector3d; + +typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; + +// Collect the vertices which are at distance less or equal to k +// from the vertex v in the graph of vertices connected by the edges of P +std::vector extract_k_ring(const Mesh &P, vertex_descriptor v, int k) +{ + std::map D; + std::vector Q; + Q.push_back(v); D[v] = 0; + std::size_t current_index = 0; + + int dist_v; + while( current_index < Q.size() && (dist_v = D[ Q[current_index] ]) < k ) { + v = Q[current_index++]; + + out_edge_iterator e, e_end; + for(boost::tie(e, e_end) = out_edges(v, P); e != e_end; e++) + { + halfedge_descriptor he = halfedge(*e, P); + vertex_descriptor new_v = target(he, P); + if(D.insert(std::make_pair(new_v, dist_v + 1)).second) { + Q.push_back(new_v); + } + } + } + return Q; +} + +int main() +{ + Mesh mesh; + std::ifstream input("data/plane.off"); + + if ( !input || !(input >> mesh) || mesh.is_empty() ) { + std::cerr<< "Cannot open data/plane.off"; + return 1; + } + + // Create the deformation object + Surface_mesh_deformation deform_mesh(mesh); + + // Select and insert the vertices of the region of interest + vertex_iterator vb, ve; + boost::tie(vb,ve) = vertices(mesh); + std::vector roi = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 47), 9); + deform_mesh.insert_roi_vertices(roi.begin(), roi.end()); + + // Select and insert the control vertices + std::vector cvertices_1 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 39), 1); + std::vector cvertices_2 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 97), 1); + deform_mesh.insert_control_vertices(cvertices_1.begin(), cvertices_1.end()); + deform_mesh.insert_control_vertices(cvertices_2.begin(), cvertices_2.end()); + + // Apply a rotation to the control vertices + Eigen::Quaternion quad(0.92, 0, 0, -0.38); + deform_mesh.rotate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0,0), quad); + deform_mesh.rotate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0,0), quad); + + deform_mesh.deform(); + + // Save the deformed mesh + std::ofstream output("deform_1.off"); + output << mesh; + output.close(); + + // Restore the positions of the vertices + deform_mesh.reset(); + + // Apply a translation on the original positions of the vertices (reset() was called before) + deform_mesh.translate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0.3,0)); + deform_mesh.translate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0.3,0)); + + // Call the function deform() with one-time parameters: + // iterate 10 times and do not use energy based termination criterion + deform_mesh.set_iterations(10); + deform_mesh.set_tolerance(0.0); + deform_mesh.deform(); + + // Save the deformed mesh + output.open("deform_2.off"); + output << mesh; +} + diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Authalic_parameterization.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -27,7 +27,6 @@ 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 @@ -68,7 +67,7 @@ //*************************************** // Discrete Authalic Parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Discrete_authalic_parameterizer_3 diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/CMakeLists.txt cgal-4.8/examples/Surface_mesh_parameterization/CMakeLists.txt --- cgal-4.7/examples/Surface_mesh_parameterization/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -6,9 +6,6 @@ cmake_minimum_required(VERSION 2.8.11) -# 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) @@ -38,17 +35,6 @@ 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) @@ -62,25 +48,25 @@ list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() - # Executables that do *not* require Eigen + + 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" ) - 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" ) + + 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) - create_single_source_cgal_program( "polyhedron_ex_parameterization.cpp" ) - else() message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.") diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp cgal-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Complete_parameterization_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -248,14 +248,10 @@ // Border parameterizer typedef CGAL::Square_border_arc_length_parameterizer_3 Border_parameterizer; - // Eigen solver - typedef CGAL::Eigen_solver_traits<> Solver; - // Discrete Authalic Parameterization (square border) // with Eigen solver typedef CGAL::Discrete_authalic_parameterizer_3 Parameterizer; + Border_parameterizer> Parameterizer; Parameterizer::Error_code err = CGAL::parameterize(mesh_patch, Parameterizer()); switch(err) { diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd cgal-4.8/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd --- cgal-4.7/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Eigen_parameterization.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -data/mannequin-devil.off diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Eigen_parameterization.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - - -// ---------------------------------------------------------------------------- -// Private types -// ---------------------------------------------------------------------------- - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 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 - 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 - 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 - 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 -Nru cgal-4.7/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -93,7 +93,6 @@ 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; //*************************************** diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -46,7 +46,7 @@ #include #include -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) #include namespace po = boost::program_options; #endif @@ -283,7 +283,7 @@ // main() // ---------------------------------------------------------------------------- -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#if defined(CGAL_USE_BOOST_PROGRAM_OPTIONS) && ! defined(DONT_USE_BOOST_PROGRAM_OPTIONS) int main(int argc, char * argv[]) #else int main() @@ -305,7 +305,7 @@ std::string output; // default: out.eps try { -#ifdef CGAL_USE_BOOST_PROGRAM_OPTIONS +#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") diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/quick_test_suite.bat cgal-4.8/examples/Surface_mesh_parameterization/quick_test_suite.bat --- cgal-4.7/examples/Surface_mesh_parameterization/quick_test_suite.bat 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/quick_test_suite.bat 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,10 @@ +@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 -Nru cgal-4.7/examples/Surface_mesh_parameterization/quick_test_suite.sh cgal-4.8/examples/Surface_mesh_parameterization/quick_test_suite.sh --- cgal-4.7/examples/Surface_mesh_parameterization/quick_test_suite.sh 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/quick_test_suite.sh 2016-04-04 19:00:12.000000000 +0000 @@ -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 +# (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 +#---------------------------------------------------------------------# + +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 -Nru cgal-4.7/examples/Surface_mesh_parameterization/Simple_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Simple_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Simple_parameterization.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -25,7 +25,6 @@ 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 @@ -66,7 +65,7 @@ //*************************************** // Floater Mean Value Coordinates parameterization - // (defaults are circular border and OpenNL solver) + // (defaults are circular border and Eigen solver) //*************************************** typedef CGAL::Parameterizer_traits_3 diff -Nru cgal-4.7/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp cgal-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp --- cgal-4.7/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_parameterization/Square_border_parameterization.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -26,7 +26,6 @@ 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 diff -Nru cgal-4.7/examples/Surface_mesh_segmentation/CMakeLists.txt cgal-4.8/examples/Surface_mesh_segmentation/CMakeLists.txt --- cgal-4.7/examples/Surface_mesh_segmentation/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_segmentation/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -7,8 +7,6 @@ cmake_minimum_required(VERSION 2.8.11) -set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) - if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) diff -Nru cgal-4.7/examples/Surface_mesh_simplification/CMakeLists.txt cgal-4.8/examples/Surface_mesh_simplification/CMakeLists.txt --- cgal-4.7/examples/Surface_mesh_simplification/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_simplification/CMakeLists.txt 2016-04-04 19:00:12.000000000 +0000 @@ -7,8 +7,6 @@ cmake_minimum_required(VERSION 2.8.11) -set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) - if ( COMMAND cmake_policy ) cmake_policy( SET CMP0003 NEW ) diff -Nru cgal-4.7/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp cgal-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp --- cgal-4.7/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_mesh_skeletonization/simple_mcfskel_example.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -4,7 +4,7 @@ #include #include #include - +#include #include #include @@ -21,6 +21,31 @@ 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[]) @@ -38,12 +63,8 @@ // 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"; - } + Display_polylines display(skeleton,output); + CGAL::split_graph_into_polylines(skeleton, display); output.close(); // Output skeleton points and the corresponding surface points diff -Nru cgal-4.7/examples/Surface_modeling/all_roi_assign_example.cpp cgal-4.8/examples/Surface_modeling/all_roi_assign_example.cpp --- cgal-4.7/examples/Surface_modeling/all_roi_assign_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/all_roi_assign_example.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -#include -#include -#include -#include -// HalfedgeGraph adapters for Polyhedron_3 -#include -#include - -#include - -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; - -typedef CGAL::Surface_mesh_deformation 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; - } - - // 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); - deform_mesh.insert_roi_vertices(vb, ve); - - // Select two control vertices ... - vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); - vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); - - // ... and insert them - 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 << "Error in preprocessing, 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); - - // Save the deformed mesh into a file - std::ofstream output("deform_1.off"); - output << mesh; - output.close(); - - // Add another control vertex which requires another call to preprocess - 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; - return 1; - } - - // Deform the mesh - 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 -Nru cgal-4.7/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp cgal-4.8/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp --- cgal-4.7/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/all_roi_assign_example_custom_polyhedron.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,155 +0,0 @@ -#include -#include -#include -#include - -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 -#include -#include -// Halfedge adapters for Polyhedron_3 -#include -#include - -#include - -struct Custom_traits{ - typedef Custom_point_3 Point_3; - struct Plane_3{}; -}; - -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::halfedge_iterator halfedge_iterator; - -typedef std::map Internal_vertex_map; -typedef std::map Internal_hedge_map; - -typedef boost::associative_property_map Vertex_index_map; -typedef boost::associative_property_map Hedge_index_map; - -typedef CGAL::Surface_mesh_deformation 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 -Nru cgal-4.7/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp cgal-4.8/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp --- cgal-4.7/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/all_roi_assign_example_Surface_mesh.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include - -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef K::Point_3 Point_3; -typedef CGAL::Surface_mesh Mesh; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_iterator halfedge_iterator; - -typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; - -int main() -{ - Mesh mesh; - std::ifstream in("data/plane.off"); - in >>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); - deform_mesh.insert_roi_vertices(vb, ve); - - // Select two control vertices ... - vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); - vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); - - // ... and insert them - 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 << "Error in preprocessing, 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); - - // Save the deformed mesh into a file - std::ofstream out1("deform_1.off"); - out1 << mesh; - - // Add another control vertex which requires another call to preprocess - 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; - return 1; - } - - // Deform the mesh - 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); - - std::ofstream out2("deform_2.off"); - out2 << mesh; - return 0; -} diff -Nru cgal-4.7/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp cgal-4.8/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp --- cgal-4.7/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/all_roi_assign_example_with_OpenMesh.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -#include -#include - -// HalfedgeGraph adapters -#include - -#include - -typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_iterator halfedge_iterator; - -typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; - -int main() -{ - Mesh mesh; - OpenMesh::IO::read_mesh(mesh, "data/plane.off"); - - // 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); - deform_mesh.insert_roi_vertices(vb, ve); - - // Select two control vertices ... - vertex_descriptor control_1 = *CGAL::cpp11::next(vb, 213); - vertex_descriptor control_2 = *CGAL::cpp11::next(vb, 157); - - // ... and insert them - 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 << "Error in preprocessing, 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); - - // Save the deformed mesh into a file - OpenMesh::IO::write_mesh(mesh,"deform_1.off"); - - // Add another control vertex which requires another call to preprocess - 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 << "Error in preprocessing, check documentation of preprocess()" << std::endl; - return 1; - } - - // Deform the mesh - 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); - - OpenMesh::IO::write_mesh(mesh,"deform_2.off"); -} diff -Nru cgal-4.7/examples/Surface_modeling/CMakeLists.txt cgal-4.8/examples/Surface_modeling/CMakeLists.txt --- cgal-4.7/examples/Surface_modeling/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +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.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 -Nru cgal-4.7/examples/Surface_modeling/custom_weight_for_edges_example.cpp cgal-4.8/examples/Surface_modeling/custom_weight_for_edges_example.cpp --- cgal-4.7/examples/Surface_modeling/custom_weight_for_edges_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/custom_weight_for_edges_example.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ -#include -#include -#include -// HalfedgeGraph adapters for Polyhedron_3 -#include -#include - -#include - -#include -#include -#include - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::halfedge_iterator halfedge_iterator; - -typedef std::map Internal_vertex_map; -typedef std::map Internal_hedge_map; - -typedef boost::associative_property_map Vertex_index_map; -typedef boost::associative_property_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* weight_map) : weight_map(weight_map) - { } - template - double operator()(halfedge_descriptor e, Polyhedron& /*P*/, VertexPointMap /*vpm*/) { - return (*weight_map)[e]; - } - std::map* weight_map; -}; - -typedef CGAL::Surface_mesh_deformation 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 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 -Nru cgal-4.7/examples/Surface_modeling/data/plane.off cgal-4.8/examples/Surface_modeling/data/plane.off --- cgal-4.7/examples/Surface_modeling/data/plane.off 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/data/plane.off 1970-01-01 00:00:00.000000000 +0000 @@ -1,2443 +0,0 @@ -COFF -841 1600 0 --0.374972 0 -0.249956 192 192 192 255 --0.249956 0 -0.249956 192 192 192 255 --0.312464 0 -0.312464 192 192 192 255 --0.249956 0 -0.374972 192 192 192 255 --0.374972 0 -0.374972 192 192 192 255 --0.124942 0 -0.249956 192 192 192 255 --0.18745 0 -0.312464 192 192 192 255 --0.124942 0 -0.374972 192 192 192 255 -1.49012e-008 0 -0.249956 192 192 192 255 --0.0624345 0 -0.312464 192 192 192 255 -1.49012e-008 0 -0.374972 192 192 192 255 --0.499986 0 -0.249956 192 192 192 255 --0.437478 0 -0.312464 192 192 192 255 --0.499986 0 -0.374972 192 192 192 255 --0.625 0 -0.249956 192 192 192 255 --0.562492 0 -0.312464 192 192 192 255 --0.625 0 -0.374972 192 192 192 255 --0.312464 0 -0.437478 192 192 192 255 --0.249956 0 -0.499986 192 192 192 255 --0.374972 0 -0.499986 192 192 192 255 --0.18745 0 -0.437478 192 192 192 255 --0.124942 0 -0.499986 192 192 192 255 --0.0624345 0 -0.437478 192 192 192 255 -1.49012e-008 0 -0.499986 192 192 192 255 --0.437478 0 -0.437478 192 192 192 255 --0.499986 0 -0.499986 192 192 192 255 --0.562492 0 -0.437478 192 192 192 255 --0.625 0 -0.499986 192 192 192 255 --0.312464 0 -0.562492 192 192 192 255 --0.249956 0 -0.625 192 192 192 255 --0.374972 0 -0.625 192 192 192 255 --0.18745 0 -0.562492 192 192 192 255 --0.124942 0 -0.625 192 192 192 255 --0.0624345 0 -0.562492 192 192 192 255 -1.49012e-008 0 -0.625 192 192 192 255 --0.437478 0 -0.562492 192 192 192 255 --0.499986 0 -0.625 192 192 192 255 --0.562492 0 -0.562492 192 192 192 255 --0.625 0 -0.625 192 192 192 255 --0.374972 0 8.03719e-008 192 192 192 255 --0.249956 0 8.03719e-008 192 192 192 255 --0.312464 0 -0.0624344 192 192 192 255 --0.249956 0 -0.124942 192 192 192 255 --0.374972 0 -0.124942 192 192 192 255 --0.124942 0 -3.56804e-005 192 192 192 255 --0.18745 0 -0.0624344 192 192 192 255 --0.124942 0 -0.124942 192 192 192 255 -1.49012e-008 0 8.03719e-008 192 192 192 255 --0.0624345 0 -0.0624344 192 192 192 255 -1.49012e-008 0 -0.124942 192 192 192 255 --0.499986 -0 8.03719e-008 192 192 192 255 --0.437478 0 -0.0624344 192 192 192 255 --0.499986 0 -0.124942 192 192 192 255 --0.625 0 8.03719e-008 192 192 192 255 --0.562492 0 -0.0624344 192 192 192 255 --0.625 0 -0.124942 192 192 192 255 --0.312464 0 -0.18745 192 192 192 255 --0.18745 0 -0.18745 192 192 192 255 --0.0624345 0 -0.18745 192 192 192 255 --0.437478 0 -0.18745 192 192 192 255 --0.562492 0 -0.18745 192 192 192 255 -0.249956 0 -0.249956 192 192 192 255 -0.374972 0 -0.249956 192 192 192 255 -0.312464 0 -0.312464 192 192 192 255 -0.374972 0 -0.374972 192 192 192 255 -0.249956 0 -0.374972 192 192 192 255 -0.499986 0 -0.249956 192 192 192 255 -0.437478 0 -0.312464 192 192 192 255 -0.499986 0 -0.374972 192 192 192 255 -0.625 0 -0.249956 192 192 192 255 -0.562492 0 -0.312464 192 192 192 255 -0.625 0 -0.374972 192 192 192 255 -0.124942 -0 -0.249956 192 192 192 255 -0.18745 0 -0.312464 192 192 192 255 -0.124942 0 -0.374972 192 192 192 255 -0.0624345 0 -0.312464 192 192 192 255 -0.312464 0 -0.437478 192 192 192 255 -0.374972 0 -0.499986 192 192 192 255 -0.249956 0 -0.499986 192 192 192 255 -0.437478 0 -0.437478 192 192 192 255 -0.499986 0 -0.499986 192 192 192 255 -0.562492 0 -0.437478 192 192 192 255 -0.625 0 -0.499986 192 192 192 255 -0.18745 0 -0.437478 192 192 192 255 -0.124942 0 -0.499986 192 192 192 255 -0.0624345 0 -0.437478 192 192 192 255 -0.312464 0 -0.562492 192 192 192 255 -0.374972 0 -0.625 192 192 192 255 -0.249956 0 -0.625 192 192 192 255 -0.437478 0 -0.562492 192 192 192 255 -0.499986 0 -0.625 192 192 192 255 -0.562492 0 -0.562492 192 192 192 255 -0.625 0 -0.625 192 192 192 255 -0.18745 0 -0.562492 192 192 192 255 -0.124942 0 -0.625 192 192 192 255 -0.0624345 0 -0.562492 192 192 192 255 -0.249956 0 8.03719e-008 192 192 192 255 -0.374972 0 8.03719e-008 192 192 192 255 -0.312464 0 -0.0624344 192 192 192 255 -0.374972 0 -0.124942 192 192 192 255 -0.249956 0 -0.124942 192 192 192 255 -0.499986 0 8.03719e-008 192 192 192 255 -0.437478 0 -0.0624344 192 192 192 255 -0.499986 0 -0.124942 192 192 192 255 -0.625 0 8.03719e-008 192 192 192 255 -0.562492 0 -0.0624344 192 192 192 255 -0.625 0 -0.124942 192 192 192 255 -0.124942 0 8.03719e-008 192 192 192 255 -0.18745 0 -0.0624344 192 192 192 255 -0.124942 0 -0.124942 192 192 192 255 -0.0624345 0 -0.0624344 192 192 192 255 -0.312464 0 -0.18745 192 192 192 255 -0.437478 0 -0.18745 192 192 192 255 -0.562492 0 -0.18745 192 192 192 255 -0.18745 0 -0.18745 192 192 192 255 -0.0624345 0 -0.18745 192 192 192 255 -0.249956 0 0.374972 192 192 192 255 -0.374972 0 0.374972 192 192 192 255 -0.312464 0 0.312464 192 192 192 255 -0.374972 0 0.249956 192 192 192 255 -0.249956 0 0.249956 192 192 192 255 -0.499986 0 0.374972 192 192 192 255 -0.437478 0 0.312464 192 192 192 255 -0.499986 0 0.249956 192 192 192 255 -0.625 0 0.374972 192 192 192 255 -0.562492 0 0.312464 192 192 192 255 -0.625 0 0.249956 192 192 192 255 -0.124942 0 0.374972 192 192 192 255 -0.18745 0 0.312464 192 192 192 255 -0.124942 0 0.249956 192 192 192 255 -1.49012e-008 0 0.374972 192 192 192 255 -0.0624345 0 0.312464 192 192 192 255 -1.49012e-008 0 0.249956 192 192 192 255 -0.312464 0 0.18745 192 192 192 255 -0.374972 0 0.124942 192 192 192 255 -0.249956 0 0.124942 192 192 192 255 -0.437478 0 0.18745 192 192 192 255 -0.499986 0 0.124942 192 192 192 255 -0.562492 0 0.18745 192 192 192 255 -0.625 0 0.124942 192 192 192 255 -0.18745 0 0.18745 192 192 192 255 -0.124942 0 0.124942 192 192 192 255 -0.0624345 0 0.18745 192 192 192 255 -1.49012e-008 0 0.124942 192 192 192 255 -0.312464 0 0.0624346 192 192 192 255 -0.437478 0 0.0624346 192 192 192 255 -0.562492 0 0.0624346 192 192 192 255 -0.18745 0 0.0624346 192 192 192 255 -0.0624345 0 0.0624346 192 192 192 255 -0.249956 0 0.625 192 192 192 255 -0.374972 0 0.625 192 192 192 255 -0.312464 0 0.562492 192 192 192 255 -0.374972 0 0.499986 192 192 192 255 -0.249956 0 0.499986 192 192 192 255 -0.499986 0 0.625 192 192 192 255 -0.437478 0 0.562492 192 192 192 255 -0.499986 0 0.499986 192 192 192 255 -0.625 0 0.625 192 192 192 255 -0.562492 0 0.562492 192 192 192 255 -0.625 0 0.499986 192 192 192 255 -0.124942 0 0.625 192 192 192 255 -0.18745 0 0.562492 192 192 192 255 -0.124942 0 0.499986 192 192 192 255 -1.49012e-008 0 0.625 192 192 192 255 -0.0624345 0 0.562492 192 192 192 255 -1.49012e-008 0 0.499986 192 192 192 255 -0.312464 0 0.437478 192 192 192 255 -0.437478 0 0.437478 192 192 192 255 -0.562492 0 0.437478 192 192 192 255 -0.18745 0 0.437478 192 192 192 255 -0.0624345 0 0.437478 192 192 192 255 --0.374972 0 0.374972 192 192 192 255 --0.249956 0 0.374972 192 192 192 255 --0.312464 0 0.312464 192 192 192 255 --0.249956 0 0.249956 192 192 192 255 --0.374972 0 0.249956 192 192 192 255 --0.124942 0 0.374972 192 192 192 255 --0.18745 0 0.312464 192 192 192 255 --0.124942 0 0.249956 192 192 192 255 --0.0624345 0 0.312464 192 192 192 255 --0.499986 0 0.374972 192 192 192 255 --0.437478 0 0.312464 192 192 192 255 --0.499986 0 0.249956 192 192 192 255 --0.625 0 0.374972 192 192 192 255 --0.562492 0 0.312464 192 192 192 255 --0.625 0 0.249956 192 192 192 255 --0.312464 0 0.18745 192 192 192 255 --0.249956 0 0.124942 192 192 192 255 --0.374972 0 0.124942 192 192 192 255 --0.18745 0 0.18745 192 192 192 255 --0.124942 0 0.124942 192 192 192 255 --0.0624345 0 0.18745 192 192 192 255 --0.437478 0 0.18745 192 192 192 255 --0.499986 0 0.124942 192 192 192 255 --0.562492 0 0.18745 192 192 192 255 --0.625 0 0.124942 192 192 192 255 --0.312464 0 0.0624346 192 192 192 255 --0.18745 0 0.0624346 192 192 192 255 --0.0624345 0 0.0624346 192 192 192 255 --0.437478 0 0.0624346 192 192 192 255 --0.562492 0 0.0624346 192 192 192 255 --0.374972 0 0.625 192 192 192 255 --0.249956 0 0.625 192 192 192 255 --0.312464 0 0.562492 192 192 192 255 --0.249956 0 0.499986 192 192 192 255 --0.374972 0 0.499986 192 192 192 255 --0.124942 0 0.625 192 192 192 255 --0.18745 0 0.562492 192 192 192 255 --0.124942 0 0.499986 192 192 192 255 --0.0624345 0 0.562492 192 192 192 255 --0.499986 0 0.625 192 192 192 255 --0.437478 0 0.562492 192 192 192 255 --0.499986 0 0.499986 192 192 192 255 --0.625 0 0.625 192 192 192 255 --0.562492 0 0.562492 192 192 192 255 --0.625 0 0.499986 192 192 192 255 --0.312464 0 0.437478 192 192 192 255 --0.18745 0 0.437478 192 192 192 255 --0.0624345 0 0.437478 192 192 192 255 --0.437478 0 0.437478 192 192 192 255 --0.562492 0 0.437478 192 192 192 255 --0.312464 0 -0.249956 192 192 192 255 --0.343718 0 -0.28121 192 192 192 255 --0.28121 0 -0.28121 192 192 192 255 --0.249956 0 -0.312464 192 192 192 255 --0.28121 0 -0.343718 192 192 192 255 --0.312464 0 -0.374972 192 192 192 255 --0.343718 0 -0.343718 192 192 192 255 --0.374972 0 -0.312464 192 192 192 255 --0.187449 0 -0.249956 192 192 192 255 --0.218703 0 -0.28121 192 192 192 255 --0.156196 0 -0.28121 192 192 192 255 --0.124942 0 -0.312464 192 192 192 255 --0.156196 0 -0.343718 192 192 192 255 --0.187449 0 -0.374972 192 192 192 255 --0.218703 0 -0.343718 192 192 192 255 --0.0624712 0 -0.249956 192 192 192 255 --0.0936884 0 -0.28121 192 192 192 255 --0.0312172 0 -0.28121 192 192 192 255 -1.49012e-008 0 -0.312464 192 192 192 255 --0.0312172 0 -0.343718 192 192 192 255 --0.0624712 0 -0.374972 192 192 192 255 --0.0936884 0 -0.343718 192 192 192 255 --0.437479 0 -0.249956 192 192 192 255 --0.468732 0 -0.28121 192 192 192 255 --0.406225 0 -0.28121 192 192 192 255 --0.406225 0 -0.343718 192 192 192 255 --0.437479 0 -0.374972 192 192 192 255 --0.468732 0 -0.343718 192 192 192 255 --0.499986 0 -0.312464 192 192 192 255 --0.562493 0 -0.249956 192 192 192 255 --0.593746 0 -0.28121 192 192 192 255 --0.531239 0 -0.28121 192 192 192 255 --0.531239 0 -0.343718 192 192 192 255 --0.562493 0 -0.374972 192 192 192 255 --0.593746 0 -0.343718 192 192 192 255 --0.625 0 -0.312464 192 192 192 255 --0.343718 0 -0.406225 192 192 192 255 --0.28121 0 -0.406225 192 192 192 255 --0.249956 0 -0.437479 192 192 192 255 --0.28121 0 -0.468732 192 192 192 255 --0.312464 0 -0.499986 192 192 192 255 --0.343718 0 -0.468732 192 192 192 255 --0.374972 0 -0.437479 192 192 192 255 --0.218703 0 -0.406225 192 192 192 255 --0.156196 0 -0.406225 192 192 192 255 --0.124942 0 -0.437479 192 192 192 255 --0.156196 0 -0.468732 192 192 192 255 --0.187449 0 -0.499986 192 192 192 255 --0.218703 0 -0.468732 192 192 192 255 --0.0936884 0 -0.406225 192 192 192 255 --0.0312172 0 -0.406225 192 192 192 255 -1.49012e-008 0 -0.437479 192 192 192 255 --0.0312172 0 -0.468732 192 192 192 255 --0.0624712 0 -0.499986 192 192 192 255 --0.0936884 0 -0.468732 192 192 192 255 --0.468732 0 -0.406225 192 192 192 255 --0.406225 0 -0.406225 192 192 192 255 --0.406225 0 -0.468732 192 192 192 255 --0.437479 0 -0.499986 192 192 192 255 --0.468732 0 -0.468732 192 192 192 255 --0.499986 0 -0.437479 192 192 192 255 --0.593746 0 -0.406225 192 192 192 255 --0.531239 0 -0.406225 192 192 192 255 --0.531239 0 -0.468732 192 192 192 255 --0.562493 0 -0.499986 192 192 192 255 --0.593746 0 -0.468732 192 192 192 255 --0.625 0 -0.437479 192 192 192 255 --0.343718 0 -0.531239 192 192 192 255 --0.28121 0 -0.531239 192 192 192 255 --0.249956 0 -0.562493 192 192 192 255 --0.28121 0 -0.593746 192 192 192 255 --0.312464 0 -0.625 192 192 192 255 --0.343718 0 -0.593746 192 192 192 255 --0.374972 0 -0.562493 192 192 192 255 --0.218703 0 -0.531239 192 192 192 255 --0.156196 0 -0.531239 192 192 192 255 --0.124942 0 -0.562493 192 192 192 255 --0.156196 0 -0.593746 192 192 192 255 --0.187449 0 -0.625 192 192 192 255 --0.218703 0 -0.593746 192 192 192 255 --0.0936884 0 -0.531239 192 192 192 255 --0.0312172 0 -0.531239 192 192 192 255 -1.49012e-008 0 -0.562493 192 192 192 255 --0.0312172 0 -0.593746 192 192 192 255 --0.0624712 0 -0.625 192 192 192 255 --0.0936884 0 -0.593746 192 192 192 255 --0.468732 0 -0.531239 192 192 192 255 --0.406225 0 -0.531239 192 192 192 255 --0.406225 0 -0.593746 192 192 192 255 --0.437479 0 -0.625 192 192 192 255 --0.468732 0 -0.593746 192 192 192 255 --0.499986 0 -0.562493 192 192 192 255 --0.593746 0 -0.531239 192 192 192 255 --0.531239 0 -0.531239 192 192 192 255 --0.531239 0 -0.593746 192 192 192 255 --0.562493 0 -0.625 192 192 192 255 --0.593746 0 -0.593746 192 192 192 255 --0.625 0 -0.562493 192 192 192 255 --0.312464 0 8.03719e-008 192 192 192 255 --0.343718 0 -0.0312172 192 192 192 255 --0.28121 0 -0.0312172 192 192 192 255 --0.249956 0 -0.0624711 192 192 192 255 --0.28121 0 -0.0936884 192 192 192 255 --0.312464 0 -0.124942 192 192 192 255 --0.343718 0 -0.0936884 192 192 192 255 --0.374972 0 -0.0624711 192 192 192 255 --0.187449 0 -1.78e-005 192 192 192 255 --0.218703 0 -0.0312172 192 192 192 255 --0.156196 0 -0.0312351 192 192 192 255 --0.124942 0 -0.062489 192 192 192 255 --0.156196 0 -0.0936884 192 192 192 255 --0.187449 0 -0.124942 192 192 192 255 --0.218703 0 -0.0936884 192 192 192 255 --0.0624712 0 -1.78e-005 192 192 192 255 --0.0936884 0 -0.0312351 192 192 192 255 --0.0312172 0 -0.0312172 192 192 192 255 -1.49012e-008 0 -0.0624711 192 192 192 255 --0.0312172 0 -0.0936884 192 192 192 255 --0.0624712 0 -0.124942 192 192 192 255 --0.0936884 0 -0.0936884 192 192 192 255 --0.437479 0 8.03719e-008 192 192 192 255 --0.468732 0 -0.0312172 192 192 192 255 --0.406225 0 -0.0312172 192 192 192 255 --0.406225 0 -0.0936884 192 192 192 255 --0.437479 0 -0.124942 192 192 192 255 --0.468732 0 -0.0936884 192 192 192 255 --0.499986 0 -0.0624711 192 192 192 255 --0.562493 0 8.03719e-008 192 192 192 255 --0.593746 0 -0.0312172 192 192 192 255 --0.531239 0 -0.0312172 192 192 192 255 --0.531239 0 -0.0936884 192 192 192 255 --0.562493 0 -0.124942 192 192 192 255 --0.593746 0 -0.0936884 192 192 192 255 --0.625 0 -0.0624711 192 192 192 255 --0.343718 0 -0.156196 192 192 192 255 --0.28121 0 -0.156196 192 192 192 255 --0.249956 0 -0.187449 192 192 192 255 --0.28121 0 -0.218703 192 192 192 255 --0.343718 0 -0.218703 192 192 192 255 --0.374972 0 -0.187449 192 192 192 255 --0.218703 0 -0.156196 192 192 192 255 --0.156196 0 -0.156196 192 192 192 255 --0.124942 0 -0.187449 192 192 192 255 --0.156196 0 -0.218703 192 192 192 255 --0.218703 0 -0.218703 192 192 192 255 --0.0936884 0 -0.156196 192 192 192 255 --0.0312172 0 -0.156196 192 192 192 255 -1.49012e-008 0 -0.187449 192 192 192 255 --0.0312172 0 -0.218703 192 192 192 255 --0.0936884 0 -0.218703 192 192 192 255 --0.468732 0 -0.156196 192 192 192 255 --0.406225 0 -0.156196 192 192 192 255 --0.406225 0 -0.218703 192 192 192 255 --0.468732 0 -0.218703 192 192 192 255 --0.499986 0 -0.187449 192 192 192 255 --0.593746 0 -0.156196 192 192 192 255 --0.531239 0 -0.156196 192 192 192 255 --0.531239 0 -0.218703 192 192 192 255 --0.593746 0 -0.218703 192 192 192 255 --0.625 0 -0.187449 192 192 192 255 -0.312464 0 -0.249956 192 192 192 255 -0.28121 0 -0.28121 192 192 192 255 -0.343718 0 -0.28121 192 192 192 255 -0.374972 0 -0.312464 192 192 192 255 -0.343718 0 -0.343718 192 192 192 255 -0.312464 0 -0.374972 192 192 192 255 -0.28121 0 -0.343718 192 192 192 255 -0.249956 0 -0.312464 192 192 192 255 -0.437479 0 -0.249956 192 192 192 255 -0.406225 0 -0.28121 192 192 192 255 -0.468732 0 -0.28121 192 192 192 255 -0.499986 0 -0.312464 192 192 192 255 -0.468732 0 -0.343718 192 192 192 255 -0.437479 0 -0.374972 192 192 192 255 -0.406225 0 -0.343718 192 192 192 255 -0.562493 0 -0.249956 192 192 192 255 -0.531239 0 -0.28121 192 192 192 255 -0.593746 0 -0.28121 192 192 192 255 -0.625 0 -0.312464 192 192 192 255 -0.593746 0 -0.343718 192 192 192 255 -0.562493 0 -0.374972 192 192 192 255 -0.531239 0 -0.343718 192 192 192 255 -0.187449 0 -0.249956 192 192 192 255 -0.156196 0 -0.28121 192 192 192 255 -0.218703 0 -0.28121 192 192 192 255 -0.218703 0 -0.343718 192 192 192 255 -0.187449 0 -0.374972 192 192 192 255 -0.156196 0 -0.343718 192 192 192 255 -0.124942 0 -0.312464 192 192 192 255 -0.0624712 0 -0.249956 192 192 192 255 -0.0312173 0 -0.28121 192 192 192 255 -0.0936885 0 -0.28121 192 192 192 255 -0.0936885 0 -0.343718 192 192 192 255 -0.0624712 0 -0.374972 192 192 192 255 -0.0312173 0 -0.343718 192 192 192 255 -0.28121 0 -0.406225 192 192 192 255 -0.343718 0 -0.406225 192 192 192 255 -0.374972 0 -0.437479 192 192 192 255 -0.343718 0 -0.468732 192 192 192 255 -0.312464 0 -0.499986 192 192 192 255 -0.28121 0 -0.468732 192 192 192 255 -0.249956 0 -0.437479 192 192 192 255 -0.406225 0 -0.406225 192 192 192 255 -0.468732 0 -0.406225 192 192 192 255 -0.499986 0 -0.437479 192 192 192 255 -0.468732 0 -0.468732 192 192 192 255 -0.437479 0 -0.499986 192 192 192 255 -0.406225 0 -0.468732 192 192 192 255 -0.531239 0 -0.406225 192 192 192 255 -0.593746 0 -0.406225 192 192 192 255 -0.625 0 -0.437479 192 192 192 255 -0.593746 0 -0.468732 192 192 192 255 -0.562493 0 -0.499986 192 192 192 255 -0.531239 0 -0.468732 192 192 192 255 -0.156196 0 -0.406225 192 192 192 255 -0.218703 0 -0.406225 192 192 192 255 -0.218703 0 -0.468732 192 192 192 255 -0.187449 0 -0.499986 192 192 192 255 -0.156196 0 -0.468732 192 192 192 255 -0.124942 0 -0.437479 192 192 192 255 -0.0312173 0 -0.406225 192 192 192 255 -0.0936885 0 -0.406225 192 192 192 255 -0.0936885 0 -0.468732 192 192 192 255 -0.0624712 0 -0.499986 192 192 192 255 -0.0312173 0 -0.468732 192 192 192 255 -0.28121 0 -0.531239 192 192 192 255 -0.343718 0 -0.531239 192 192 192 255 -0.374972 0 -0.562493 192 192 192 255 -0.343718 0 -0.593746 192 192 192 255 -0.312464 0 -0.625 192 192 192 255 -0.28121 0 -0.593746 192 192 192 255 -0.249956 0 -0.562493 192 192 192 255 -0.406225 0 -0.531239 192 192 192 255 -0.468732 0 -0.531239 192 192 192 255 -0.499986 0 -0.562493 192 192 192 255 -0.468732 0 -0.593746 192 192 192 255 -0.437479 0 -0.625 192 192 192 255 -0.406225 0 -0.593746 192 192 192 255 -0.531239 0 -0.531239 192 192 192 255 -0.593746 0 -0.531239 192 192 192 255 -0.625 0 -0.562493 192 192 192 255 -0.593746 0 -0.593746 192 192 192 255 -0.562493 0 -0.625 192 192 192 255 -0.531239 0 -0.593746 192 192 192 255 -0.156196 0 -0.531239 192 192 192 255 -0.218703 0 -0.531239 192 192 192 255 -0.218703 0 -0.593746 192 192 192 255 -0.187449 0 -0.625 192 192 192 255 -0.156196 0 -0.593746 192 192 192 255 -0.124942 0 -0.562493 192 192 192 255 -0.0312173 0 -0.531239 192 192 192 255 -0.0936885 0 -0.531239 192 192 192 255 -0.0936885 0 -0.593746 192 192 192 255 -0.0624712 0 -0.625 192 192 192 255 -0.0312173 0 -0.593746 192 192 192 255 -0.312464 0 8.03719e-008 192 192 192 255 -0.28121 0 -0.0312172 192 192 192 255 -0.343718 0 -0.0312172 192 192 192 255 -0.374972 0 -0.0624711 192 192 192 255 -0.343718 0 -0.0936884 192 192 192 255 -0.312464 0 -0.124942 192 192 192 255 -0.28121 0 -0.0936884 192 192 192 255 -0.249956 0 -0.0624711 192 192 192 255 -0.437479 0 8.03719e-008 192 192 192 255 -0.406225 0 -0.0312172 192 192 192 255 -0.468732 0 -0.0312172 192 192 192 255 -0.499986 0 -0.0624711 192 192 192 255 -0.468732 0 -0.0936884 192 192 192 255 -0.437479 0 -0.124942 192 192 192 255 -0.406225 0 -0.0936884 192 192 192 255 -0.562493 0 8.03719e-008 192 192 192 255 -0.531239 0 -0.0312172 192 192 192 255 -0.593746 0 -0.0312172 192 192 192 255 -0.625 0 -0.0624711 192 192 192 255 -0.593746 0 -0.0936884 192 192 192 255 -0.562493 0 -0.124942 192 192 192 255 -0.531239 0 -0.0936884 192 192 192 255 -0.187449 0 8.03719e-008 192 192 192 255 -0.156196 0 -0.0312172 192 192 192 255 -0.218703 0 -0.0312172 192 192 192 255 -0.218703 0 -0.0936884 192 192 192 255 -0.187449 0 -0.124942 192 192 192 255 -0.156196 0 -0.0936884 192 192 192 255 -0.124942 0 -0.0624711 192 192 192 255 -0.0624712 0 8.03719e-008 192 192 192 255 -0.0312173 0 -0.0312172 192 192 192 255 -0.0936885 0 -0.0312172 192 192 192 255 -0.0936885 0 -0.0936884 192 192 192 255 -0.0624712 0 -0.124942 192 192 192 255 -0.0312173 0 -0.0936884 192 192 192 255 -0.28121 0 -0.156196 192 192 192 255 -0.343718 0 -0.156196 192 192 192 255 -0.374972 0 -0.187449 192 192 192 255 -0.343718 0 -0.218703 192 192 192 255 -0.28121 0 -0.218703 192 192 192 255 -0.249956 0 -0.187449 192 192 192 255 -0.406225 0 -0.156196 192 192 192 255 -0.468732 0 -0.156196 192 192 192 255 -0.499986 0 -0.187449 192 192 192 255 -0.468732 0 -0.218703 192 192 192 255 -0.406225 0 -0.218703 192 192 192 255 -0.531239 0 -0.156196 192 192 192 255 -0.593746 0 -0.156196 192 192 192 255 -0.625 0 -0.187449 192 192 192 255 -0.593746 0 -0.218703 192 192 192 255 -0.531239 0 -0.218703 192 192 192 255 -0.156196 0 -0.156196 192 192 192 255 -0.218703 0 -0.156196 192 192 192 255 -0.218703 0 -0.218703 192 192 192 255 -0.156196 0 -0.218703 192 192 192 255 -0.124942 0 -0.187449 192 192 192 255 -0.0312173 0 -0.156196 192 192 192 255 -0.0936885 0 -0.156196 192 192 192 255 -0.0936885 0 -0.218703 192 192 192 255 -0.0312173 0 -0.218703 192 192 192 255 -0.312464 0 0.374972 192 192 192 255 -0.28121 0 0.343718 192 192 192 255 -0.343718 0 0.343718 192 192 192 255 -0.374972 0 0.312464 192 192 192 255 -0.343718 0 0.28121 192 192 192 255 -0.312464 0 0.249956 192 192 192 255 -0.28121 0 0.28121 192 192 192 255 -0.249956 0 0.312464 192 192 192 255 -0.437479 0 0.374972 192 192 192 255 -0.406225 0 0.343718 192 192 192 255 -0.468732 0 0.343718 192 192 192 255 -0.499986 0 0.312464 192 192 192 255 -0.468732 0 0.28121 192 192 192 255 -0.437479 0 0.249956 192 192 192 255 -0.406225 0 0.28121 192 192 192 255 -0.562493 0 0.374972 192 192 192 255 -0.531239 0 0.343718 192 192 192 255 -0.593746 0 0.343718 192 192 192 255 -0.625 0 0.312464 192 192 192 255 -0.593746 0 0.28121 192 192 192 255 -0.562493 0 0.249956 192 192 192 255 -0.531239 0 0.28121 192 192 192 255 -0.187449 0 0.374972 192 192 192 255 -0.156196 0 0.343718 192 192 192 255 -0.218703 0 0.343718 192 192 192 255 -0.218703 0 0.28121 192 192 192 255 -0.187449 0 0.249956 192 192 192 255 -0.156196 0 0.28121 192 192 192 255 -0.124942 0 0.312464 192 192 192 255 -0.0624712 0 0.374972 192 192 192 255 -0.0312173 0 0.343718 192 192 192 255 -0.0936885 0 0.343718 192 192 192 255 -0.0936885 0 0.28121 192 192 192 255 -0.0624712 0 0.249956 192 192 192 255 -0.0312173 0 0.28121 192 192 192 255 -1.49012e-008 0 0.312464 192 192 192 255 -0.28121 0 0.218703 192 192 192 255 -0.343718 0 0.218703 192 192 192 255 -0.374972 0 0.187449 192 192 192 255 -0.343718 0 0.156196 192 192 192 255 -0.312464 0 0.124942 192 192 192 255 -0.28121 0 0.156196 192 192 192 255 -0.249956 0 0.187449 192 192 192 255 -0.406225 0 0.218703 192 192 192 255 -0.468732 0 0.218703 192 192 192 255 -0.499986 0 0.187449 192 192 192 255 -0.468732 0 0.156196 192 192 192 255 -0.437479 0 0.124942 192 192 192 255 -0.406225 0 0.156196 192 192 192 255 -0.531239 0 0.218703 192 192 192 255 -0.593746 0 0.218703 192 192 192 255 -0.625 0 0.187449 192 192 192 255 -0.593746 0 0.156196 192 192 192 255 -0.562493 0 0.124942 192 192 192 255 -0.531239 0 0.156196 192 192 192 255 -0.156196 0 0.218703 192 192 192 255 -0.218703 0 0.218703 192 192 192 255 -0.218703 0 0.156196 192 192 192 255 -0.187449 0 0.124942 192 192 192 255 -0.156196 0 0.156196 192 192 192 255 -0.124942 0 0.187449 192 192 192 255 -0.0312173 0 0.218703 192 192 192 255 -0.0936885 0 0.218703 192 192 192 255 -0.0936885 0 0.156196 192 192 192 255 -0.0624712 0 0.124942 192 192 192 255 -0.0312173 0 0.156196 192 192 192 255 -1.49012e-008 0 0.187449 192 192 192 255 -0.28121 0 0.0936885 192 192 192 255 -0.343718 0 0.0936885 192 192 192 255 -0.374972 0 0.0624713 192 192 192 255 -0.343718 0 0.0312173 192 192 192 255 -0.28121 0 0.0312173 192 192 192 255 -0.249956 0 0.0624713 192 192 192 255 -0.406225 0 0.0936885 192 192 192 255 -0.468732 0 0.0936885 192 192 192 255 -0.499986 0 0.0624713 192 192 192 255 -0.468732 0 0.0312173 192 192 192 255 -0.406225 0 0.0312173 192 192 192 255 -0.531239 0 0.0936885 192 192 192 255 -0.593746 0 0.0936885 192 192 192 255 -0.625 0 0.0624713 192 192 192 255 -0.593746 0 0.0312173 192 192 192 255 -0.531239 0 0.0312173 192 192 192 255 -0.156196 0 0.0936885 192 192 192 255 -0.218703 0 0.0936885 192 192 192 255 -0.218703 0 0.0312173 192 192 192 255 -0.156196 0 0.0312173 192 192 192 255 -0.124942 0 0.0624713 192 192 192 255 -0.0312173 0 0.0936885 192 192 192 255 -0.0936885 0 0.0936885 192 192 192 255 -0.0936885 0 0.0312173 192 192 192 255 -0.0312173 0 0.0312173 192 192 192 255 -1.49012e-008 0 0.0624713 192 192 192 255 -0.312464 0 0.625 192 192 192 255 -0.28121 0 0.593746 192 192 192 255 -0.343718 0 0.593746 192 192 192 255 -0.374972 0 0.562493 192 192 192 255 -0.343718 0 0.531239 192 192 192 255 -0.312464 0 0.499986 192 192 192 255 -0.28121 0 0.531239 192 192 192 255 -0.249956 0 0.562493 192 192 192 255 -0.437479 0 0.625 192 192 192 255 -0.406225 0 0.593746 192 192 192 255 -0.468732 0 0.593746 192 192 192 255 -0.499986 0 0.562493 192 192 192 255 -0.468732 0 0.531239 192 192 192 255 -0.437479 0 0.499986 192 192 192 255 -0.406225 0 0.531239 192 192 192 255 -0.562493 0 0.625 192 192 192 255 -0.531239 0 0.593746 192 192 192 255 -0.593746 0 0.593746 192 192 192 255 -0.625 0 0.562493 192 192 192 255 -0.593746 0 0.531239 192 192 192 255 -0.562493 0 0.499986 192 192 192 255 -0.531239 0 0.531239 192 192 192 255 -0.187449 0 0.625 192 192 192 255 -0.156196 0 0.593746 192 192 192 255 -0.218703 0 0.593746 192 192 192 255 -0.218703 0 0.531239 192 192 192 255 -0.187449 0 0.499986 192 192 192 255 -0.156196 0 0.531239 192 192 192 255 -0.124942 0 0.562493 192 192 192 255 -0.0624712 0 0.625 192 192 192 255 -0.0312173 0 0.593746 192 192 192 255 -0.0936885 0 0.593746 192 192 192 255 -0.0936885 0 0.531239 192 192 192 255 -0.0624712 0 0.499986 192 192 192 255 -0.0312173 0 0.531239 192 192 192 255 -1.49012e-008 0 0.562493 192 192 192 255 -0.28121 0 0.468732 192 192 192 255 -0.343718 0 0.468732 192 192 192 255 -0.374972 0 0.437479 192 192 192 255 -0.343718 0 0.406225 192 192 192 255 -0.28121 0 0.406225 192 192 192 255 -0.249956 0 0.437479 192 192 192 255 -0.406225 0 0.468732 192 192 192 255 -0.468732 0 0.468732 192 192 192 255 -0.499986 0 0.437479 192 192 192 255 -0.468732 0 0.406225 192 192 192 255 -0.406225 0 0.406225 192 192 192 255 -0.531239 0 0.468732 192 192 192 255 -0.593746 0 0.468732 192 192 192 255 -0.625 0 0.437479 192 192 192 255 -0.593746 0 0.406225 192 192 192 255 -0.531239 0 0.406225 192 192 192 255 -0.156196 0 0.468732 192 192 192 255 -0.218703 0 0.468732 192 192 192 255 -0.218703 0 0.406225 192 192 192 255 -0.156196 0 0.406225 192 192 192 255 -0.124942 0 0.437479 192 192 192 255 -0.0312173 0 0.468732 192 192 192 255 -0.0936885 0 0.468732 192 192 192 255 -0.0936885 0 0.406225 192 192 192 255 -0.0312173 0 0.406225 192 192 192 255 -1.49012e-008 0 0.437479 192 192 192 255 --0.312464 0 0.374972 192 192 192 255 --0.343718 0 0.343718 192 192 192 255 --0.28121 0 0.343718 192 192 192 255 --0.249956 0 0.312464 192 192 192 255 --0.28121 0 0.28121 192 192 192 255 --0.312464 0 0.249956 192 192 192 255 --0.343718 0 0.28121 192 192 192 255 --0.374972 0 0.312464 192 192 192 255 --0.187449 0 0.374972 192 192 192 255 --0.218703 0 0.343718 192 192 192 255 --0.156196 0 0.343718 192 192 192 255 --0.124942 0 0.312464 192 192 192 255 --0.156196 0 0.28121 192 192 192 255 --0.187449 0 0.249956 192 192 192 255 --0.218703 0 0.28121 192 192 192 255 --0.0624712 0 0.374972 192 192 192 255 --0.0936884 0 0.343718 192 192 192 255 --0.0312172 0 0.343718 192 192 192 255 --0.0312172 0 0.28121 192 192 192 255 --0.0624712 0 0.249956 192 192 192 255 --0.0936884 0 0.28121 192 192 192 255 --0.437479 0 0.374972 192 192 192 255 --0.468732 0 0.343718 192 192 192 255 --0.406225 0 0.343718 192 192 192 255 --0.406225 0 0.28121 192 192 192 255 --0.437479 0 0.249956 192 192 192 255 --0.468732 0 0.28121 192 192 192 255 --0.499986 0 0.312464 192 192 192 255 --0.562493 0 0.374972 192 192 192 255 --0.593746 0 0.343718 192 192 192 255 --0.531239 0 0.343718 192 192 192 255 --0.531239 0 0.28121 192 192 192 255 --0.562493 0 0.249956 192 192 192 255 --0.593746 0 0.28121 192 192 192 255 --0.625 0 0.312464 192 192 192 255 --0.343718 0 0.218703 192 192 192 255 --0.28121 0 0.218703 192 192 192 255 --0.249956 0 0.187449 192 192 192 255 --0.28121 0 0.156196 192 192 192 255 --0.312464 0 0.124942 192 192 192 255 --0.343718 0 0.156196 192 192 192 255 --0.374972 0 0.187449 192 192 192 255 --0.218703 0 0.218703 192 192 192 255 --0.156196 0 0.218703 192 192 192 255 --0.124942 0 0.187449 192 192 192 255 --0.156196 0 0.156196 192 192 192 255 --0.187449 0 0.124942 192 192 192 255 --0.218703 0 0.156196 192 192 192 255 --0.0936884 0 0.218703 192 192 192 255 --0.0312172 0 0.218703 192 192 192 255 --0.0312172 0 0.156196 192 192 192 255 --0.0624712 0 0.124942 192 192 192 255 --0.0936884 0 0.156196 192 192 192 255 --0.468732 0 0.218703 192 192 192 255 --0.406225 0 0.218703 192 192 192 255 --0.406225 0 0.156196 192 192 192 255 --0.437479 0 0.124942 192 192 192 255 --0.468732 0 0.156196 192 192 192 255 --0.499986 0 0.187449 192 192 192 255 --0.593746 0 0.218703 192 192 192 255 --0.531239 0 0.218703 192 192 192 255 --0.531239 0 0.156196 192 192 192 255 --0.562493 0 0.124942 192 192 192 255 --0.593746 0 0.156196 192 192 192 255 --0.625 0 0.187449 192 192 192 255 --0.343718 0 0.0936885 192 192 192 255 --0.28121 0 0.0936885 192 192 192 255 --0.249956 0 0.0624713 192 192 192 255 --0.28121 0 0.0312173 192 192 192 255 --0.343718 0 0.0312173 192 192 192 255 --0.374972 0 0.0624713 192 192 192 255 --0.218703 0 0.0936885 192 192 192 255 --0.156196 0 0.0936885 192 192 192 255 --0.124942 0 0.0624534 192 192 192 255 --0.156196 0 0.0311995 192 192 192 255 --0.218703 0 0.0312173 192 192 192 255 --0.0936884 0 0.0936885 192 192 192 255 --0.0312172 0 0.0936885 192 192 192 255 --0.0312172 0 0.0312173 192 192 192 255 --0.0936884 0 0.0311995 192 192 192 255 --0.468732 0 0.0936885 192 192 192 255 --0.406225 0 0.0936885 192 192 192 255 --0.406225 0 0.0312173 192 192 192 255 --0.468732 0 0.0312173 192 192 192 255 --0.499986 0 0.0624713 192 192 192 255 --0.593746 0 0.0936885 192 192 192 255 --0.531239 0 0.0936885 192 192 192 255 --0.531239 0 0.0312173 192 192 192 255 --0.593746 0 0.0312173 192 192 192 255 --0.625 0 0.0624713 192 192 192 255 --0.312464 0 0.625 192 192 192 255 --0.343718 0 0.593746 192 192 192 255 --0.28121 0 0.593746 192 192 192 255 --0.249956 0 0.562493 192 192 192 255 --0.28121 0 0.531239 192 192 192 255 --0.312464 0 0.499986 192 192 192 255 --0.343718 0 0.531239 192 192 192 255 --0.374972 0 0.562493 192 192 192 255 --0.187449 0 0.625 192 192 192 255 --0.218703 0 0.593746 192 192 192 255 --0.156196 0 0.593746 192 192 192 255 --0.124942 0 0.562493 192 192 192 255 --0.156196 0 0.531239 192 192 192 255 --0.187449 0 0.499986 192 192 192 255 --0.218703 0 0.531239 192 192 192 255 --0.0624712 0 0.625 192 192 192 255 --0.0936884 0 0.593746 192 192 192 255 --0.0312172 0 0.593746 192 192 192 255 --0.0312172 0 0.531239 192 192 192 255 --0.0624712 0 0.499986 192 192 192 255 --0.0936884 0 0.531239 192 192 192 255 --0.437479 0 0.625 192 192 192 255 --0.468732 0 0.593746 192 192 192 255 --0.406225 0 0.593746 192 192 192 255 --0.406225 0 0.531239 192 192 192 255 --0.437479 0 0.499986 192 192 192 255 --0.468732 0 0.531239 192 192 192 255 --0.499986 0 0.562493 192 192 192 255 --0.562493 0 0.625 192 192 192 255 --0.593746 0 0.593746 192 192 192 255 --0.531239 0 0.593746 192 192 192 255 --0.531239 0 0.531239 192 192 192 255 --0.562493 0 0.499986 192 192 192 255 --0.593746 0 0.531239 192 192 192 255 --0.625 0 0.562493 192 192 192 255 --0.343718 0 0.468732 192 192 192 255 --0.28121 0 0.468732 192 192 192 255 --0.249956 0 0.437479 192 192 192 255 --0.28121 0 0.406225 192 192 192 255 --0.343718 0 0.406225 192 192 192 255 --0.374972 0 0.437479 192 192 192 255 --0.218703 0 0.468732 192 192 192 255 --0.156196 0 0.468732 192 192 192 255 --0.124942 0 0.437479 192 192 192 255 --0.156196 0 0.406225 192 192 192 255 --0.218703 0 0.406225 192 192 192 255 --0.0936884 0 0.468732 192 192 192 255 --0.0312172 0 0.468732 192 192 192 255 --0.0312172 0 0.406225 192 192 192 255 --0.0936884 0 0.406225 192 192 192 255 --0.468732 0 0.468732 192 192 192 255 --0.406225 0 0.468732 192 192 192 255 --0.406225 0 0.406225 192 192 192 255 --0.468732 0 0.406225 192 192 192 255 --0.499986 0 0.437479 192 192 192 255 --0.593746 0 0.468732 192 192 192 255 --0.531239 0 0.468732 192 192 192 255 --0.531239 0 0.406225 192 192 192 255 --0.593746 0 0.406225 192 192 192 255 --0.625 0 0.437479 192 192 192 255 -3 0 221 222 -3 221 1 223 -3 221 223 222 -3 222 223 2 -3 1 224 223 -3 224 3 225 -3 224 225 223 -3 223 225 2 -3 3 226 225 -3 226 4 227 -3 226 227 225 -3 225 227 2 -3 4 228 227 -3 228 0 222 -3 228 222 227 -3 227 222 2 -3 1 229 230 -3 229 5 231 -3 229 231 230 -3 230 231 6 -3 5 232 231 -3 232 7 233 -3 232 233 231 -3 231 233 6 -3 7 234 233 -3 234 3 235 -3 234 235 233 -3 233 235 6 -3 3 224 235 -3 224 1 230 -3 224 230 235 -3 235 230 6 -3 5 236 237 -3 236 8 238 -3 236 238 237 -3 237 238 9 -3 8 239 238 -3 239 10 240 -3 239 240 238 -3 238 240 9 -3 10 241 240 -3 241 7 242 -3 241 242 240 -3 240 242 9 -3 7 232 242 -3 232 5 237 -3 232 237 242 -3 242 237 9 -3 11 243 244 -3 243 0 245 -3 243 245 244 -3 244 245 12 -3 0 228 245 -3 228 4 246 -3 228 246 245 -3 245 246 12 -3 4 247 246 -3 247 13 248 -3 247 248 246 -3 246 248 12 -3 13 249 248 -3 249 11 244 -3 249 244 248 -3 248 244 12 -3 14 250 251 -3 250 11 252 -3 250 252 251 -3 251 252 15 -3 11 249 252 -3 249 13 253 -3 249 253 252 -3 252 253 15 -3 13 254 253 -3 254 16 255 -3 254 255 253 -3 253 255 15 -3 16 256 255 -3 256 14 251 -3 256 251 255 -3 255 251 15 -3 4 226 257 -3 226 3 258 -3 226 258 257 -3 257 258 17 -3 3 259 258 -3 259 18 260 -3 259 260 258 -3 258 260 17 -3 18 261 260 -3 261 19 262 -3 261 262 260 -3 260 262 17 -3 19 263 262 -3 263 4 257 -3 263 257 262 -3 262 257 17 -3 3 234 264 -3 234 7 265 -3 234 265 264 -3 264 265 20 -3 7 266 265 -3 266 21 267 -3 266 267 265 -3 265 267 20 -3 21 268 267 -3 268 18 269 -3 268 269 267 -3 267 269 20 -3 18 259 269 -3 259 3 264 -3 259 264 269 -3 269 264 20 -3 7 241 270 -3 241 10 271 -3 241 271 270 -3 270 271 22 -3 10 272 271 -3 272 23 273 -3 272 273 271 -3 271 273 22 -3 23 274 273 -3 274 21 275 -3 274 275 273 -3 273 275 22 -3 21 266 275 -3 266 7 270 -3 266 270 275 -3 275 270 22 -3 13 247 276 -3 247 4 277 -3 247 277 276 -3 276 277 24 -3 4 263 277 -3 263 19 278 -3 263 278 277 -3 277 278 24 -3 19 279 278 -3 279 25 280 -3 279 280 278 -3 278 280 24 -3 25 281 280 -3 281 13 276 -3 281 276 280 -3 280 276 24 -3 16 254 282 -3 254 13 283 -3 254 283 282 -3 282 283 26 -3 13 281 283 -3 281 25 284 -3 281 284 283 -3 283 284 26 -3 25 285 284 -3 285 27 286 -3 285 286 284 -3 284 286 26 -3 27 287 286 -3 287 16 282 -3 287 282 286 -3 286 282 26 -3 19 261 288 -3 261 18 289 -3 261 289 288 -3 288 289 28 -3 18 290 289 -3 290 29 291 -3 290 291 289 -3 289 291 28 -3 29 292 291 -3 292 30 293 -3 292 293 291 -3 291 293 28 -3 30 294 293 -3 294 19 288 -3 294 288 293 -3 293 288 28 -3 18 268 295 -3 268 21 296 -3 268 296 295 -3 295 296 31 -3 21 297 296 -3 297 32 298 -3 297 298 296 -3 296 298 31 -3 32 299 298 -3 299 29 300 -3 299 300 298 -3 298 300 31 -3 29 290 300 -3 290 18 295 -3 290 295 300 -3 300 295 31 -3 21 274 301 -3 274 23 302 -3 274 302 301 -3 301 302 33 -3 23 303 302 -3 303 34 304 -3 303 304 302 -3 302 304 33 -3 34 305 304 -3 305 32 306 -3 305 306 304 -3 304 306 33 -3 32 297 306 -3 297 21 301 -3 297 301 306 -3 306 301 33 -3 25 279 307 -3 279 19 308 -3 279 308 307 -3 307 308 35 -3 19 294 308 -3 294 30 309 -3 294 309 308 -3 308 309 35 -3 30 310 309 -3 310 36 311 -3 310 311 309 -3 309 311 35 -3 36 312 311 -3 312 25 307 -3 312 307 311 -3 311 307 35 -3 27 285 313 -3 285 25 314 -3 285 314 313 -3 313 314 37 -3 25 312 314 -3 312 36 315 -3 312 315 314 -3 314 315 37 -3 36 316 315 -3 316 38 317 -3 316 317 315 -3 315 317 37 -3 38 318 317 -3 318 27 313 -3 318 313 317 -3 317 313 37 -3 39 319 320 -3 319 40 321 -3 319 321 320 -3 320 321 41 -3 40 322 321 -3 322 42 323 -3 322 323 321 -3 321 323 41 -3 42 324 323 -3 324 43 325 -3 324 325 323 -3 323 325 41 -3 43 326 325 -3 326 39 320 -3 326 320 325 -3 325 320 41 -3 40 327 328 -3 327 44 329 -3 327 329 328 -3 328 329 45 -3 44 330 329 -3 330 46 331 -3 330 331 329 -3 329 331 45 -3 46 332 331 -3 332 42 333 -3 332 333 331 -3 331 333 45 -3 42 322 333 -3 322 40 328 -3 322 328 333 -3 333 328 45 -3 44 334 335 -3 334 47 336 -3 334 336 335 -3 335 336 48 -3 47 337 336 -3 337 49 338 -3 337 338 336 -3 336 338 48 -3 49 339 338 -3 339 46 340 -3 339 340 338 -3 338 340 48 -3 46 330 340 -3 330 44 335 -3 330 335 340 -3 340 335 48 -3 50 341 342 -3 341 39 343 -3 341 343 342 -3 342 343 51 -3 39 326 343 -3 326 43 344 -3 326 344 343 -3 343 344 51 -3 43 345 344 -3 345 52 346 -3 345 346 344 -3 344 346 51 -3 52 347 346 -3 347 50 342 -3 347 342 346 -3 346 342 51 -3 53 348 349 -3 348 50 350 -3 348 350 349 -3 349 350 54 -3 50 347 350 -3 347 52 351 -3 347 351 350 -3 350 351 54 -3 52 352 351 -3 352 55 353 -3 352 353 351 -3 351 353 54 -3 55 354 353 -3 354 53 349 -3 354 349 353 -3 353 349 54 -3 43 324 355 -3 324 42 356 -3 324 356 355 -3 355 356 56 -3 42 357 356 -3 357 1 358 -3 357 358 356 -3 356 358 56 -3 1 221 358 -3 221 0 359 -3 221 359 358 -3 358 359 56 -3 0 360 359 -3 360 43 355 -3 360 355 359 -3 359 355 56 -3 42 332 361 -3 332 46 362 -3 332 362 361 -3 361 362 57 -3 46 363 362 -3 363 5 364 -3 363 364 362 -3 362 364 57 -3 5 229 364 -3 229 1 365 -3 229 365 364 -3 364 365 57 -3 1 357 365 -3 357 42 361 -3 357 361 365 -3 365 361 57 -3 46 339 366 -3 339 49 367 -3 339 367 366 -3 366 367 58 -3 49 368 367 -3 368 8 369 -3 368 369 367 -3 367 369 58 -3 8 236 369 -3 236 5 370 -3 236 370 369 -3 369 370 58 -3 5 363 370 -3 363 46 366 -3 363 366 370 -3 370 366 58 -3 52 345 371 -3 345 43 372 -3 345 372 371 -3 371 372 59 -3 43 360 372 -3 360 0 373 -3 360 373 372 -3 372 373 59 -3 0 243 373 -3 243 11 374 -3 243 374 373 -3 373 374 59 -3 11 375 374 -3 375 52 371 -3 375 371 374 -3 374 371 59 -3 55 352 376 -3 352 52 377 -3 352 377 376 -3 376 377 60 -3 52 375 377 -3 375 11 378 -3 375 378 377 -3 377 378 60 -3 11 250 378 -3 250 14 379 -3 250 379 378 -3 378 379 60 -3 14 380 379 -3 380 55 376 -3 380 376 379 -3 379 376 60 -3 61 381 382 -3 381 62 383 -3 381 383 382 -3 382 383 63 -3 62 384 383 -3 384 64 385 -3 384 385 383 -3 383 385 63 -3 64 386 385 -3 386 65 387 -3 386 387 385 -3 385 387 63 -3 65 388 387 -3 388 61 382 -3 388 382 387 -3 387 382 63 -3 62 389 390 -3 389 66 391 -3 389 391 390 -3 390 391 67 -3 66 392 391 -3 392 68 393 -3 392 393 391 -3 391 393 67 -3 68 394 393 -3 394 64 395 -3 394 395 393 -3 393 395 67 -3 64 384 395 -3 384 62 390 -3 384 390 395 -3 395 390 67 -3 66 396 397 -3 396 69 398 -3 396 398 397 -3 397 398 70 -3 69 399 398 -3 399 71 400 -3 399 400 398 -3 398 400 70 -3 71 401 400 -3 401 68 402 -3 401 402 400 -3 400 402 70 -3 68 392 402 -3 392 66 397 -3 392 397 402 -3 402 397 70 -3 72 403 404 -3 403 61 405 -3 403 405 404 -3 404 405 73 -3 61 388 405 -3 388 65 406 -3 388 406 405 -3 405 406 73 -3 65 407 406 -3 407 74 408 -3 407 408 406 -3 406 408 73 -3 74 409 408 -3 409 72 404 -3 409 404 408 -3 408 404 73 -3 8 410 411 -3 410 72 412 -3 410 412 411 -3 411 412 75 -3 72 409 412 -3 409 74 413 -3 409 413 412 -3 412 413 75 -3 74 414 413 -3 414 10 415 -3 414 415 413 -3 413 415 75 -3 10 239 415 -3 239 8 411 -3 239 411 415 -3 415 411 75 -3 65 386 416 -3 386 64 417 -3 386 417 416 -3 416 417 76 -3 64 418 417 -3 418 77 419 -3 418 419 417 -3 417 419 76 -3 77 420 419 -3 420 78 421 -3 420 421 419 -3 419 421 76 -3 78 422 421 -3 422 65 416 -3 422 416 421 -3 421 416 76 -3 64 394 423 -3 394 68 424 -3 394 424 423 -3 423 424 79 -3 68 425 424 -3 425 80 426 -3 425 426 424 -3 424 426 79 -3 80 427 426 -3 427 77 428 -3 427 428 426 -3 426 428 79 -3 77 418 428 -3 418 64 423 -3 418 423 428 -3 428 423 79 -3 68 401 429 -3 401 71 430 -3 401 430 429 -3 429 430 81 -3 71 431 430 -3 431 82 432 -3 431 432 430 -3 430 432 81 -3 82 433 432 -3 433 80 434 -3 433 434 432 -3 432 434 81 -3 80 425 434 -3 425 68 429 -3 425 429 434 -3 434 429 81 -3 74 407 435 -3 407 65 436 -3 407 436 435 -3 435 436 83 -3 65 422 436 -3 422 78 437 -3 422 437 436 -3 436 437 83 -3 78 438 437 -3 438 84 439 -3 438 439 437 -3 437 439 83 -3 84 440 439 -3 440 74 435 -3 440 435 439 -3 439 435 83 -3 10 414 441 -3 414 74 442 -3 414 442 441 -3 441 442 85 -3 74 440 442 -3 440 84 443 -3 440 443 442 -3 442 443 85 -3 84 444 443 -3 444 23 445 -3 444 445 443 -3 443 445 85 -3 23 272 445 -3 272 10 441 -3 272 441 445 -3 445 441 85 -3 78 420 446 -3 420 77 447 -3 420 447 446 -3 446 447 86 -3 77 448 447 -3 448 87 449 -3 448 449 447 -3 447 449 86 -3 87 450 449 -3 450 88 451 -3 450 451 449 -3 449 451 86 -3 88 452 451 -3 452 78 446 -3 452 446 451 -3 451 446 86 -3 77 427 453 -3 427 80 454 -3 427 454 453 -3 453 454 89 -3 80 455 454 -3 455 90 456 -3 455 456 454 -3 454 456 89 -3 90 457 456 -3 457 87 458 -3 457 458 456 -3 456 458 89 -3 87 448 458 -3 448 77 453 -3 448 453 458 -3 458 453 89 -3 80 433 459 -3 433 82 460 -3 433 460 459 -3 459 460 91 -3 82 461 460 -3 461 92 462 -3 461 462 460 -3 460 462 91 -3 92 463 462 -3 463 90 464 -3 463 464 462 -3 462 464 91 -3 90 455 464 -3 455 80 459 -3 455 459 464 -3 464 459 91 -3 84 438 465 -3 438 78 466 -3 438 466 465 -3 465 466 93 -3 78 452 466 -3 452 88 467 -3 452 467 466 -3 466 467 93 -3 88 468 467 -3 468 94 469 -3 468 469 467 -3 467 469 93 -3 94 470 469 -3 470 84 465 -3 470 465 469 -3 469 465 93 -3 23 444 471 -3 444 84 472 -3 444 472 471 -3 471 472 95 -3 84 470 472 -3 470 94 473 -3 470 473 472 -3 472 473 95 -3 94 474 473 -3 474 34 475 -3 474 475 473 -3 473 475 95 -3 34 303 475 -3 303 23 471 -3 303 471 475 -3 475 471 95 -3 96 476 477 -3 476 97 478 -3 476 478 477 -3 477 478 98 -3 97 479 478 -3 479 99 480 -3 479 480 478 -3 478 480 98 -3 99 481 480 -3 481 100 482 -3 481 482 480 -3 480 482 98 -3 100 483 482 -3 483 96 477 -3 483 477 482 -3 482 477 98 -3 97 484 485 -3 484 101 486 -3 484 486 485 -3 485 486 102 -3 101 487 486 -3 487 103 488 -3 487 488 486 -3 486 488 102 -3 103 489 488 -3 489 99 490 -3 489 490 488 -3 488 490 102 -3 99 479 490 -3 479 97 485 -3 479 485 490 -3 490 485 102 -3 101 491 492 -3 491 104 493 -3 491 493 492 -3 492 493 105 -3 104 494 493 -3 494 106 495 -3 494 495 493 -3 493 495 105 -3 106 496 495 -3 496 103 497 -3 496 497 495 -3 495 497 105 -3 103 487 497 -3 487 101 492 -3 487 492 497 -3 497 492 105 -3 107 498 499 -3 498 96 500 -3 498 500 499 -3 499 500 108 -3 96 483 500 -3 483 100 501 -3 483 501 500 -3 500 501 108 -3 100 502 501 -3 502 109 503 -3 502 503 501 -3 501 503 108 -3 109 504 503 -3 504 107 499 -3 504 499 503 -3 503 499 108 -3 47 505 506 -3 505 107 507 -3 505 507 506 -3 506 507 110 -3 107 504 507 -3 504 109 508 -3 504 508 507 -3 507 508 110 -3 109 509 508 -3 509 49 510 -3 509 510 508 -3 508 510 110 -3 49 337 510 -3 337 47 506 -3 337 506 510 -3 510 506 110 -3 100 481 511 -3 481 99 512 -3 481 512 511 -3 511 512 111 -3 99 513 512 -3 513 62 514 -3 513 514 512 -3 512 514 111 -3 62 381 514 -3 381 61 515 -3 381 515 514 -3 514 515 111 -3 61 516 515 -3 516 100 511 -3 516 511 515 -3 515 511 111 -3 99 489 517 -3 489 103 518 -3 489 518 517 -3 517 518 112 -3 103 519 518 -3 519 66 520 -3 519 520 518 -3 518 520 112 -3 66 389 520 -3 389 62 521 -3 389 521 520 -3 520 521 112 -3 62 513 521 -3 513 99 517 -3 513 517 521 -3 521 517 112 -3 103 496 522 -3 496 106 523 -3 496 523 522 -3 522 523 113 -3 106 524 523 -3 524 69 525 -3 524 525 523 -3 523 525 113 -3 69 396 525 -3 396 66 526 -3 396 526 525 -3 525 526 113 -3 66 519 526 -3 519 103 522 -3 519 522 526 -3 526 522 113 -3 109 502 527 -3 502 100 528 -3 502 528 527 -3 527 528 114 -3 100 516 528 -3 516 61 529 -3 516 529 528 -3 528 529 114 -3 61 403 529 -3 403 72 530 -3 403 530 529 -3 529 530 114 -3 72 531 530 -3 531 109 527 -3 531 527 530 -3 530 527 114 -3 49 509 532 -3 509 109 533 -3 509 533 532 -3 532 533 115 -3 109 531 533 -3 531 72 534 -3 531 534 533 -3 533 534 115 -3 72 410 534 -3 410 8 535 -3 410 535 534 -3 534 535 115 -3 8 368 535 -3 368 49 532 -3 368 532 535 -3 535 532 115 -3 116 536 537 -3 536 117 538 -3 536 538 537 -3 537 538 118 -3 117 539 538 -3 539 119 540 -3 539 540 538 -3 538 540 118 -3 119 541 540 -3 541 120 542 -3 541 542 540 -3 540 542 118 -3 120 543 542 -3 543 116 537 -3 543 537 542 -3 542 537 118 -3 117 544 545 -3 544 121 546 -3 544 546 545 -3 545 546 122 -3 121 547 546 -3 547 123 548 -3 547 548 546 -3 546 548 122 -3 123 549 548 -3 549 119 550 -3 549 550 548 -3 548 550 122 -3 119 539 550 -3 539 117 545 -3 539 545 550 -3 550 545 122 -3 121 551 552 -3 551 124 553 -3 551 553 552 -3 552 553 125 -3 124 554 553 -3 554 126 555 -3 554 555 553 -3 553 555 125 -3 126 556 555 -3 556 123 557 -3 556 557 555 -3 555 557 125 -3 123 547 557 -3 547 121 552 -3 547 552 557 -3 557 552 125 -3 127 558 559 -3 558 116 560 -3 558 560 559 -3 559 560 128 -3 116 543 560 -3 543 120 561 -3 543 561 560 -3 560 561 128 -3 120 562 561 -3 562 129 563 -3 562 563 561 -3 561 563 128 -3 129 564 563 -3 564 127 559 -3 564 559 563 -3 563 559 128 -3 130 565 566 -3 565 127 567 -3 565 567 566 -3 566 567 131 -3 127 564 567 -3 564 129 568 -3 564 568 567 -3 567 568 131 -3 129 569 568 -3 569 132 570 -3 569 570 568 -3 568 570 131 -3 132 571 570 -3 571 130 566 -3 571 566 570 -3 570 566 131 -3 120 541 572 -3 541 119 573 -3 541 573 572 -3 572 573 133 -3 119 574 573 -3 574 134 575 -3 574 575 573 -3 573 575 133 -3 134 576 575 -3 576 135 577 -3 576 577 575 -3 575 577 133 -3 135 578 577 -3 578 120 572 -3 578 572 577 -3 577 572 133 -3 119 549 579 -3 549 123 580 -3 549 580 579 -3 579 580 136 -3 123 581 580 -3 581 137 582 -3 581 582 580 -3 580 582 136 -3 137 583 582 -3 583 134 584 -3 583 584 582 -3 582 584 136 -3 134 574 584 -3 574 119 579 -3 574 579 584 -3 584 579 136 -3 123 556 585 -3 556 126 586 -3 556 586 585 -3 585 586 138 -3 126 587 586 -3 587 139 588 -3 587 588 586 -3 586 588 138 -3 139 589 588 -3 589 137 590 -3 589 590 588 -3 588 590 138 -3 137 581 590 -3 581 123 585 -3 581 585 590 -3 590 585 138 -3 129 562 591 -3 562 120 592 -3 562 592 591 -3 591 592 140 -3 120 578 592 -3 578 135 593 -3 578 593 592 -3 592 593 140 -3 135 594 593 -3 594 141 595 -3 594 595 593 -3 593 595 140 -3 141 596 595 -3 596 129 591 -3 596 591 595 -3 595 591 140 -3 132 569 597 -3 569 129 598 -3 569 598 597 -3 597 598 142 -3 129 596 598 -3 596 141 599 -3 596 599 598 -3 598 599 142 -3 141 600 599 -3 600 143 601 -3 600 601 599 -3 599 601 142 -3 143 602 601 -3 602 132 597 -3 602 597 601 -3 601 597 142 -3 135 576 603 -3 576 134 604 -3 576 604 603 -3 603 604 144 -3 134 605 604 -3 605 97 606 -3 605 606 604 -3 604 606 144 -3 97 476 606 -3 476 96 607 -3 476 607 606 -3 606 607 144 -3 96 608 607 -3 608 135 603 -3 608 603 607 -3 607 603 144 -3 134 583 609 -3 583 137 610 -3 583 610 609 -3 609 610 145 -3 137 611 610 -3 611 101 612 -3 611 612 610 -3 610 612 145 -3 101 484 612 -3 484 97 613 -3 484 613 612 -3 612 613 145 -3 97 605 613 -3 605 134 609 -3 605 609 613 -3 613 609 145 -3 137 589 614 -3 589 139 615 -3 589 615 614 -3 614 615 146 -3 139 616 615 -3 616 104 617 -3 616 617 615 -3 615 617 146 -3 104 491 617 -3 491 101 618 -3 491 618 617 -3 617 618 146 -3 101 611 618 -3 611 137 614 -3 611 614 618 -3 618 614 146 -3 141 594 619 -3 594 135 620 -3 594 620 619 -3 619 620 147 -3 135 608 620 -3 608 96 621 -3 608 621 620 -3 620 621 147 -3 96 498 621 -3 498 107 622 -3 498 622 621 -3 621 622 147 -3 107 623 622 -3 623 141 619 -3 623 619 622 -3 622 619 147 -3 143 600 624 -3 600 141 625 -3 600 625 624 -3 624 625 148 -3 141 623 625 -3 623 107 626 -3 623 626 625 -3 625 626 148 -3 107 505 626 -3 505 47 627 -3 505 627 626 -3 626 627 148 -3 47 628 627 -3 628 143 624 -3 628 624 627 -3 627 624 148 -3 149 629 630 -3 629 150 631 -3 629 631 630 -3 630 631 151 -3 150 632 631 -3 632 152 633 -3 632 633 631 -3 631 633 151 -3 152 634 633 -3 634 153 635 -3 634 635 633 -3 633 635 151 -3 153 636 635 -3 636 149 630 -3 636 630 635 -3 635 630 151 -3 150 637 638 -3 637 154 639 -3 637 639 638 -3 638 639 155 -3 154 640 639 -3 640 156 641 -3 640 641 639 -3 639 641 155 -3 156 642 641 -3 642 152 643 -3 642 643 641 -3 641 643 155 -3 152 632 643 -3 632 150 638 -3 632 638 643 -3 643 638 155 -3 154 644 645 -3 644 157 646 -3 644 646 645 -3 645 646 158 -3 157 647 646 -3 647 159 648 -3 647 648 646 -3 646 648 158 -3 159 649 648 -3 649 156 650 -3 649 650 648 -3 648 650 158 -3 156 640 650 -3 640 154 645 -3 640 645 650 -3 650 645 158 -3 160 651 652 -3 651 149 653 -3 651 653 652 -3 652 653 161 -3 149 636 653 -3 636 153 654 -3 636 654 653 -3 653 654 161 -3 153 655 654 -3 655 162 656 -3 655 656 654 -3 654 656 161 -3 162 657 656 -3 657 160 652 -3 657 652 656 -3 656 652 161 -3 163 658 659 -3 658 160 660 -3 658 660 659 -3 659 660 164 -3 160 657 660 -3 657 162 661 -3 657 661 660 -3 660 661 164 -3 162 662 661 -3 662 165 663 -3 662 663 661 -3 661 663 164 -3 165 664 663 -3 664 163 659 -3 664 659 663 -3 663 659 164 -3 153 634 665 -3 634 152 666 -3 634 666 665 -3 665 666 166 -3 152 667 666 -3 667 117 668 -3 667 668 666 -3 666 668 166 -3 117 536 668 -3 536 116 669 -3 536 669 668 -3 668 669 166 -3 116 670 669 -3 670 153 665 -3 670 665 669 -3 669 665 166 -3 152 642 671 -3 642 156 672 -3 642 672 671 -3 671 672 167 -3 156 673 672 -3 673 121 674 -3 673 674 672 -3 672 674 167 -3 121 544 674 -3 544 117 675 -3 544 675 674 -3 674 675 167 -3 117 667 675 -3 667 152 671 -3 667 671 675 -3 675 671 167 -3 156 649 676 -3 649 159 677 -3 649 677 676 -3 676 677 168 -3 159 678 677 -3 678 124 679 -3 678 679 677 -3 677 679 168 -3 124 551 679 -3 551 121 680 -3 551 680 679 -3 679 680 168 -3 121 673 680 -3 673 156 676 -3 673 676 680 -3 680 676 168 -3 162 655 681 -3 655 153 682 -3 655 682 681 -3 681 682 169 -3 153 670 682 -3 670 116 683 -3 670 683 682 -3 682 683 169 -3 116 558 683 -3 558 127 684 -3 558 684 683 -3 683 684 169 -3 127 685 684 -3 685 162 681 -3 685 681 684 -3 684 681 169 -3 165 662 686 -3 662 162 687 -3 662 687 686 -3 686 687 170 -3 162 685 687 -3 685 127 688 -3 685 688 687 -3 687 688 170 -3 127 565 688 -3 565 130 689 -3 565 689 688 -3 688 689 170 -3 130 690 689 -3 690 165 686 -3 690 686 689 -3 689 686 170 -3 171 691 692 -3 691 172 693 -3 691 693 692 -3 692 693 173 -3 172 694 693 -3 694 174 695 -3 694 695 693 -3 693 695 173 -3 174 696 695 -3 696 175 697 -3 696 697 695 -3 695 697 173 -3 175 698 697 -3 698 171 692 -3 698 692 697 -3 697 692 173 -3 172 699 700 -3 699 176 701 -3 699 701 700 -3 700 701 177 -3 176 702 701 -3 702 178 703 -3 702 703 701 -3 701 703 177 -3 178 704 703 -3 704 174 705 -3 704 705 703 -3 703 705 177 -3 174 694 705 -3 694 172 700 -3 694 700 705 -3 705 700 177 -3 176 706 707 -3 706 130 708 -3 706 708 707 -3 707 708 179 -3 130 571 708 -3 571 132 709 -3 571 709 708 -3 708 709 179 -3 132 710 709 -3 710 178 711 -3 710 711 709 -3 709 711 179 -3 178 702 711 -3 702 176 707 -3 702 707 711 -3 711 707 179 -3 180 712 713 -3 712 171 714 -3 712 714 713 -3 713 714 181 -3 171 698 714 -3 698 175 715 -3 698 715 714 -3 714 715 181 -3 175 716 715 -3 716 182 717 -3 716 717 715 -3 715 717 181 -3 182 718 717 -3 718 180 713 -3 718 713 717 -3 717 713 181 -3 183 719 720 -3 719 180 721 -3 719 721 720 -3 720 721 184 -3 180 718 721 -3 718 182 722 -3 718 722 721 -3 721 722 184 -3 182 723 722 -3 723 185 724 -3 723 724 722 -3 722 724 184 -3 185 725 724 -3 725 183 720 -3 725 720 724 -3 724 720 184 -3 175 696 726 -3 696 174 727 -3 696 727 726 -3 726 727 186 -3 174 728 727 -3 728 187 729 -3 728 729 727 -3 727 729 186 -3 187 730 729 -3 730 188 731 -3 730 731 729 -3 729 731 186 -3 188 732 731 -3 732 175 726 -3 732 726 731 -3 731 726 186 -3 174 704 733 -3 704 178 734 -3 704 734 733 -3 733 734 189 -3 178 735 734 -3 735 190 736 -3 735 736 734 -3 734 736 189 -3 190 737 736 -3 737 187 738 -3 737 738 736 -3 736 738 189 -3 187 728 738 -3 728 174 733 -3 728 733 738 -3 738 733 189 -3 178 710 739 -3 710 132 740 -3 710 740 739 -3 739 740 191 -3 132 602 740 -3 602 143 741 -3 602 741 740 -3 740 741 191 -3 143 742 741 -3 742 190 743 -3 742 743 741 -3 741 743 191 -3 190 735 743 -3 735 178 739 -3 735 739 743 -3 743 739 191 -3 182 716 744 -3 716 175 745 -3 716 745 744 -3 744 745 192 -3 175 732 745 -3 732 188 746 -3 732 746 745 -3 745 746 192 -3 188 747 746 -3 747 193 748 -3 747 748 746 -3 746 748 192 -3 193 749 748 -3 749 182 744 -3 749 744 748 -3 748 744 192 -3 185 723 750 -3 723 182 751 -3 723 751 750 -3 750 751 194 -3 182 749 751 -3 749 193 752 -3 749 752 751 -3 751 752 194 -3 193 753 752 -3 753 195 754 -3 753 754 752 -3 752 754 194 -3 195 755 754 -3 755 185 750 -3 755 750 754 -3 754 750 194 -3 188 730 756 -3 730 187 757 -3 730 757 756 -3 756 757 196 -3 187 758 757 -3 758 40 759 -3 758 759 757 -3 757 759 196 -3 40 319 759 -3 319 39 760 -3 319 760 759 -3 759 760 196 -3 39 761 760 -3 761 188 756 -3 761 756 760 -3 760 756 196 -3 187 737 762 -3 737 190 763 -3 737 763 762 -3 762 763 197 -3 190 764 763 -3 764 44 765 -3 764 765 763 -3 763 765 197 -3 44 327 765 -3 327 40 766 -3 327 766 765 -3 765 766 197 -3 40 758 766 -3 758 187 762 -3 758 762 766 -3 766 762 197 -3 190 742 767 -3 742 143 768 -3 742 768 767 -3 767 768 198 -3 143 628 768 -3 628 47 769 -3 628 769 768 -3 768 769 198 -3 47 334 769 -3 334 44 770 -3 334 770 769 -3 769 770 198 -3 44 764 770 -3 764 190 767 -3 764 767 770 -3 770 767 198 -3 193 747 771 -3 747 188 772 -3 747 772 771 -3 771 772 199 -3 188 761 772 -3 761 39 773 -3 761 773 772 -3 772 773 199 -3 39 341 773 -3 341 50 774 -3 341 774 773 -3 773 774 199 -3 50 775 774 -3 775 193 771 -3 775 771 774 -3 774 771 199 -3 195 753 776 -3 753 193 777 -3 753 777 776 -3 776 777 200 -3 193 775 777 -3 775 50 778 -3 775 778 777 -3 777 778 200 -3 50 348 778 -3 348 53 779 -3 348 779 778 -3 778 779 200 -3 53 780 779 -3 780 195 776 -3 780 776 779 -3 779 776 200 -3 201 781 782 -3 781 202 783 -3 781 783 782 -3 782 783 203 -3 202 784 783 -3 784 204 785 -3 784 785 783 -3 783 785 203 -3 204 786 785 -3 786 205 787 -3 786 787 785 -3 785 787 203 -3 205 788 787 -3 788 201 782 -3 788 782 787 -3 787 782 203 -3 202 789 790 -3 789 206 791 -3 789 791 790 -3 790 791 207 -3 206 792 791 -3 792 208 793 -3 792 793 791 -3 791 793 207 -3 208 794 793 -3 794 204 795 -3 794 795 793 -3 793 795 207 -3 204 784 795 -3 784 202 790 -3 784 790 795 -3 795 790 207 -3 206 796 797 -3 796 163 798 -3 796 798 797 -3 797 798 209 -3 163 664 798 -3 664 165 799 -3 664 799 798 -3 798 799 209 -3 165 800 799 -3 800 208 801 -3 800 801 799 -3 799 801 209 -3 208 792 801 -3 792 206 797 -3 792 797 801 -3 801 797 209 -3 210 802 803 -3 802 201 804 -3 802 804 803 -3 803 804 211 -3 201 788 804 -3 788 205 805 -3 788 805 804 -3 804 805 211 -3 205 806 805 -3 806 212 807 -3 806 807 805 -3 805 807 211 -3 212 808 807 -3 808 210 803 -3 808 803 807 -3 807 803 211 -3 213 809 810 -3 809 210 811 -3 809 811 810 -3 810 811 214 -3 210 808 811 -3 808 212 812 -3 808 812 811 -3 811 812 214 -3 212 813 812 -3 813 215 814 -3 813 814 812 -3 812 814 214 -3 215 815 814 -3 815 213 810 -3 815 810 814 -3 814 810 214 -3 205 786 816 -3 786 204 817 -3 786 817 816 -3 816 817 216 -3 204 818 817 -3 818 172 819 -3 818 819 817 -3 817 819 216 -3 172 691 819 -3 691 171 820 -3 691 820 819 -3 819 820 216 -3 171 821 820 -3 821 205 816 -3 821 816 820 -3 820 816 216 -3 204 794 822 -3 794 208 823 -3 794 823 822 -3 822 823 217 -3 208 824 823 -3 824 176 825 -3 824 825 823 -3 823 825 217 -3 176 699 825 -3 699 172 826 -3 699 826 825 -3 825 826 217 -3 172 818 826 -3 818 204 822 -3 818 822 826 -3 826 822 217 -3 208 800 827 -3 800 165 828 -3 800 828 827 -3 827 828 218 -3 165 690 828 -3 690 130 829 -3 690 829 828 -3 828 829 218 -3 130 706 829 -3 706 176 830 -3 706 830 829 -3 829 830 218 -3 176 824 830 -3 824 208 827 -3 824 827 830 -3 830 827 218 -3 212 806 831 -3 806 205 832 -3 806 832 831 -3 831 832 219 -3 205 821 832 -3 821 171 833 -3 821 833 832 -3 832 833 219 -3 171 712 833 -3 712 180 834 -3 712 834 833 -3 833 834 219 -3 180 835 834 -3 835 212 831 -3 835 831 834 -3 834 831 219 -3 215 813 836 -3 813 212 837 -3 813 837 836 -3 836 837 220 -3 212 835 837 -3 835 180 838 -3 835 838 837 -3 837 838 220 -3 180 719 838 -3 719 183 839 -3 719 839 838 -3 838 839 220 -3 183 840 839 -3 840 215 836 -3 840 836 839 -3 839 836 220 diff -Nru cgal-4.7/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp cgal-4.8/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp --- cgal-4.7/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/deform_polyhedron_with_custom_pmap_example.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -#include -#include -#include -// Halfedge adaptors for Polyhedron_3 -#include -#include -#include -#include - -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::halfedge_iterator halfedge_iterator; - -// Define the maps -typedef std::map Vertex_id_map; -typedef std::map Hedge_id_map; -typedef boost::associative_property_map Vertex_id_pmap; -typedef boost::associative_property_map Hedge_id_pmap; - - -typedef CGAL::Surface_mesh_deformation 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"; - return 1; - } - - // Init the indices of the vertices from 0 to num_vertices(mesh)-1 - Vertex_id_map vertex_index_map; - vertex_iterator vb, ve; - std::size_t counter = 0; - for(boost::tie(vb, ve) = vertices(mesh); vb != ve; ++vb, ++counter) - vertex_index_map[*vb]=counter; - - // Init the indices of the halfedges from 0 to 2*num_edges(mesh)-1 - Hedge_id_map hedge_index_map; - counter = 0; - halfedge_iterator eb, ee; - for(boost::tie(eb, ee) = halfedges(mesh); eb != ee; ++eb, ++counter) - hedge_index_map[*eb]=counter; - - Surface_mesh_deformation deform_mesh( mesh, - Vertex_id_pmap(vertex_index_map), - Hedge_id_pmap(hedge_index_map) ); - - // Now deform mesh as desired - // ..... -} diff -Nru cgal-4.7/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp cgal-4.8/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp --- cgal-4.7/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/k_ring_roi_translate_rotate_example.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -#include -#include -#include -#include -// HalfedgeGraph adaptors for Polyhedron_3 -#include -#include - -#include - -#include -#include -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::out_edge_iterator out_edge_iterator; - -typedef Eigen::Vector3d Vector3d; - -typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; - -// Collect the vertices which are at distance less or equal to k -// from the vertex v in the graph of vertices connected by the edges of P -std::vector extract_k_ring(const Polyhedron &P, vertex_descriptor v, int k) -{ - std::map D; - std::vector Q; - Q.push_back(v); D[v] = 0; - std::size_t current_index = 0; - - int dist_v; - while( current_index < Q.size() && (dist_v = D[ Q[current_index] ]) < k ) { - v = Q[current_index++]; - - out_edge_iterator e, e_end; - for(boost::tie(e, e_end) = out_edges(v, P); e != e_end; e++) - { - halfedge_descriptor he = halfedge(*e, P); - vertex_descriptor new_v = target(he, P); - if(D.insert(std::make_pair(new_v, dist_v + 1)).second) { - Q.push_back(new_v); - } - } - } - return Q; -} - -int main() -{ - Polyhedron mesh; - std::ifstream input("data/plane.off"); - - if ( !input || !(input >> mesh) || mesh.empty() ) { - std::cerr<< "Cannot open data/plane.off"; - return 1; - } - - // Init the indices of the halfedges and the vertices. - set_halfedgeds_items_id(mesh); - - // Create the deformation object - Surface_mesh_deformation deform_mesh(mesh); - - // Select and insert the vertices of the region of interest - vertex_iterator vb, ve; - boost::tie(vb,ve) = vertices(mesh); - std::vector roi = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 47), 9); - deform_mesh.insert_roi_vertices(roi.begin(), roi.end()); - - // Select and insert the control vertices - std::vector cvertices_1 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 39), 1); - std::vector cvertices_2 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 97), 1); - deform_mesh.insert_control_vertices(cvertices_1.begin(), cvertices_1.end()); - deform_mesh.insert_control_vertices(cvertices_2.begin(), cvertices_2.end()); - - // Apply a rotation to the control vertices - Eigen::Quaternion quad(0.92, 0, 0, -0.38); - deform_mesh.rotate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0,0), quad); - deform_mesh.rotate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0,0), quad); - - deform_mesh.deform(); - - // Save the deformed mesh - std::ofstream output("deform_1.off"); - output << mesh; - output.close(); - - // Restore the positions of the vertices - deform_mesh.reset(); - - // Apply a translation on the original positions of the vertices (reset() was called before) - deform_mesh.translate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0.3,0)); - deform_mesh.translate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0.3,0)); - - // Call the function deform() with one-time parameters: - // iterate 10 times and do not use energy based termination criterion - deform_mesh.set_iterations(10); - deform_mesh.set_tolerance(0.0); - deform_mesh.deform(); - - // Save the deformed mesh - output.open("deform_2.off"); - output << mesh; -} - diff -Nru cgal-4.7/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp cgal-4.8/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp --- cgal-4.7/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_modeling/k_ring_roi_translate_rotate_Surface_mesh.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -#include -#include -#include -#include - -#include -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef Kernel::Point_3 Point_3; -typedef CGAL::Surface_mesh Mesh; - -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; -typedef boost::graph_traits::out_edge_iterator out_edge_iterator; - -typedef Eigen::Vector3d Vector3d; - -typedef CGAL::Surface_mesh_deformation Surface_mesh_deformation; - -// Collect the vertices which are at distance less or equal to k -// from the vertex v in the graph of vertices connected by the edges of P -std::vector extract_k_ring(const Mesh &P, vertex_descriptor v, int k) -{ - std::map D; - std::vector Q; - Q.push_back(v); D[v] = 0; - std::size_t current_index = 0; - - int dist_v; - while( current_index < Q.size() && (dist_v = D[ Q[current_index] ]) < k ) { - v = Q[current_index++]; - - out_edge_iterator e, e_end; - for(boost::tie(e, e_end) = out_edges(v, P); e != e_end; e++) - { - halfedge_descriptor he = halfedge(*e, P); - vertex_descriptor new_v = target(he, P); - if(D.insert(std::make_pair(new_v, dist_v + 1)).second) { - Q.push_back(new_v); - } - } - } - return Q; -} - -int main() -{ - Mesh mesh; - std::ifstream input("data/plane.off"); - - if ( !input || !(input >> mesh) || mesh.is_empty() ) { - std::cerr<< "Cannot open data/plane.off"; - return 1; - } - - // Create the deformation object - Surface_mesh_deformation deform_mesh(mesh); - - // Select and insert the vertices of the region of interest - vertex_iterator vb, ve; - boost::tie(vb,ve) = vertices(mesh); - std::vector roi = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 47), 9); - deform_mesh.insert_roi_vertices(roi.begin(), roi.end()); - - // Select and insert the control vertices - std::vector cvertices_1 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 39), 1); - std::vector cvertices_2 = extract_k_ring(mesh, *CGAL::cpp11::next(vb, 97), 1); - deform_mesh.insert_control_vertices(cvertices_1.begin(), cvertices_1.end()); - deform_mesh.insert_control_vertices(cvertices_2.begin(), cvertices_2.end()); - - // Apply a rotation to the control vertices - Eigen::Quaternion quad(0.92, 0, 0, -0.38); - deform_mesh.rotate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0,0), quad); - deform_mesh.rotate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0,0), quad); - - deform_mesh.deform(); - - // Save the deformed mesh - std::ofstream output("deform_1.off"); - output << mesh; - output.close(); - - // Restore the positions of the vertices - deform_mesh.reset(); - - // Apply a translation on the original positions of the vertices (reset() was called before) - deform_mesh.translate(cvertices_1.begin(), cvertices_1.end(), Vector3d(0,0.3,0)); - deform_mesh.translate(cvertices_2.begin(), cvertices_2.end(), Vector3d(0,0.3,0)); - - // Call the function deform() with one-time parameters: - // iterate 10 times and do not use energy based termination criterion - deform_mesh.set_iterations(10); - deform_mesh.set_tolerance(0.0); - deform_mesh.deform(); - - // Save the deformed mesh - output.open("deform_2.off"); - output << mesh; -} - diff -Nru cgal-4.7/examples/Surface_reconstruction_points_3/CMakeLists.txt cgal-4.8/examples/Surface_reconstruction_points_3/CMakeLists.txt --- cgal-4.7/examples/Surface_reconstruction_points_3/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_reconstruction_points_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -# This is the CMake script for compiling this folder. - -project( Surface_reconstruction_points_3_example ) - -cmake_minimum_required(VERSION 2.8.11) - - -# 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 -Nru cgal-4.7/examples/Surface_reconstruction_points_3/data/kitten.xyz cgal-4.8/examples/Surface_reconstruction_points_3/data/kitten.xyz --- cgal-4.7/examples/Surface_reconstruction_points_3/data/kitten.xyz 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_reconstruction_points_3/data/kitten.xyz 1970-01-01 00:00:00.000000000 +0000 @@ -1,5210 +0,0 @@ --0.0721898 -0.159749 -0.108444 0.340472 0.937712 -0.0690972 -0.145233 -0.163455 0.107108 0.821548 0.302589 0.483218 -0.126784 -0.175123 -0.0474613 0.625688 0.275329 -0.729869 --0.0481776 -0.165903 -0.0696537 0.304957 0.95168 0.0361474 --0.061821 -0.160092 -0.0798811 0.303781 0.952723 0.00601667 -0.18959 -0.0441324 -0.0583945 0.586367 -0.770557 -0.249832 --0.0910041 -0.0473802 -0.0703309 -0.571321 -0.793276 -0.21049 -0.121865 -0.20656 -0.0630568 0.58295 0.246179 -0.774316 --0.238013 0.0972646 -0.0475612 -0.763139 -0.641471 -0.0783177 --0.252128 0.113606 -0.0418154 -0.768814 -0.631298 -0.101922 --0.181908 -0.150647 -0.179282 -0.0515764 0.971988 -0.229303 --0.0797994 -0.157003 -0.069821 0.138144 0.973901 0.180094 --0.147355 -0.140286 -0.130828 0.200499 0.979694 -0.000430957 -0.297153 0.250216 -0.0435451 0.898297 -0.35699 -0.256165 --0.016266 -0.249438 -0.247267 0.612683 0.455631 -0.645771 -0.00728707 -0.314915 -0.246576 0.729056 0.0314841 -0.68373 --0.0872895 -0.15636 -0.136979 0.301291 0.951298 -0.0652348 --0.119395 -0.149051 -0.146431 0.238813 0.969265 -0.059112 --0.141649 -0.147604 -0.175279 0.124256 0.959842 -0.251524 --0.234311 -0.328351 -0.240886 -0.655553 -0.351807 -0.668193 --0.131634 -0.145404 -0.12887 0.262869 0.964652 -0.0186147 -0.0614646 -0.498881 -0.0497886 0.00288573 -0.999989 0.00361588 --0.0313547 -0.171847 -0.0747266 0.267033 0.960615 -0.0768956 --0.0219535 -0.170117 -0.045884 -0.0915186 0.965182 -0.245045 --0.235408 -0.454685 -0.081975 -0.856685 -0.515816 -0.0050348 --0.15958 -0.139452 -0.146065 0.0460015 0.991112 -0.124821 --0.0548369 0.166926 -0.251163 -0.330298 0.0533227 -0.942369 --0.232858 -0.456752 -0.0596575 -0.841615 -0.526479 0.120437 -0.15194 -0.431975 -0.0617963 0.77208 0.635502 -0.00546661 --0.192664 0.259502 0.0130537 -0.944406 0.263691 0.196379 -0.0668991 -0.489411 -0.138382 0.585053 -0.658313 -0.473642 --0.241635 -0.186916 -0.0530211 -0.596702 0.715943 0.362455 --0.120469 -0.15258 -0.176379 0.198434 0.961548 -0.189868 -0.0678517 0.0202853 -0.225825 0.12869 -0.515475 -0.847186 --0.00625867 0.298363 -0.226465 -0.128394 0.537319 -0.833549 --0.11927 -0.158179 -0.199837 0.158134 0.937532 -0.309884 --0.128294 -0.14838 -0.161113 0.224967 0.964092 -0.141128 --0.0559685 0.149143 -0.251352 -0.329683 -0.0119581 -0.944016 -0.175103 -0.0634498 -0.0261962 0.610214 -0.772236 -0.176891 --0.0273079 0.131126 -0.258575 -0.238994 -0.0840461 -0.967377 --0.0222544 -0.496567 0.0103161 -0.180626 -0.969553 -0.165353 --0.042432 0.122516 -0.253562 -0.285304 -0.125476 -0.950188 --0.288933 -0.209323 -0.153456 -0.898609 0.256234 0.356154 -0.0197803 0.0842369 -0.257008 -0.0665083 -0.290489 -0.954564 --0.00923839 -0.474861 -0.0394226 -0.0851904 -0.990979 -0.10346 --0.25372 -0.256467 -0.258339 -0.638393 -0.353794 -0.683582 --0.136981 -0.144374 -0.0978283 0.180851 0.971813 0.151238 --0.190808 -0.148654 -0.16661 -0.118483 0.978553 -0.168508 --0.0852432 0.323718 -0.168989 -0.43918 0.691497 -0.573543 --0.2066 -0.149973 -0.161006 -0.208648 0.976805 -0.048141 --0.167584 -0.142276 -0.103551 -0.110778 0.977581 0.179065 --0.214846 -0.0562103 -0.245331 0.657937 0.142026 -0.739559 --0.147513 -0.141518 -0.111288 0.135589 0.988471 0.0673765 --0.246258 -0.052246 -0.252449 -0.272089 0.613699 -0.741175 -0.0302254 0.30189 -0.225753 0.0474554 0.550746 -0.833323 -0.281646 0.142488 -0.0483718 0.983943 0.0121708 -0.178068 --0.0287156 -0.385694 -0.254434 0.481533 -0.403448 -0.778046 --0.108216 -0.148934 -0.10765 0.192387 0.981244 0.012159 --0.256272 -0.412174 -0.0484345 -0.868213 -0.48019 0.124999 --0.280278 -0.260533 -0.0357663 -0.915803 0.223518 0.333683 -0.0202554 0.19524 -0.264544 -0.0306971 0.132948 -0.990648 --0.0100756 -0.483748 -0.0221762 0.0156098 -0.87493 -0.483998 -0.0472835 0.168668 -0.2665 0.0904187 0.0651501 -0.993771 --0.192276 -0.0311072 -0.157972 0.48944 -0.546995 0.67915 --0.0343814 -0.487596 -0.00250569 -0.361344 -0.928134 -0.0894248 -0.311009 0.289879 -0.0429126 0.936829 -0.258762 -0.235358 -0.0951159 0.15758 -0.256511 0.306129 0.0270707 -0.951605 -0.0781069 0.160108 -0.261489 0.245742 0.0399743 -0.968511 -0.166595 -0.049528 -0.0853077 0.490702 -0.80149 -0.341798 --0.0648471 -0.166919 -0.0443978 0.0256679 0.976101 0.215795 --0.0394325 -0.164345 -0.0172429 -0.298607 0.95138 -0.0755685 -0.0345961 0.413045 -0.0302082 -0.0625827 0.992678 -0.103313 --0.135018 -0.149572 -0.0795717 0.127418 0.95209 0.278011 -0.077688 0.12543 -0.260916 0.234135 -0.092476 -0.967796 --0.0118103 0.121778 -0.261279 -0.18914 -0.124959 -0.973967 -0.122851 0.408969 -0.0619005 -0.193415 0.940439 -0.27958 --0.227554 -0.194002 -0.0239083 -0.504223 0.696352 0.510738 --0.117026 -0.166081 -0.0350238 0.0631263 0.90932 0.411281 --0.0676798 -0.161555 -0.0605097 0.185222 0.957786 0.219863 --0.208275 -0.150199 -0.138472 -0.319121 0.947604 0.0144603 --0.277595 0.144142 -0.0286479 -0.820775 -0.570796 -0.0228258 -0.151718 -0.441401 -0.0346282 0.819574 0.414449 0.395639 --0.0445576 -0.486016 -0.0392794 0.0587527 -0.990477 -0.124515 --0.0650822 -0.482734 -0.0149406 -0.0358344 -0.985068 0.168396 --0.232877 -0.288881 -0.260779 -0.568496 -0.326298 -0.75521 --0.204163 -0.344803 -0.256869 -0.515756 -0.330114 -0.790582 --0.0515999 -0.479091 0.000453441 -0.205311 -0.973534 -0.100397 -0.147215 -0.286265 -0.0384327 0.833468 -0.241745 -0.496881 --0.194253 -0.361722 -0.256148 -0.507891 -0.343653 -0.789905 -0.154622 -0.201015 -0.0258112 0.819552 0.234652 -0.522756 --0.0249456 -0.482824 -0.0343095 0.270834 -0.916578 -0.294166 --0.138319 -0.450307 -0.237276 -0.212534 -0.493022 -0.843658 -0.195898 -0.0437999 -0.041838 0.621528 -0.760066 -0.189745 -0.12937 -0.405008 -0.0530142 0.849716 0.512381 -0.12429 --0.116777 -0.417019 -0.260014 -0.0623564 -0.489619 -0.869704 -0.185081 -0.0587389 -0.00674544 0.627338 -0.774021 -0.0856666 --0.116816 -0.0320404 -0.0533273 -0.60895 -0.775585 -0.166275 --0.16257 -0.138961 -0.12379 -0.00561221 0.997826 0.0656706 --0.175502 0.0220674 -0.0545377 -0.744933 -0.665187 -0.0510027 --0.248692 -0.176851 -0.0986233 -0.643428 0.74768 0.164241 --0.0276411 -0.480916 -0.0488753 0.22768 -0.971919 0.0594605 -0.28322 0.178827 -0.0264141 0.99458 0.00225036 -0.103947 --0.0726005 -0.4796 0.00656314 0.248856 -0.918906 -0.306076 --0.0224941 -0.485578 -0.0660648 -0.079758 -0.886141 0.456501 -0.037861 0.15525 -0.26739 0.028714 0.0147999 -0.999478 -0.0488279 0.123351 -0.26544 0.0760119 -0.113807 -0.990591 --0.0415368 -0.167181 -0.0373349 0.00445007 0.996779 -0.0800739 --0.323212 0.25785 -0.0390385 -0.949029 -0.0755595 0.305999 --0.206557 0.34705 -0.0314958 0.15191 0.964003 0.218223 -0.0444739 0.140085 -0.26706 0.0594753 -0.0477283 -0.997088 -0.179883 0.451059 -0.0362189 -0.604662 0.778966 -0.166123 --0.166256 -0.00698664 -0.160566 0.66738 -0.716506 0.203036 -0.196069 0.462988 -0.0380465 -0.568075 0.792655 -0.221335 -0.218929 0.480971 -0.0271408 -0.48544 0.853618 -0.188905 --0.172861 0.00474642 -0.131822 0.00824581 -0.880887 0.473255 --0.292815 -0.114292 -0.255258 -0.852434 0.266337 -0.449912 -0.253948 0.131026 -0.127299 0.87436 -0.0516106 -0.482525 --0.203037 -0.15079 -0.183576 0.0834498 0.99598 0.0325554 -0.255082 0.49457 -0.0287433 -0.104757 0.932047 -0.346865 --0.0632463 -0.486019 -0.0351406 -0.0287493 -0.999027 0.0334548 --0.213058 -0.461446 -0.00464083 -0.795922 -0.513207 0.321133 --0.282146 -0.228582 -0.082814 -0.912151 0.363492 0.189354 -0.158294 -0.0776357 -0.0246839 0.67312 -0.69896 -0.241587 -0.212603 -0.0308818 -0.0341366 0.682625 -0.713638 -0.157303 --0.0302419 -0.488892 -0.0215477 -0.00363449 -0.976084 -0.217362 --0.184262 -0.0362513 -0.172305 0.724066 -0.519509 0.453694 --0.017125 -0.340448 -0.26343 0.541181 -0.162865 -0.824984 --0.0152848 -0.319707 -0.265148 0.563743 -0.0542476 -0.824167 --0.0655733 -0.411416 -0.256878 0.267853 -0.507151 -0.819178 --0.130836 -0.426304 -0.25302 -0.160632 -0.488647 -0.857567 --0.310957 0.317062 -0.0288837 -0.520458 0.167203 0.837357 --0.185087 -0.493636 -0.0259475 -0.307923 -0.944821 0.111791 --0.290368 -0.187174 -0.256136 -0.812741 -0.261137 -0.520827 --0.107813 -0.190198 -0.250435 0.211672 0.700499 -0.68154 --0.0517664 -0.190971 -0.218982 0.45997 0.748194 -0.478156 --0.0930247 -0.20254 -0.256705 0.262804 0.642447 -0.719858 --0.0586637 -0.164073 -0.0985394 0.349982 0.930665 -0.106655 --0.172196 0.0169512 -0.0369627 -0.760878 -0.64659 -0.0546506 -0.0107708 0.391478 -0.113855 -0.13902 0.928023 -0.345612 --0.0569718 -0.169123 -0.0263236 -0.21604 0.965619 0.144593 --0.243543 -0.225052 -0.280438 -0.405437 -0.304851 -0.861793 --0.171335 -0.147424 -0.0865226 -0.169463 0.943436 0.284977 --0.161949 -0.165404 -0.227078 0.116022 0.908381 -0.401726 --0.150645 0.00447613 -0.15549 0.435242 -0.870382 -0.230216 --0.0137941 0.406466 -0.0227275 -0.236183 0.970063 -0.0565197 --0.0808652 -0.483769 -0.028792 0.207866 -0.96786 0.141557 -0.18262 0.368392 0.0374551 0.709717 0.506504 0.489649 --0.170531 -0.347031 -0.274546 -0.378346 -0.281481 -0.881829 -0.0804058 -0.473327 -0.131595 0.553595 -0.114218 -0.824916 --0.223154 -0.150705 -0.272817 0.694741 0.303099 -0.652277 -0.276898 0.0691892 -0.0235888 0.962006 -0.254879 -0.0978856 -0.107993 0.404776 -0.0706635 -0.0288351 0.958027 -0.285223 -0.301154 0.250331 -0.0257477 0.926511 -0.356534 -0.120251 -0.0443342 0.134106 0.292336 0.245375 0.17551 0.953408 --0.0796152 -0.407975 -0.262944 0.176856 -0.491639 -0.85265 --0.280609 0.267672 -0.0248043 0.0847461 0.040975 0.99556 -0.118521 0.0733598 -0.236419 0.363048 -0.295367 -0.883716 --0.26897 0.287947 -0.0261521 0.0402056 -0.0237685 0.998909 -0.0141038 0.111821 0.293042 -0.218396 -0.246297 0.944268 --0.260741 0.269933 -0.0265047 0.037242 0.00534352 0.999292 --0.27767 0.301061 -0.0252558 0.0256769 -0.0361683 0.999016 -0.0787156 -0.0100206 0.240834 0.260719 -0.414749 0.871785 -0.025801 0.146161 0.290617 -0.00185102 0.38455 0.923102 --0.265618 0.327403 -0.0235752 -0.121799 0.0251807 0.992235 -0.0154439 0.045346 0.274255 0.215397 -0.357497 0.908735 -0.0113867 0.131302 0.294057 -0.249115 0.110069 0.962199 --0.265749 -0.204934 -0.274876 -0.575575 -0.329087 -0.748609 --0.0656077 -0.355435 -0.281959 0.243087 -0.269034 -0.931949 -0.0823779 0.0894638 0.283435 0.233934 0.0457325 0.971176 --0.233723 0.29077 -0.0227118 -0.276231 -0.152567 0.948905 -0.03874 0.0812565 0.282941 -0.0721134 -0.286075 0.95549 -0.0213958 0.161316 0.280081 -0.0751891 0.727395 0.682087 -0.0599989 0.139856 0.283127 0.492604 0.362694 0.791071 -0.134757 -0.159037 0.120263 0.760591 0.316227 0.567011 --0.283905 0.332301 -0.0249318 -0.113118 0.134468 0.98444 -0.0676135 0.101665 0.285565 0.232212 0.0492457 0.971418 -0.0853554 0.108595 0.279217 0.354245 0.26554 0.89666 -0.00306278 0.100047 0.281849 -0.250016 -0.180745 0.951222 --0.222437 0.34588 -0.0212486 -0.0191486 0.756428 0.653797 -0.322156 0.339575 -0.0379985 0.976071 -0.10916 -0.188067 --0.00993407 0.253985 -0.247766 -0.156144 0.335652 -0.928955 -0.116833 -0.498214 -0.0410586 0.022783 -0.997787 0.0624716 -0.0771899 0.0735268 0.283094 0.113906 -0.179895 0.977069 -0.100858 -0.258599 -0.0891678 0.626563 0.078189 -0.775439 --0.016813 0.0655117 0.278572 -0.275319 -0.0983143 0.956313 -0.0621006 0.0652524 0.281993 -0.0649632 -0.303581 0.950589 --0.0869092 -0.0650904 0.00523852 -0.549422 -0.828511 -0.108192 --0.235824 -0.115853 -0.274359 0.632689 0.174602 -0.754466 --0.293379 -0.295046 -0.0958402 -0.997626 -0.0674564 0.0138899 --0.256943 0.117036 -0.0252105 -0.765341 -0.643433 -0.0157217 --0.152339 -0.205918 -0.272698 0.121567 0.532705 -0.837524 -0.00205732 0.15838 0.276778 -0.394374 0.672266 0.626521 -0.071127 0.12181 0.280897 0.433559 0.236638 0.869499 -0.28242 0.123467 -0.041124 0.987461 -0.0461197 -0.150976 --0.138639 -0.215421 -0.276573 0.0960367 0.483449 -0.870088 --0.015531 0.107321 0.278436 -0.451101 -0.0162577 0.892325 --0.281436 0.234389 -0.0215051 0.093395 0.154006 0.983646 --0.00198539 0.0809442 0.282224 -0.0968825 -0.022042 0.995052 --0.0174847 0.0886516 0.278063 -0.351445 0.0400305 0.935352 -0.0171605 0.0816998 0.281293 -0.0257303 -0.184674 0.982463 -0.0696838 0.250903 -0.244924 0.217643 0.357625 -0.90815 -0.0273376 0.0623482 0.276463 0.0866814 -0.322932 0.942444 --0.0632754 -0.236946 -0.270422 0.352327 0.480755 -0.802957 -0.00559823 0.0615926 0.280397 0.0446784 -0.18374 0.981959 --0.0324337 0.0745066 0.271246 -0.538447 0.0208 0.842403 -0.095471 0.0734796 0.279689 0.275443 -0.113198 0.954629 --0.219046 0.313211 -0.0114728 -0.386284 -0.0899065 0.917988 --0.197848 -0.303429 -0.275419 -0.380326 -0.266348 -0.88567 -0.0898447 0.0594103 0.277865 0.175591 -0.289515 0.94093 -0.30128 0.3388 -0.0833041 0.788791 -0.0841767 -0.608871 --0.00889564 0.141022 0.280151 -0.556111 0.293895 0.77741 --0.0286785 0.117465 0.268222 -0.681315 0.142662 0.717953 --0.0278642 0.252325 -0.244312 -0.241198 0.324836 -0.914497 -0.0988355 0.100314 0.276197 0.388068 0.246461 0.888065 -0.116485 0.103649 0.26589 0.491786 0.339279 0.801896 --0.197317 -0.187142 -0.011896 -0.27408 0.752788 0.59849 -0.272159 0.184461 0.0870537 0.946793 0.105921 0.303913 --0.278483 -0.159131 -0.279701 -0.620497 -0.0997712 -0.777837 -0.228958 -0.0185604 -0.00674278 0.738308 -0.67126 -0.0656574 --0.0018417 0.272447 -0.241421 -0.106027 0.412199 -0.904904 -0.0523264 -0.498521 -0.100382 0.00971514 -0.999796 -0.0176836 -0.0703833 0.036994 0.268067 -0.0912241 -0.587813 0.803837 --0.111332 0.078136 -0.210488 -0.476567 -0.330251 -0.81475 -0.0517834 -0.498084 0.00163542 0.0347671 -0.998853 0.0329246 -0.0380318 -0.498673 -0.0105632 -0.00800469 -0.999921 0.00971716 --0.250411 -0.408245 -0.0158556 -0.825119 -0.467948 0.316548 -0.0458204 -0.498695 -0.0822852 -0.00393933 -0.999926 -0.0115182 --0.268805 -0.303633 -0.000508347 -0.854032 0.0483082 0.517972 -0.281686 0.0914666 -0.0227657 0.983379 -0.156169 -0.0926069 --0.0325745 0.096501 0.268582 -0.621415 0.118748 0.77443 --0.0751454 -0.303365 -0.292004 0.220627 -0.00146613 -0.975357 -0.104481 0.0869196 0.276227 0.394614 0.107111 0.912583 -0.112976 0.0709048 0.272869 0.40219 -0.0761319 0.912386 --0.148058 -0.257745 -0.291231 -0.0595534 0.152143 -0.986563 -0.104855 0.0531224 0.271954 0.283778 -0.314977 0.905682 -0.197195 0.425819 -0.0978775 -0.279744 0.621758 -0.731546 --0.0101601 0.0139323 0.259898 -0.050928 -0.568316 0.821233 --0.156196 -0.272598 -0.29151 -0.137401 0.0188313 -0.990336 -0.0121484 0.169605 0.264076 -0.21858 0.847832 0.483119 --0.233726 0.327296 -0.0150664 -0.268466 0.113244 0.95661 -0.071218 0.152239 0.263994 0.558326 0.597658 0.575393 -0.322214 0.344831 -0.00441819 0.904789 -0.0235256 0.42521 -0.0735618 0.414328 0.00307866 0.0268636 0.998449 0.0487564 --0.050982 0.28474 -0.221522 -0.331956 0.483246 -0.81011 --0.118508 -0.338336 -0.290344 -0.0984418 -0.217069 -0.97118 --0.133568 -0.495037 -0.0221124 -0.0473912 -0.998813 -0.0112677 --0.0452257 0.0829728 0.259641 -0.711205 0.129124 0.691024 --0.0449162 0.0637993 0.261759 -0.654648 -0.00660345 0.755905 --0.0294375 0.0507757 0.270967 -0.441647 -0.1856 0.877781 -0.0900081 0.0432755 0.271289 0.127287 -0.464032 0.876625 -0.0289495 0.0152443 0.256556 0.079925 -0.39202 0.916478 --0.0369856 0.030663 0.260454 -0.477527 -0.342985 0.808906 -0.0549873 0.157874 0.273314 0.437811 0.676526 0.592144 --0.146094 -0.49605 0.0150984 -0.0304027 -0.999454 -0.0129406 --0.0589705 0.0536394 0.247606 -0.737078 -0.0334326 0.67498 -0.133251 0.0498677 0.258434 0.466486 -0.270808 0.842053 --0.152246 -0.319976 -0.287777 -0.24792 -0.194927 -0.948967 -0.130421 -0.428311 -0.00921679 0.805943 0.20939 0.553726 --0.0701063 -0.0762415 0.0102274 -0.523603 -0.846754 -0.0940623 -0.00924817 -0.497775 -0.164104 0.0297389 -0.9973 -0.0671473 -0.115208 0.293219 -0.208145 0.366258 0.500258 -0.7846 -0.154213 -0.178889 0.10045 0.863192 0.273736 0.424225 --0.204902 0.212816 -0.171586 -0.287057 0.141134 -0.947459 -0.284761 0.171217 -0.00710441 0.998571 0.0312472 -0.0433469 --0.00663674 -0.36383 -0.249059 0.614418 -0.299848 -0.729782 --0.0905727 -0.456461 -0.234207 0.165893 -0.522648 -0.836253 -0.129597 0.068791 0.264089 0.486609 -0.0654521 0.871165 -0.0407148 0.0261924 0.257217 0.129876 -0.297095 0.945974 --0.194582 0.0465062 -0.0719423 -0.789403 -0.611967 -0.0483655 -0.123689 -0.011132 0.224643 0.390722 -0.591596 0.705231 -0.0737875 0.0228021 0.256567 -0.0335262 -0.537205 0.842785 --0.000877383 -0.375083 -0.238277 0.662692 -0.357117 -0.658261 --0.0287562 0.0132688 0.255022 -0.316701 -0.519819 0.793403 --0.120556 0.359792 -8.68261e-005 -0.511621 0.858296 0.0396605 -0.129651 -0.174116 0.134254 0.706007 0.302087 0.640545 -0.148353 0.116254 0.228357 0.497288 0.660273 0.5628 --0.254488 -0.382768 -0.169316 -0.842424 -0.409712 -0.349939 -0.164731 -0.0662621 0.082489 0.627601 -0.714628 0.308908 --0.0581945 0.0709443 0.246909 -0.777842 0.119922 0.616913 -0.00715172 -0.498114 -0.0785365 -0.111827 -0.98856 0.101207 -0.117674 0.0399671 0.261888 0.336394 -0.416157 0.84478 --0.261086 -0.286424 -0.233215 -0.759234 -0.336414 -0.557126 --0.054248 0.0327647 0.248441 -0.648125 -0.245562 0.720856 --0.254335 -0.3843 0.00101866 -0.812323 -0.359413 0.459297 --0.116611 -0.186905 0.000620904 -0.0653904 0.811119 0.581214 --0.309266 0.240001 -0.0847696 -0.890667 -0.145799 -0.430645 -0.0773923 0.00765613 0.249161 0.173054 -0.389153 0.904772 -0.0429285 0.00402916 0.253091 -0.00956665 -0.288843 0.957329 --0.000825592 -0.261441 -0.239359 0.711799 0.373339 -0.594946 -0.0226516 0.00234414 0.248735 -0.0696254 -0.482077 0.873358 -0.000962767 0.000989537 0.249418 0.0312329 -0.597641 0.801156 -0.166265 -0.0768174 0.0083644 0.754488 -0.650903 -0.0841019 --0.285653 -0.245468 -0.0712209 -0.94146 0.274889 0.195162 --0.181336 0.245144 -0.168954 -0.230932 0.344236 -0.910039 --0.0460249 0.100532 0.253804 -0.774751 0.214679 0.594705 --0.1697 -0.44548 -0.22681 -0.475848 -0.466114 -0.745859 --0.106708 -0.494673 -0.202667 0.0115309 -0.940201 -0.340424 --0.215213 -0.121669 -0.233144 0.99981 -0.00704172 -0.0181635 --0.154231 -0.496178 0.0344373 -0.147333 -0.988918 0.0182822 -0.0518958 0.0283027 -0.232204 0.0590805 -0.497107 -0.865675 --0.16464 -0.496724 -0.0885213 -0.00567984 -0.999584 0.0282853 -0.118538 0.299475 0.197273 0.309131 0.423765 0.851388 --0.0705893 0.0600515 0.232005 -0.827214 0.116343 0.549711 --0.0679434 0.0406309 0.235981 -0.76186 -0.104114 0.639319 --0.0100148 -0.49908 0.0624651 -0.013685 -0.999621 -0.0239071 --0.136421 0.170339 -0.20861 -0.542273 0.0642987 -0.837738 -0.110563 0.0101075 0.243682 0.210428 -0.536115 0.817496 -0.0948686 0.0174669 0.251796 0.127534 -0.573067 0.809524 --0.0617689 -0.467893 -0.217255 0.387955 -0.520279 -0.760789 --0.220539 -0.440806 0.0037125 -0.784367 -0.453831 0.422855 --0.147781 -0.498023 -0.152926 -0.011142 -0.999919 -0.00611434 --0.222268 -0.45272 -0.0139173 -0.797385 -0.505285 0.329946 -0.0622069 0.175606 0.240978 0.39361 0.646577 0.65346 -0.0190364 0.179907 0.247692 -0.0981756 0.731936 0.674264 --0.0274933 0.149969 0.252801 -0.721239 0.533746 0.441508 -0.114196 0.133318 0.240458 0.545436 0.678596 0.491943 -0.140054 0.129537 0.218706 0.477038 0.65393 0.587206 -0.280281 0.158221 0.0664138 0.973796 0.0750506 0.214682 -0.11973 -0.432972 0.00537508 0.753438 0.00723231 0.65748 -0.144704 0.0625072 0.254454 0.549 -0.108356 0.828769 -0.0937268 0.0014467 0.241503 0.200095 -0.451795 0.869393 -0.0897857 0.127296 0.268936 0.48351 0.464324 0.742039 --0.234688 -0.221369 -0.000189629 -0.556886 0.54552 0.626328 -0.0649671 -0.018637 0.240789 0.200181 -0.48934 0.848807 --0.21177 0.0699778 -0.0103804 -0.746867 -0.642758 0.170447 -0.163869 -0.177441 0.00880336 0.930062 0.263469 -0.256062 --0.133498 -0.0275777 -0.00192849 -0.669013 -0.737262 -0.0941647 --0.191179 0.0445629 0.00158148 -0.840001 -0.531434 0.109432 -0.29068 0.220455 0.0042914 0.954048 -0.298024 0.0312192 -0.315672 0.307628 0.00378021 0.914381 -0.0753736 0.397777 --0.125848 0.354248 0.0203801 -0.560967 0.8176 0.129793 -0.181227 0.26577 -0.182617 0.584192 0.375224 -0.719671 -0.193193 -0.0483996 0.0634715 0.651147 -0.741034 0.163942 --0.0552532 0.00452152 0.232171 -0.560057 -0.479007 0.675935 --0.0460655 0.014923 0.246217 -0.522281 -0.435226 0.733349 --0.0371264 -0.000710344 0.240735 -0.365805 -0.598337 0.712867 --0.0371896 0.0708221 -0.241271 -0.272225 -0.378429 -0.884695 -0.0769019 -0.0290875 0.231533 0.226547 -0.600949 0.76651 -0.0483605 -0.0148519 0.245787 0.00823668 -0.490213 0.871564 -0.056344 -0.0306185 0.234616 0.0603291 -0.629497 0.774657 -0.266884 0.372752 0.00154932 -0.0939212 0.107264 0.989784 -0.0232521 -0.0239992 0.234297 -0.217438 -0.565971 0.795234 -0.111946 0.127747 -0.249871 0.372776 -0.0715434 -0.925159 --0.0570702 -0.0208962 0.207572 -0.477782 -0.643278 0.598263 -0.0221265 0.19385 0.238212 0.00448801 0.366324 0.930476 --0.242235 -0.196276 -0.0378064 -0.601028 0.670743 0.434591 --0.0110862 0.196148 0.233716 -0.227898 0.16451 0.959687 --0.0846863 -0.362334 -0.283515 0.120722 -0.295284 -0.947752 --0.0154612 0.163622 0.247109 -0.551294 0.651762 0.520847 -0.0774494 0.180729 0.22813 0.487006 0.311157 0.816092 -0.00534288 -0.467493 0.153786 0.376925 -0.0450676 0.925147 --0.0449465 0.135434 0.233866 -0.817374 0.34908 0.458305 -0.155623 0.103701 0.235181 0.554078 0.510481 0.657576 -0.267884 0.127546 -0.0970199 0.929782 -0.0449837 -0.365352 -0.168672 0.0720245 0.236904 0.626776 0.0394613 0.7782 -0.14775 0.0283087 0.23949 0.489031 -0.44337 0.75118 -0.276129 0.474034 0.00536837 0.272985 0.143793 0.951211 -0.30007 0.379443 0.00423604 0.0388958 0.144321 0.988766 -0.0133566 -0.0106841 0.239991 -0.115794 -0.543151 0.831612 -0.000259148 0.404504 -0.0576676 -0.189212 0.963807 -0.187817 -0.269733 0.146134 -0.0932639 0.943028 -0.00175796 -0.33271 --0.00480989 -0.0127836 0.238723 -0.0788936 -0.640478 0.763913 -0.279395 0.404698 0.00034901 -0.0362167 0.00869697 0.999306 -0.0427724 0.249724 0.228868 0.0656726 0.199765 0.977641 --0.0119424 0.23504 0.229447 -0.157162 0.163021 0.974025 -0.00100523 0.245776 0.228995 -0.09828 0.216443 0.971336 -0.0521519 0.234349 0.230434 0.127334 0.115705 0.985088 -0.323447 0.361702 -0.0398561 0.979524 -0.0383157 -0.19765 -0.00635684 0.207596 0.234493 -0.0894775 0.163279 0.982514 -0.0747102 0.201937 0.227121 0.336164 0.0516131 0.940388 -0.233525 -0.00874049 -0.0335808 0.757134 -0.634974 -0.153483 -0.221997 -0.0182716 -0.0460013 0.716587 -0.670649 -0.191657 -0.131258 0.417415 0.0081932 -0.327288 0.928061 0.177724 -0.0720758 -0.451908 0.0550947 0.825946 -0.124505 0.549829 --0.0736707 -0.0716399 -0.00735656 -0.520335 -0.843909 -0.130648 -0.0892957 0.164052 0.229091 0.595612 0.500093 0.628612 --0.203702 -0.404746 -0.225403 -0.618219 -0.42996 -0.657982 --0.240362 -0.417145 -0.00500179 -0.788304 -0.477961 0.387467 --0.0628838 0.0947114 0.229396 -0.863154 0.281694 0.419062 -0.100206 0.346827 -0.170683 0.289763 0.692867 -0.660282 --0.0721647 0.0111965 0.220449 -0.676788 -0.359386 0.642495 --0.0217233 -0.013014 0.234918 -0.217034 -0.67802 0.702272 -0.129894 0.203749 -0.237868 0.412994 0.188754 -0.890959 --0.242678 0.116919 -0.0995023 -0.79583 -0.57561 -0.187955 -0.0123446 0.259476 0.226311 -0.0596034 0.270152 0.960971 -0.266097 0.49174 0.00242032 0.174137 0.678714 0.713459 -0.0815505 0.2395 0.224115 0.259398 0.0758953 0.962784 --0.164174 -0.497322 -0.158659 -0.094332 -0.99324 -0.0676444 --0.0690082 -0.0389518 -0.125209 -0.390927 -0.811146 -0.434992 --0.0334666 -0.354731 -0.269687 0.44658 -0.249876 -0.859144 --0.212711 -0.236719 0.0259874 -0.382942 0.501186 0.775995 -0.12259 0.140551 -0.246054 0.399285 -0.0356171 -0.916135 --0.195879 0.0941335 0.0745503 -0.9219 -0.247758 0.297852 -0.171477 0.0913721 0.230463 0.593778 0.317938 0.73915 -0.28583 0.201202 0.00590791 0.989576 -0.14289 0.0179207 -0.284701 0.195744 0.0256548 0.99553 -0.0559824 0.0760635 -0.0921961 -0.03298 0.221783 0.315596 -0.699483 0.641188 --0.19757 0.231141 0.0355623 -0.960727 0.247071 0.126328 -0.00743555 0.40301 0.0708723 -0.143424 0.962398 0.230692 -0.0831364 0.275029 0.217128 0.188492 0.291606 0.937783 -0.030459 0.264359 0.225583 0.00022481 0.292012 0.956415 --0.107542 0.00863553 -0.165207 -0.359754 -0.684461 -0.634106 -0.0963126 -0.272946 -0.0942 0.647799 0.0245053 -0.761417 -0.0699765 0.227071 0.227794 0.23438 0.0606265 0.970253 --0.0375789 0.173129 0.226703 -0.506534 0.0826553 0.858249 --0.224374 -0.443473 -0.164346 -0.806494 -0.453761 -0.379036 -0.0899127 0.410827 0.0352016 0.0759998 0.987006 0.141575 --0.104737 0.29265 -0.18516 -0.502382 0.540737 -0.674697 -0.315704 0.296124 -0.0114773 0.974336 -0.219898 0.0481174 -0.156528 -0.155235 0.0753228 0.924026 0.281532 0.258681 -0.176955 0.0376343 0.221934 0.616363 -0.331553 0.714261 -0.172444 0.0173604 0.213979 0.572843 -0.485195 0.660634 -0.299108 0.255642 0.0249226 0.887522 -0.141547 0.438486 --0.0131785 0.407018 -0.00141679 -0.22996 0.973135 0.0112515 --0.0414833 -0.0255945 0.212991 -0.361134 -0.69433 0.622485 -0.105977 -0.0358363 0.20952 0.368893 -0.751638 0.546771 --0.0305623 0.402171 0.00410177 -0.292176 0.956154 0.0200494 -0.0509055 -0.0513813 0.209721 0.0521126 -0.845764 0.531006 -0.0382822 0.294313 0.213776 0.00905402 0.437567 0.89914 -0.072751 0.289751 0.213204 0.132045 0.394127 0.909521 -0.134196 -0.318977 -0.0403878 0.852285 -0.333044 -0.403352 --0.215049 -0.482204 -0.08223 -0.696836 -0.717132 0.0118405 --0.0371994 0.276325 0.211908 -0.270387 0.367762 0.889743 -0.0808025 0.258005 0.221498 0.208643 0.185929 0.960155 --0.0479106 0.227294 0.221508 -0.336175 0.0954716 0.936948 -0.271711 0.0653285 -0.0512982 0.935813 -0.29235 -0.196941 --0.0634739 0.107648 0.216921 -0.820996 0.257279 0.509679 --0.0467305 0.119383 0.243612 -0.831331 0.297807 0.469254 -0.0873076 0.216826 0.222539 0.35582 -0.0230848 0.934269 --0.0590134 0.0943439 -0.242171 -0.345828 -0.257792 -0.90219 -0.131321 -0.344461 0.00946143 0.891557 -0.448657 0.0619107 --0.0854884 0.222512 -0.229977 -0.452211 0.213969 -0.865865 --0.277686 -0.290192 -0.199371 -0.893655 -0.288556 -0.343679 -0.142508 -0.00358981 0.21972 0.456225 -0.582452 0.672762 -0.015751 -0.047366 0.211146 -0.178511 -0.77787 0.602538 --0.0497216 -0.365606 -0.273324 0.348927 -0.31009 -0.884361 -0.129895 0.123684 -0.241448 0.424279 -0.0881254 -0.901233 --0.0490313 0.244983 0.21819 -0.325396 0.210371 0.921879 --0.0144409 -0.0811025 -0.0804516 -0.250158 -0.887601 -0.386763 -0.103183 0.163098 0.216876 0.533202 0.371302 0.760152 --0.0512708 0.160848 0.217888 -0.614712 -0.0162097 0.788585 -0.106404 0.147704 0.227683 0.557437 0.623033 0.548719 --0.138995 -0.497062 -0.119021 0.0280531 -0.999208 0.0282223 --0.0602731 0.12348 0.212954 -0.739265 0.252648 0.624224 --0.241848 -0.206059 -0.0236276 -0.595985 0.629999 0.497899 -0.169095 -0.184859 0.0264332 0.96156 0.251019 -0.111318 --0.0985354 0.0303917 0.194372 -0.79858 0.00630947 0.601856 --0.077197 0.0282186 0.221698 -0.762845 -0.163336 0.625611 --0.126921 -0.0357804 0.0178278 -0.660664 -0.748539 -0.0566688 --0.0891709 -0.154158 -0.083813 0.143996 0.984011 0.104821 -0.0795056 -0.0424948 0.21565 0.242294 -0.791745 0.560743 -0.0336596 -0.0490961 0.213185 -0.0728965 -0.810841 0.580709 --0.0721722 0.125839 -0.243534 -0.388106 -0.11705 -0.914152 --0.0754418 0.191089 -0.240577 -0.403611 0.123944 -0.906496 --0.0500997 0.264311 0.212157 -0.322629 0.310326 0.894208 -0.118364 0.272583 0.207555 0.343746 0.233271 0.909628 --0.229141 0.136577 0.0170002 -0.408393 0.307745 0.859365 --0.0645815 0.234074 0.213811 -0.410664 0.127727 0.902796 --0.0808139 0.223545 0.206736 -0.472636 0.0491216 0.879888 --0.232396 0.153759 0.0077317 -0.290223 0.424667 0.857571 -0.27719 0.354226 0.00587037 -0.148202 0.209299 0.966556 --0.0661218 0.168412 0.207906 -0.56975 -0.167422 0.804584 -0.284775 0.370499 0.00420385 -0.116861 0.153671 0.981187 --0.133033 0.104874 0.151655 -0.450409 -0.0491812 0.891467 -0.0606629 0.0830816 0.285562 0.004607 -0.153949 0.988068 -0.183353 0.107603 0.211347 0.448593 0.52395 0.724045 --0.0763104 0.100446 0.201554 -0.846206 0.096008 0.524136 -0.257189 0.354868 0.00241999 -0.074753 0.184427 0.979999 -0.296623 0.356002 0.00833153 -0.00622194 0.19894 0.979992 -0.211119 0.0744112 0.200203 0.702564 -0.059823 0.709101 -0.192106 0.0442381 0.21124 0.664052 -0.291169 0.688662 --0.0649802 -0.00466575 0.216393 -0.583137 -0.519401 0.624639 --0.0687532 0.176057 -0.245287 -0.378276 0.0818991 -0.922063 -0.129492 0.0180157 0.243111 0.353944 -0.52895 0.771321 -0.0933872 -0.0457937 0.202581 0.308294 -0.816106 0.488801 -0.265958 0.458777 0.00676423 0.187905 -0.0958288 0.977501 -0.207036 0.413727 -0.10933 -0.131078 0.522927 -0.842239 -0.045714 0.306103 0.207392 0.0348916 0.500339 0.865126 -0.106605 -0.0221619 0.224778 0.360922 -0.619218 0.697355 -0.0915273 0.288086 0.210375 0.205911 0.372641 0.904842 -0.254432 0.168483 0.134854 0.852788 0.112973 0.509892 --0.0800357 0.260861 0.200087 -0.463392 0.285328 0.838961 -0.124045 0.137209 0.223526 0.506929 0.651637 0.564263 --0.234668 -0.409368 0.0124195 -0.748078 -0.428129 0.507035 --0.0385829 0.208573 0.225636 -0.312075 0.0305818 0.949565 -0.130304 0.182508 0.201247 0.374436 0.104049 0.921397 --0.0979311 -0.0591852 0.0201934 -0.584393 -0.808631 -0.0678308 --0.044406 0.253612 -0.238889 -0.310881 0.323809 -0.893589 --0.0564248 0.237093 -0.239505 -0.359442 0.258526 -0.896641 -0.179466 0.132963 0.19053 0.34647 0.444779 0.825912 -0.111346 0.242236 0.214238 0.357609 0.0128267 0.933783 -0.099319 0.230011 0.218471 0.35092 -0.0295253 0.93594 -0.239274 -0.00736476 0.00376447 0.775801 -0.630156 -0.0321853 --0.0754562 0.115089 0.203822 -0.794161 0.207056 0.571345 -0.0237143 -0.0374494 0.224161 -0.17749 -0.672547 0.718455 -0.195259 0.0754563 0.214478 0.643429 0.0302607 0.764907 -0.201551 0.0607234 0.207301 0.687008 -0.165466 0.70756 --0.0834841 0.0558741 0.211249 -0.854893 0.215878 0.471758 --0.0643355 0.269233 0.204863 -0.383048 0.336187 0.86038 --0.0474499 -0.0356879 0.197431 -0.393399 -0.726905 0.562891 -0.06135 0.332602 0.187613 0.0549211 0.644375 0.762735 -0.0161745 0.319773 0.197707 -0.075126 0.589709 0.804114 --0.0137848 0.305447 0.20262 -0.182653 0.521631 0.83339 -0.0733307 0.268248 -0.236595 0.233268 0.41743 -0.878258 --0.127955 0.108955 -0.209957 -0.531812 -0.175751 -0.828425 --0.0659522 0.295832 0.190186 -0.394926 0.48793 0.778433 --0.0772834 0.0832018 0.2049 -0.868569 0.223659 0.442226 -0.133547 0.26065 0.203841 0.397741 0.128075 0.908515 --0.0966431 0.00970235 0.191897 -0.73394 -0.291464 0.613499 -0.100274 0.301505 0.202097 0.230864 0.449996 0.862673 -0.269126 0.32804 0.0129876 -0.124162 0.359771 0.924742 --0.107542 0.180886 0.185431 -0.509418 -0.293563 0.808897 -0.0152016 -0.495489 -0.0420591 -0.559725 -0.821443 0.109268 --0.0868019 -0.00680214 0.192825 -0.64865 -0.473812 0.595613 -0.22182 0.115753 0.18278 0.596222 0.270085 0.756024 --0.0948136 0.0505413 0.193509 -0.82109 0.297939 0.486871 -0.185499 0.0273876 0.20848 0.637644 -0.419472 0.646106 -0.181796 0.0102065 0.199229 0.610236 -0.539835 0.579819 --0.132668 0.125843 -0.209705 -0.547071 -0.116927 -0.82888 -0.109058 -0.0464781 0.189827 0.351866 -0.815655 0.459236 -0.0341723 0.319281 0.19917 -0.00844678 0.582964 0.812454 -0.10867 0.285357 0.207067 0.284736 0.342531 0.89532 -0.188433 0.400781 0.0255219 0.471337 -0.0771609 0.878571 -0.158497 0.251031 0.194819 0.410258 0.0464684 0.910785 -0.143072 0.248178 0.200176 0.392541 0.00662342 0.919711 -0.142754 0.211965 0.195061 0.416565 -0.108091 0.902657 --0.143391 0.217812 0.164855 -0.654561 0.0923838 0.750343 -0.0326266 0.0379575 -0.237942 -0.021775 -0.482369 -0.875698 --0.0780482 0.182631 0.204007 -0.510554 -0.206102 0.834779 --0.0796279 0.164402 0.197187 -0.58842 -0.26845 0.76269 -0.150113 0.178974 0.193089 0.373547 0.159721 0.913757 -0.234536 0.104274 0.173953 0.741076 0.101644 0.663683 -0.151137 0.15897 0.197439 0.353307 0.202095 0.913418 -0.238384 0.476336 0.0131747 0.0264278 0.373134 0.927401 -0.150036 -0.0372912 0.169135 0.474244 -0.765002 0.435735 --0.148343 -0.495833 -0.00639435 0.00647433 -0.999946 -0.00810157 -0.199365 0.0338025 0.198213 0.687645 -0.387722 0.613854 -0.0792665 -0.466359 0.0421106 0.777514 -0.20742 0.593674 --0.0820443 -0.0701455 0.0242982 -0.53361 -0.844098 -0.0525283 -0.066451 -0.0509275 0.207374 0.161365 -0.85158 0.498772 -0.0631149 0.40022 -0.0938933 0.0548789 0.950647 -0.305381 --0.160699 -0.431826 -0.239847 -0.386316 -0.46219 -0.798211 -0.286621 0.21066 0.023799 0.973154 -0.202974 0.108503 --0.0590287 0.311592 0.182752 -0.363159 0.567119 0.739251 --0.0908123 0.271282 0.189276 -0.505395 0.355766 0.786133 --0.0682853 0.221616 -0.238488 -0.399094 0.204677 -0.893774 --0.160627 0.197786 0.150139 -0.706976 0.0485266 0.70557 -0.202772 0.470157 0.00331987 -0.527109 0.785097 0.325237 -0.0232318 -0.320875 0.148896 -0.0391096 -0.475661 0.878759 --0.0673755 -0.496912 0.0348613 0.0358206 -0.986938 -0.157069 -0.149704 0.230974 0.196168 0.377466 -0.145797 0.914474 -0.223719 0.165237 0.164911 0.421181 0.18015 0.888905 -0.00785924 -0.295268 -0.242527 0.755103 0.160866 -0.635564 --0.149845 -0.220369 0.0273222 -0.055348 0.572601 0.817964 --0.0671208 -0.054212 0.150202 -0.453528 -0.797205 0.398467 -0.0538287 -0.150042 0.157784 -0.104462 0.408315 0.906844 --0.0764727 0.145083 0.192731 -0.700054 -0.145075 0.699198 -0.196726 0.134192 0.185613 0.293624 0.421233 0.858107 --0.077564 0.124033 0.189183 -0.757894 0.124807 0.640328 -0.291806 0.385536 -0.0915922 0.648592 0.146695 -0.746866 --0.158816 -0.234441 0.03643 -0.0449442 0.518445 0.853929 -0.166783 -0.00134073 0.202187 0.542653 -0.60061 0.587193 -0.0471171 0.357531 0.163566 0.00233928 0.757953 0.652305 -0.023768 0.333331 0.187318 -0.049371 0.661675 0.748164 -0.0730714 0.319631 0.196351 0.108175 0.569679 0.814717 -0.0927612 0.315351 0.19571 0.19115 0.539159 0.820225 --0.0418521 0.316039 0.186758 -0.293721 0.589521 0.752458 -0.319935 0.376125 -0.0531852 0.940476 0.00646088 -0.3398 --0.109425 0.244159 0.186099 -0.558478 0.203634 0.804137 -0.0795071 -0.131974 0.147763 0.2355 0.405202 0.883375 -0.15519 0.19736 0.188758 0.420269 0.0275212 0.906982 -0.167375 0.18511 0.185011 0.425464 0.173124 0.888262 -0.1804 0.172025 0.181657 0.466073 0.200464 0.861737 --0.123112 -0.0399317 0.0364869 -0.65804 -0.75292 -0.00978299 -0.228568 -0.019684 0.0145235 0.73631 -0.676642 -0.00150929 -0.00984426 -0.337041 0.13909 -0.0983729 -0.48439 0.869304 --0.160524 0.000182052 0.0310137 -0.808023 -0.586767 0.0529559 -0.0190345 -0.28972 -0.225114 0.855397 0.210723 -0.473172 --0.0899531 0.069237 0.184152 -0.802572 0.205579 0.560014 -0.211587 0.0314837 0.181389 0.731728 -0.414109 0.541376 -0.133546 0.332939 0.166619 0.376505 0.650699 0.65942 --0.0442391 -0.204448 -0.229628 0.488336 0.671992 -0.556737 -0.0722391 -0.308654 0.147729 0.288846 -0.56288 0.774425 -0.0772194 0.336675 0.182546 0.113783 0.657029 0.745229 -0.0881908 0.327308 0.18817 0.168789 0.606976 0.776589 --0.121564 0.344077 -0.0925125 -0.462579 0.83293 -0.303724 --0.105636 0.262876 0.182617 -0.554309 0.310844 0.772087 -0.167142 0.265083 0.187421 0.473562 0.205816 0.856375 --0.0300911 -0.281617 0.136227 -0.666923 -0.0417645 0.743955 -0.283814 0.0958877 -4.56106e-005 0.988612 -0.144501 -0.0420122 --0.128757 0.142287 -0.214012 -0.538099 -0.0513321 -0.841317 --0.107266 0.223496 0.191185 -0.541269 0.0604236 0.838676 -0.281384 0.0801032 0.00593653 0.97781 -0.208267 -0.0226152 -0.285931 0.110425 0.0119725 0.996134 -0.0871878 -0.0107274 -0.252096 0.0653795 0.136213 0.873691 -0.269556 0.404974 -0.285837 0.139307 0.0381497 0.996221 0.030109 0.0814672 -0.286247 0.150044 -0.000705009 0.998686 0.0410013 -0.0307357 --0.0876822 0.138441 0.181141 -0.642846 -0.0715064 0.76265 -0.202284 0.14565 0.179187 0.333055 0.334856 0.881445 -0.207195 0.121316 0.189393 0.419161 0.441124 0.793545 -0.285588 0.162942 0.0116112 0.99873 0.0499026 0.00695993 --0.0821154 0.358152 0.107546 -0.496181 0.776113 0.389169 --0.18653 0.275962 0.0175312 -0.920435 0.275188 0.277616 --0.225565 -0.404497 0.0270904 -0.688816 -0.363088 0.627455 -0.00169514 0.383431 0.119588 -0.133083 0.873465 0.468346 --0.211383 -0.262467 0.0401475 -0.380925 0.34384 0.858295 -0.266656 0.323838 -0.113014 0.552708 -0.0714479 -0.830307 --0.0484245 -0.216504 -0.245892 0.458419 0.614324 -0.642229 --0.155932 0.0616327 0.127019 -0.747669 -0.105353 0.655662 -0.060017 -0.060342 0.191113 0.125293 -0.89719 0.423499 --0.206642 -0.149842 -0.228953 0.676887 0.722889 -0.138765 --0.12539 -0.48523 0.106222 -0.108483 -0.611115 0.784072 -0.236126 0.245033 0.13501 0.784954 0.325557 0.527124 --0.0103998 0.331556 0.183914 -0.177649 0.656012 0.733546 --0.0513676 0.328222 0.172184 -0.328927 0.647862 0.687082 -0.0618566 0.39261 0.107642 0.0406968 0.906164 0.420964 --0.182439 0.104457 0.108434 -0.801926 -0.200013 0.562947 -0.167335 -0.0469345 0.126764 0.54085 -0.776831 0.322514 --0.0647511 -0.0746823 0.0910163 -0.454802 -0.868221 0.198363 -0.175501 0.224279 0.183574 0.374177 -0.137899 0.917047 --0.0429971 -0.25014 0.120471 -0.76157 0.14629 0.631356 -0.173245 0.203737 0.180084 0.390117 -0.0907809 0.916279 -0.184358 0.190176 0.174624 0.375906 0.0731088 0.923769 --0.113004 0.14129 -0.223735 -0.513119 -0.0449522 -0.857139 -0.103389 0.0929218 -0.247659 0.317138 -0.222223 -0.921976 -0.19659 -0.0298519 0.112713 0.619923 -0.728656 0.291128 -0.0730769 0.397156 0.0960547 0.0798435 0.922343 0.378031 --0.134043 -0.496627 0.0338585 -0.0146982 -0.999813 -0.0125686 -0.0751842 0.233888 -0.249989 0.237473 0.301348 -0.923469 -0.205801 0.0890039 0.20438 0.627976 0.161372 0.761318 -0.216274 0.0615552 0.191967 0.7464 -0.211164 0.631108 -0.188464 -0.00551974 0.172758 0.617518 -0.634824 0.464402 --0.187732 0.0786296 0.0847566 -0.891061 -0.291695 0.347742 -0.162221 -0.0268314 0.173169 0.519531 -0.733939 0.437517 -0.190991 -0.0273621 0.129755 0.605804 -0.725555 0.326455 -0.0946486 -0.062263 0.169257 0.260375 -0.869632 0.419458 -0.170165 -0.0511305 0.11068 0.554783 -0.77563 0.301021 -0.0752603 0.303691 -0.216297 0.230753 0.54019 -0.809288 -0.151229 0.300131 0.181926 0.44998 0.445865 0.773772 --0.0412495 -0.497206 -0.152933 -0.00300136 -0.999897 0.0140083 --0.253245 0.0876559 -0.16102 -0.995398 0.0634318 -0.0718239 -0.0238765 0.393776 0.103568 -0.0769775 0.914098 0.39812 --0.0287596 -0.498243 0.049671 -0.0257061 -0.999006 -0.03643 -0.190342 0.237692 0.179403 0.473899 0.0254124 0.880213 --0.0111958 -0.498523 0.0411049 -0.024003 -0.99913 -0.0340912 -0.187428 0.218228 0.178652 0.394982 -0.154338 0.905632 --0.166515 -0.487661 -0.194909 -0.390511 -0.773089 -0.499834 --0.118608 -0.0178899 -0.105074 -0.568661 -0.786078 -0.242296 --0.244569 0.0807216 -0.132937 -0.821121 -0.249507 0.513328 -0.215806 0.132324 0.179325 0.435666 0.35055 0.829042 --0.167396 0.287676 0.0742446 -0.833272 0.485607 0.264281 --0.248548 -0.356096 -0.205753 -0.779609 -0.383678 -0.494976 -0.227357 0.077217 0.182434 0.776167 -0.107688 0.621263 -0.0997798 -0.427125 0.0277826 0.741258 -0.176228 0.647672 -0.194923 0.342201 0.064439 0.720561 0.648327 0.245895 --0.10248 0.0575018 0.175647 -0.709633 0.299233 0.637871 -0.172897 -0.197846 0.0389113 0.976292 0.215605 -0.0191998 --0.146753 -0.0142214 0.0593403 -0.778309 -0.619187 0.104129 --0.20495 -0.0416225 -0.23386 0.677038 0.110023 -0.727677 --0.136759 -0.0272192 0.0332875 -0.701448 -0.712706 -0.00450482 -0.059883 -0.0724809 0.162568 0.118122 -0.854615 0.505648 --0.00743668 -0.0657615 0.171758 -0.181306 -0.885773 0.42724 -0.0512375 -0.18043 0.16878 -0.117661 0.27256 0.954917 -0.0482792 -0.199573 0.172847 -0.132981 0.168593 0.976674 --0.078822 -0.0698775 0.0760701 -0.506476 -0.852196 0.131319 -0.0633882 -0.212832 0.175202 0.0412802 0.0816575 0.995805 --0.00133174 -0.0722191 -0.106454 -0.170568 -0.882246 -0.438804 -0.0789097 -0.243202 0.173226 0.186561 -0.11821 0.975306 -0.0978087 -0.235891 0.16862 0.347286 -0.0685325 0.935252 --0.0272395 -0.152246 0.0334981 -0.926217 0.37699 -0.00109411 -0.00106965 0.408774 -0.0338774 -0.178949 0.978313 -0.104313 -0.0962077 0.339581 0.175665 0.199747 0.663898 0.720653 --0.0273754 0.326753 0.183326 -0.244566 0.639568 0.728794 -0.107268 0.326035 0.184136 0.239921 0.602929 0.760864 --0.100316 0.281855 0.17741 -0.536027 0.424654 0.729619 -0.100148 0.0735503 -0.243018 0.291003 -0.305251 -0.906719 -0.0591628 -0.472986 0.0735976 0.875653 -0.230621 0.424319 -0.194742 0.206013 0.172524 0.354681 -0.084811 0.931133 -0.133832 0.087664 -0.233632 0.431127 -0.223994 -0.874046 -0.20708 0.194203 0.168866 0.336292 0.0145153 0.941646 -0.21723 0.209872 0.164347 0.482748 0.0519332 0.874218 --0.27469 -0.304161 -0.195736 -0.885237 -0.294167 -0.360307 -0.0930014 -0.399664 0.047592 0.764086 -0.313286 0.563937 --0.0550951 0.0764473 -0.237568 -0.328936 -0.348207 -0.877812 --0.044097 0.0872945 -0.245341 -0.2952 -0.292659 -0.90951 --0.203489 0.11263 0.0629422 -0.951116 -0.154743 0.26727 -0.236348 0.0700879 0.167877 0.824826 -0.208046 0.525718 -0.207733 0.0468636 0.195957 0.721828 -0.302565 0.62243 -0.056259 0.1181 0.288654 0.331244 0.0292771 0.943091 -0.155981 -0.299299 0.0532445 0.84581 -0.514547 0.140877 --0.119191 0.0138047 0.165205 -0.77997 -0.228974 0.582424 -0.162734 -0.0164127 0.188969 0.525069 -0.681411 0.509883 -0.0694776 -0.175353 0.167724 0.0961667 0.29318 0.951209 -0.0637787 -0.193491 0.172532 0.0374627 0.188417 0.981374 --0.211589 -0.432767 -0.195671 -0.710023 -0.449658 -0.541918 --0.289723 -0.245071 -0.207059 -0.922275 -0.293873 -0.251091 -0.0295419 -0.224188 0.171486 -0.303841 0.0687755 0.950237 -0.145403 0.120281 -0.233355 0.470976 -0.104028 -0.875991 --0.283574 -0.278775 -0.192585 -0.918557 -0.271175 -0.287607 -0.0327699 0.40922 0.0519929 -0.0680256 0.98528 0.15683 -0.0417074 -0.256437 0.173092 -0.0914886 -0.147056 0.984888 -0.0683844 0.360024 0.159357 0.0724164 0.768324 0.635952 -0.0329613 0.346771 0.174891 -0.0285635 0.715133 0.698405 -0.0147604 0.406893 0.0551511 -0.121959 0.979687 0.159185 --0.093671 0.298918 0.170928 -0.511531 0.515047 0.687795 --0.135309 0.249971 0.164052 -0.658371 0.277111 0.699826 -0.196014 0.251559 0.17342 0.576635 0.19281 0.793925 --0.0463292 -0.497298 0.0367737 -0.0446986 -0.980864 -0.189494 --0.299806 -0.2135 -0.201461 -0.976319 -0.212644 -0.0397974 -0.288537 0.243026 0.0407597 0.841485 -0.0112898 0.540162 -0.236791 -0.00891816 0.0466209 0.759712 -0.644775 0.0842768 --0.136159 0.188637 0.169346 -0.55225 -0.151341 0.819827 --0.0487807 0.394424 0.0314825 -0.353581 0.930957 0.0910996 -0.219519 0.147056 0.171727 0.414689 0.281717 0.865256 --0.101122 0.143111 0.169618 -0.601224 -0.145331 0.785753 --0.0949763 0.122947 0.177801 -0.613228 0.0765649 0.786186 --0.223285 -0.274797 0.0384607 -0.483723 0.262028 0.835077 -0.17678 -0.218616 0.0341698 0.99297 0.107654 -0.0492019 -0.027073 -0.498258 0.027914 0.0190172 -0.999818 -0.00134788 --0.285369 -0.0748006 -0.204571 -0.890147 0.43077 0.148575 -0.16797 -0.178106 0.042907 0.962344 0.27102 0.0210085 -0.0439531 -0.163999 0.162056 -0.204657 0.352944 0.912987 -0.0237211 -0.163459 0.154698 -0.418975 0.349003 0.838246 -0.0344531 -0.17555 0.163662 -0.303788 0.299135 0.904561 -0.0886693 -0.45682 0.032462 0.735575 -0.132548 0.664349 --0.173628 -0.395112 -0.253755 -0.45333 -0.407787 -0.792592 -0.098463 -0.215669 0.168114 0.360569 0.0770766 0.929542 -0.112005 -0.22574 0.162259 0.488633 0.0204788 0.872249 --0.184313 0.265397 0.0519379 -0.911317 0.36459 0.191247 -0.0239264 -0.253963 0.16999 -0.276544 -0.0718463 0.958312 -0.254277 0.013815 0.0332908 0.845698 -0.53239 0.0368191 --0.181862 0.279152 0.0369375 -0.900299 0.389898 0.193496 -0.0534693 -0.270538 0.170318 0.0467087 -0.267976 0.962293 -0.0259819 -0.291461 0.16292 -0.145395 -0.326387 0.933987 --0.0233001 0.341117 0.170739 -0.227874 0.697323 0.679569 -0.200612 -0.0469742 0.027475 0.662688 -0.747456 0.0464141 --0.0585342 0.337736 0.158644 -0.3695 0.692813 0.619257 -0.173644 0.307501 0.160648 0.550276 0.536492 0.639823 -0.2297 0.460656 0.016665 0.208884 0.0456148 0.976876 -0.288005 0.320668 0.0179965 0.00523518 0.33844 0.940973 --0.0733367 0.379924 0.0589368 -0.439916 0.880888 0.17467 --0.152343 0.183166 0.157142 -0.597973 -0.0927428 0.796132 --0.285555 -0.344852 -0.0888009 -0.967315 -0.250618 -0.0386392 --0.0852074 0.153089 -0.239161 -0.431311 0.00191377 -0.902201 --0.0416646 0.394519 0.0514406 -0.327883 0.933618 0.144394 -0.0691295 -0.189509 -0.0801998 0.24417 0.492367 -0.835437 --0.0762346 0.383394 0.0178992 -0.441778 0.895357 0.056285 --0.19245 -0.452684 0.0469684 -0.86138 -0.184894 0.473117 --0.11218 -0.0480371 0.0187353 -0.622207 -0.78025 -0.0637837 -0.232143 0.0379972 0.153536 0.806996 -0.401917 0.432689 --0.166775 -0.49456 0.0217835 -0.320831 -0.94503 0.0631368 --0.103199 -0.0267771 0.151656 -0.636817 -0.635381 0.436754 -0.141616 0.171857 -0.236896 0.448942 0.0633462 -0.891313 -0.250317 0.458028 0.0101065 0.231109 -0.106294 0.967104 -0.0887734 -0.176023 0.163732 0.307584 0.294373 0.904841 -0.0181087 -0.179756 0.157591 -0.473568 0.278132 0.835689 -0.0147798 -0.19933 0.161364 -0.477099 0.203623 0.854935 -0.123927 -0.213688 0.153285 0.626404 0.119546 0.770277 -0.0174603 -0.23625 0.167701 -0.38062 0.0392723 0.923897 -0.00486651 -0.250305 0.16221 -0.461295 0.000735794 0.887247 -0.11207 -0.247471 0.160416 0.489092 -0.175268 0.854442 -0.0136011 -0.270716 0.164905 -0.33529 -0.144657 0.930943 -0.064948 -0.282396 0.164794 0.171227 -0.387475 0.905839 -0.0442425 -0.290841 0.1636 0.0431542 -0.381907 0.923192 --0.0476958 0.396307 -0.000673977 -0.353947 0.935264 -0.00133495 -0.0831664 0.350845 0.167728 0.13112 0.722278 0.67906 --0.178017 -0.260876 0.0490423 -0.109251 0.387246 0.915481 --0.0195587 0.352332 0.159812 -0.210947 0.746096 0.63154 --0.0679195 0.321426 0.169595 -0.408279 0.617373 0.672427 -0.295096 0.24049 0.0251976 0.931086 -0.246655 0.268775 -0.0430824 0.279628 -0.237137 0.126723 0.450695 -0.883638 -0.152746 -0.308997 0.0124033 0.863975 -0.500885 -0.0515857 --0.0390565 -0.0976648 0.052579 -0.698694 -0.708201 0.101382 -0.220759 0.224846 0.160219 0.600395 0.147577 0.785969 -0.226288 0.197164 0.159344 0.539418 0.0974925 0.836375 --0.0834783 0.174538 -0.238914 -0.422149 0.076943 -0.903255 -0.23191 0.137495 0.167848 0.598048 0.223573 0.769645 --0.13848 0.173626 0.16428 -0.484336 -0.250418 0.838278 --0.231525 -0.434516 -0.01015 -0.79154 -0.496561 0.356218 -0.135272 0.0402369 -0.214815 0.411401 -0.414388 -0.811808 --0.0405299 0.383671 -0.0944505 -0.353023 0.891898 -0.282653 -0.318082 0.430538 -0.00887002 0.785345 0.162858 0.597252 --0.0770258 0.383438 0.00241809 -0.435766 0.900037 0.00646728 --0.110766 0.0905054 0.163685 -0.645515 -0.00474341 0.763733 --0.171827 0.0154042 0.0183424 -0.833993 -0.54904 0.0548776 --0.16919 0.0144335 0.0383753 -0.850481 -0.514658 0.108667 --0.125804 0.309396 0.128309 -0.662041 0.595157 0.455511 --0.250978 0.0718296 -0.152129 -0.929972 -0.326519 0.168932 --0.180454 0.0449359 0.063462 -0.88917 -0.411272 0.200577 -0.126723 -0.0567894 0.156029 0.378743 -0.827276 0.414932 --0.251794 0.153966 0.00337369 -0.213216 0.309627 0.926645 --0.0568417 0.0218419 -0.204685 -0.324597 -0.579913 -0.74722 -0.112267 -0.203018 0.159417 0.52245 0.170201 0.83551 --0.00503937 -0.265828 0.156153 -0.513859 -0.0553472 0.856087 -0.239153 -0.00519258 -0.0158109 0.778146 -0.620157 -0.0994711 --0.190956 0.250571 0.0442272 -0.943095 0.294486 0.154436 -0.0963394 0.370597 0.138965 0.194649 0.814378 0.546718 -0.121516 0.348197 0.156875 0.330063 0.712333 0.619387 --0.0764181 0.329454 0.156016 -0.452253 0.661008 0.598778 --0.162206 0.310902 0.0456915 -0.79268 0.535067 0.292166 -0.207391 0.258183 0.161714 0.653189 0.277908 0.704351 --0.151374 0.324325 0.047609 -0.728729 0.627032 0.275292 -0.171247 -0.259722 0.00581719 0.963071 -0.181237 -0.199118 --0.136053 0.145138 0.155826 -0.420182 -0.290586 0.859655 -0.298499 0.242124 0.00872405 0.941229 -0.322025 0.101919 --0.145409 0.132264 0.145121 -0.520623 -0.187702 0.832899 --0.00450247 0.40439 0.0521849 -0.187139 0.97138 0.146289 -0.202686 0.47172 -0.0182063 -0.577184 0.813436 -0.071979 --0.188414 -0.438368 0.0542377 -0.804277 -0.0141618 0.594086 --0.128059 0.125986 0.154841 -0.439258 -0.0906422 0.893776 -0.26274 0.0318185 -0.0191925 0.885654 -0.453554 -0.0995288 -0.214688 -0.032387 -0.0130989 0.692485 -0.71571 -0.0906782 --0.117631 0.106824 0.157693 -0.529165 -0.0276317 0.848069 --0.115399 0.0709058 0.159992 -0.60347 0.108379 0.789986 -0.178712 0.0734845 -0.201546 0.590291 -0.264929 -0.762476 --0.128308 0.0851825 0.151726 -0.499317 -0.0202407 0.866183 --0.237581 0.0966271 -0.0107526 -0.71889 -0.68066 0.141063 -0.0436966 -0.0755693 0.159189 -0.00144243 -0.849204 0.528063 -0.296831 0.281113 -0.0712265 0.829736 -0.266274 -0.490547 -0.0310821 -0.285781 -0.184688 0.953886 0.282037 -0.102748 -0.157267 -0.272598 -0.0268758 0.876816 -0.198277 -0.438042 -0.324253 0.383336 -0.0370719 0.986389 0.00379942 -0.164382 -0.032147 -0.133868 0.144608 -0.349795 0.400083 0.847099 -0.0356379 -0.148632 0.153297 -0.294411 0.402589 0.866743 -0.283807 0.105834 0.0493714 0.98797 -0.0989011 0.118885 -0.0834568 0.40884 0.0505912 0.0862788 0.97885 0.185494 --0.297066 0.304092 -0.024639 -0.11784 0.0367579 0.992352 -0.105587 -0.267101 0.157832 0.427574 -0.342643 0.836527 -0.0866283 -0.273319 0.16306 0.291727 -0.370326 0.881904 --0.248915 0.252553 -0.0268156 -0.0229762 0.0590708 0.997989 --0.00109485 -0.326054 0.14256 -0.278581 -0.397096 0.874475 -0.00596991 -0.313631 0.150157 -0.257912 -0.359786 0.89668 --0.282354 0.152984 -0.0148565 -0.817023 -0.42434 0.390397 --0.00867901 -0.433543 0.14381 0.0732086 0.648465 0.757716 -0.026745 0.404691 0.0717265 -0.0782994 0.968547 0.236189 --0.0196373 -0.445226 0.15263 -0.0756063 0.449629 0.89001 --0.0486355 -0.457301 0.144649 -0.551124 0.131473 0.824001 -0.134057 -0.337889 -0.00886931 0.902143 -0.419336 -0.101463 --0.00172344 -0.450182 0.153931 0.224795 0.334602 0.915155 --0.0479387 -0.0916439 0.0343911 -0.607342 -0.794399 0.00808736 --0.0156604 -0.465876 0.156704 -0.0466336 -0.028044 0.998518 -0.0240601 -0.469545 0.140656 0.698669 -0.0762293 0.711372 -0.127257 0.223524 -0.234121 0.404263 0.263384 -0.8759 --0.00596181 -0.48296 0.153663 0.137461 -0.473348 0.870084 -0.0739192 0.413991 -0.0280466 0.0201786 0.99484 -0.0994305 -0.0554833 0.367821 0.150236 0.0219588 0.809531 0.586666 --0.322869 0.287169 -0.0349695 -0.846031 0.0559911 0.530186 -0.000712905 0.366474 0.147017 -0.134264 0.813137 0.566375 -0.139932 0.343233 0.151601 0.418132 0.695837 0.583932 --0.109751 0.292374 0.162533 -0.576096 0.491049 0.65344 -0.125361 0.242381 -0.228528 0.397366 0.324978 -0.85819 -0.0962844 0.387511 0.109438 0.199755 0.880388 0.430133 --0.245162 0.1036 -0.0292346 -0.748036 -0.663502 -0.0143792 --0.191802 0.0750757 0.067274 -0.910611 -0.325454 0.254692 -0.262846 0.250418 0.0714921 0.82231 0.401431 0.403312 -0.109137 0.234102 -0.238444 0.351802 0.30048 -0.886536 --0.106214 0.361489 0.0544767 -0.552156 0.811119 0.192901 -0.0498229 -0.0672561 0.17672 0.0618666 -0.9168 0.394525 --0.106831 0.367675 -0.0153547 -0.489115 0.871799 -0.027067 --0.0404071 -0.490825 0.0177872 -0.267296 -0.909771 -0.317601 -0.133375 0.416764 -0.0453501 -0.385779 0.900997 -0.198444 --0.102051 -0.49694 0.05816 -0.00153112 -0.999997 0.00180525 -0.105406 0.413663 -0.0309621 -0.0754981 0.98868 -0.129658 --0.221845 -0.466723 -0.0400832 -0.78248 -0.582817 0.219203 -0.265383 0.0475946 -0.0500203 0.903779 -0.382928 -0.191179 --0.131006 0.023828 0.152667 -0.781004 -0.149227 0.606436 --0.121488 -0.496982 0.0547129 -0.00860175 -0.999958 -0.00321092 --0.126231 -0.0120598 0.133751 -0.748872 -0.531254 0.396181 --0.113554 -0.0273092 0.133571 -0.673586 -0.644517 0.361773 -0.21942 0.449433 -0.0832884 -0.209465 0.719179 -0.6625 -0.161986 -0.0374315 0.154393 0.516907 -0.756904 0.399879 --0.254246 -0.191909 -0.0669395 -0.686997 0.666227 0.290131 -0.0775145 -0.0690406 0.1631 0.197677 -0.863933 0.463188 -0.147817 -0.429784 -0.0446106 0.80523 0.564273 0.182211 -0.0873558 -0.147567 0.152497 0.327868 0.393436 0.858901 -0.0191569 -0.150367 0.145713 -0.489636 0.376741 0.786335 -0.0971157 -0.163073 0.15512 0.420291 0.35419 0.835407 -0.00887131 -0.166893 0.146036 -0.593484 0.324365 0.73659 -0.10574 -0.182198 0.157978 0.481876 0.277187 0.831242 -0.00551042 -0.188294 0.151822 -0.595589 0.262138 0.759314 --0.0160387 -0.211922 0.139953 -0.710934 0.234395 0.663048 -0.0803264 -0.404179 0.0618709 0.749628 -0.307402 0.586142 -0.120496 -0.264803 0.149665 0.568637 -0.319196 0.758133 --0.0524006 0.388444 -0.0581745 -0.375536 0.906768 -0.191688 -0.0769041 -0.29167 0.15685 0.272956 -0.478643 0.834503 --0.101704 -0.0441903 -0.0501125 -0.589232 -0.789982 -0.169514 --0.0383403 -0.439584 0.144574 -0.368638 0.519255 0.771026 --0.025643 -0.484411 0.151437 -0.216648 -0.504207 0.835966 --0.0321584 -0.456176 0.154216 -0.313936 0.152377 0.937137 --0.228043 -0.175525 -0.0565103 -0.500681 0.790723 0.352244 --0.289785 -0.29548 -0.0578285 -0.982145 0.000609769 0.188127 --0.282045 0.152068 -0.04116 -0.817214 -0.565153 -0.112975 --0.069579 0.344506 0.1427 -0.431673 0.725692 0.535752 --0.103737 0.307846 0.155273 -0.552916 0.568584 0.609094 --0.119145 0.301883 0.145512 -0.621563 0.547747 0.560029 -0.0961005 -0.414442 0.0366307 0.758697 -0.24411 0.603978 -0.226113 0.251287 0.144842 0.735344 0.324386 0.595016 --0.158004 0.232497 0.146076 -0.752699 0.22949 0.617072 --0.286864 -0.262418 -0.0573633 -0.958985 0.182419 0.216957 --0.203452 -0.321391 0.0568362 -0.360698 0.073468 0.929785 --0.0412528 -0.0550913 0.171967 -0.340513 -0.817393 0.464671 -0.244909 0.143178 0.153948 0.751142 0.134745 0.646243 --0.151423 0.149829 0.146536 -0.542941 -0.282137 0.790958 -0.256851 0.0305309 -0.0518598 0.861911 -0.466746 -0.198133 --0.075228 -0.0586574 -0.070901 -0.51506 -0.820968 -0.246424 --0.282158 -0.247515 -0.0529447 -0.920853 0.294688 0.255321 -0.0994292 -0.497629 -0.0263233 0.0338717 -0.996097 0.0815096 -0.226017 -0.0218388 0.0360489 0.722885 -0.688629 0.056809 -0.291791 0.446592 -0.0665865 0.580336 0.454893 -0.675487 --0.144491 0.0527223 0.137841 -0.734918 -0.061932 0.675322 -0.238938 0.0342837 0.136474 0.820157 -0.426541 0.38132 --0.115681 -0.154216 -0.0707541 0.111043 0.960921 0.253575 --0.183842 0.0436689 0.042855 -0.889321 -0.426931 0.163824 -0.0717569 -0.0803147 0.148737 0.203053 -0.721992 0.661436 --0.188236 0.0593691 0.0570743 -0.900717 -0.385079 0.201053 -0.0250221 -0.0774129 0.154513 -0.0989375 -0.856915 0.505874 -0.074248 -0.113847 0.140502 0.170028 0.315898 0.933434 --0.234336 0.349064 -0.0763256 0.11354 0.921131 -0.372326 --0.175602 0.0293546 0.0494934 -0.878257 -0.451483 0.15757 -0.00434752 -0.132866 0.123752 -0.695178 0.326627 0.640346 -0.150666 -0.0544877 -0.0939604 0.433298 -0.819341 -0.375411 -0.143841 -0.0733379 -0.0614907 0.503311 -0.774169 -0.383849 -0.153435 -0.237365 0.119984 0.849252 -0.0432531 0.526214 --0.012177 -0.245598 0.150995 -0.6087 0.0688723 0.790405 --0.202236 0.20615 0.0455496 -0.971525 0.200903 0.125607 -0.302938 0.358238 -0.0824612 0.781866 -0.00708288 -0.623406 --0.0538176 -0.496465 -0.10859 0.0282291 -0.998601 0.0447093 --0.00176602 0.328914 -0.203896 -0.130951 0.664961 -0.735309 -0.191251 -0.0320871 -0.0864429 0.578673 -0.748168 -0.324626 --0.083588 -0.494255 -0.200803 0.102751 -0.917369 -0.384546 -0.245529 0.461549 -0.0742484 0.0380972 0.707279 -0.705907 -0.0513129 0.411362 0.0418314 -0.0193242 0.991384 0.129551 --0.224555 0.0859739 -0.0778756 -0.78666 -0.601228 -0.140327 -0.000223266 -0.495811 0.137799 0.169825 -0.891799 0.419349 -0.277384 0.213037 0.0625546 0.938029 0.0765217 0.338003 -0.226164 0.00197594 -0.0847399 0.732563 -0.603735 -0.314414 --0.0954942 0.321934 0.148269 -0.524381 0.64143 0.559993 --0.06072 -0.49762 0.0523084 -0.0262511 -0.999382 -0.0233844 -0.225628 0.268146 0.133995 0.762633 0.41333 0.497543 -0.251976 0.223874 0.120582 0.862283 0.248231 0.441417 --0.181236 -0.496218 -0.0764276 -0.0968135 -0.994978 0.0254054 --0.201114 -0.37186 0.0562714 -0.450115 -0.115112 0.88552 -0.254002 0.131275 0.143091 0.852621 0.0751274 0.517101 --0.145232 0.114252 0.14396 -0.591089 -0.0522337 0.804914 --0.0605326 -0.05562 -0.099212 -0.396306 -0.838391 -0.374222 -0.149143 0.358457 0.120572 0.506058 0.752445 0.421582 --0.143489 -0.013736 -0.0323718 -0.682271 -0.71915 -0.131644 --0.288335 0.324457 -0.0943232 -0.464991 0.513312 -0.721314 -0.155705 -0.0608326 -0.0733306 0.478293 -0.808615 -0.342604 --0.127412 0.00279368 0.147122 -0.774402 -0.384612 0.502369 --0.0767849 -0.0420033 0.161551 -0.506621 -0.738135 0.445524 -0.121517 -0.0703729 -0.089775 0.348297 -0.825222 -0.444632 -0.16361 -0.167765 0.0587872 0.949497 0.283139 0.13523 -0.0201214 -0.0867587 0.139907 -0.226315 -0.712226 0.664466 -0.0596549 0.281591 -0.233245 0.183348 0.457727 -0.869982 --0.2932 -0.280538 -0.0877687 -0.996628 0.0334272 0.0749293 -0.0579161 -0.106886 0.138916 0.00166623 0.107212 0.994235 -0.226581 0.436863 -0.0962333 -0.0598143 0.611463 -0.789009 -0.012204 0.298354 -0.228269 -0.0342325 0.537977 -0.842264 --0.157383 0.302221 0.0767639 -0.788856 0.542369 0.289036 --0.021091 -0.26183 0.144714 -0.642603 0.0166751 0.766018 -0.131589 -0.298965 0.113803 0.658821 -0.561362 0.500827 -0.0266154 -0.335807 0.139561 0.0804853 -0.53465 0.841232 --0.239621 -0.351307 -0.22149 -0.722407 -0.376533 -0.579957 --0.0265322 -0.428556 0.137487 -0.166125 0.708279 0.686107 --0.172785 0.295826 0.0405799 -0.859672 0.443332 0.253812 --0.10861 -0.457846 -0.235535 0.0363217 -0.514847 -0.856512 --0.184773 -0.408526 -0.238624 -0.530186 -0.433288 -0.72881 --0.10464 0.356896 0.0736636 -0.562228 0.781612 0.270153 -0.0463626 -0.0905321 -0.083551 -0.0438131 -0.798468 -0.600441 --0.284477 -0.339875 -0.112849 -0.956986 -0.264402 -0.119454 -0.0133712 -0.483754 0.145706 0.470605 -0.484474 0.737439 -0.00312107 0.382717 -0.132452 -0.166679 0.897605 -0.408073 -0.0105751 0.376018 0.134663 -0.110729 0.845805 0.521874 --0.0160042 0.362878 0.147422 -0.192058 0.797942 0.571316 -0.147847 0.102465 -0.229441 0.486216 -0.161322 -0.858819 --0.1117 0.316392 0.13788 -0.590227 0.627562 0.507738 --0.138163 0.27687 0.145943 -0.690244 0.442509 0.572494 --0.151786 0.26264 0.138383 -0.753941 0.379844 0.535996 -0.246135 0.239978 0.121457 0.836642 0.325229 0.440745 --0.124033 -0.496088 -0.0761227 -0.0470472 -0.998162 -0.0381991 --0.192365 -0.494547 -0.129871 -0.30348 -0.951144 -0.0567973 -0.105693 -0.00595186 -0.196935 0.286841 -0.634358 -0.717853 --0.0430538 -0.498263 0.0590496 -0.0262742 -0.999228 -0.0292152 --0.0847431 -0.0367417 -0.113095 -0.452904 -0.812935 -0.366082 --0.101121 -0.030571 -0.103916 -0.530739 -0.797726 -0.286268 -0.218075 0.00831971 0.145039 0.73206 -0.559044 0.389305 --0.138432 0.00308173 0.128158 -0.804482 -0.434854 0.404612 --0.057275 -0.498214 0.0909328 -0.085694 -0.995637 0.0369245 --0.0173999 0.0155843 -0.214416 -0.243344 -0.584289 -0.774203 --0.220851 -0.470714 -0.12528 -0.809197 -0.572996 -0.129902 --0.0655395 0.366119 -0.112176 -0.405768 0.848677 -0.339265 -0.090436 -0.11981 0.138603 0.372037 0.356484 0.857034 --0.185237 -0.496111 -0.113655 -0.157168 -0.98757 -0.00168616 --0.289229 -0.235762 -0.115976 -0.959644 0.267802 0.0858259 -0.127172 -0.193816 0.145377 0.666924 0.236147 0.706715 -0.13734 -0.206157 0.138804 0.743271 0.167123 0.64778 -0.156562 -0.215784 0.113152 0.868975 0.109559 0.482576 -0.122299 -0.495878 -0.107335 0.132369 -0.875141 -0.46541 --0.199923 -0.492422 -0.106745 -0.418463 -0.907953 -0.0225766 --0.259421 -0.304984 -0.223807 -0.777838 -0.336446 -0.530822 -0.0908945 -0.313492 0.134725 0.391594 -0.617786 0.681905 -0.0793755 -0.0684616 -0.117018 0.158405 -0.876285 -0.455007 -0.0198839 -0.352127 0.130152 0.0738768 -0.522852 0.849216 -0.0589585 -0.497675 -0.120921 0.156003 -0.975607 -0.154444 --0.0635352 -0.427409 -0.245571 0.294712 -0.544574 -0.785228 -0.0207949 -0.498104 -0.114993 -0.0227988 -0.99974 0.000329892 --0.063501 -0.458314 0.133285 -0.72782 0.135844 0.672179 -0.0291834 -0.484518 0.129862 0.697313 -0.501152 0.512446 --0.0448244 -0.487927 0.140439 -0.420564 -0.597727 0.682531 --0.0266239 -0.150153 0.0527481 -0.94981 0.310043 0.0416438 -0.132182 0.364881 0.126698 0.407055 0.782328 0.471454 --0.0489061 -0.0848184 0.0829694 -0.462034 -0.859156 0.219946 --0.0627461 -0.0791039 0.0744857 -0.478687 -0.865271 0.148878 -0.214658 0.284159 0.135616 0.719029 0.488858 0.493979 --0.176199 0.215551 0.126391 -0.849166 0.180361 0.496374 -0.251934 0.196024 -0.125806 0.874066 0.12229 -0.470163 --0.165269 0.17865 0.146485 -0.718294 -0.0881697 0.690131 --0.164071 0.16071 0.141121 -0.640901 -0.211423 0.737933 --0.164459 0.140596 0.137066 -0.569124 -0.207036 0.79576 --0.1607 0.122277 0.133683 -0.581463 -0.201926 0.788116 -0.0120339 -0.36546 -0.228634 0.755501 -0.297561 -0.583674 --0.283702 -0.241739 -0.227176 -0.851022 -0.355969 -0.386067 --0.0337572 0.374945 -0.125901 -0.333631 0.865514 -0.373598 -0.204078 0.363833 -0.131378 0.0957861 0.304544 -0.94767 -0.223661 0.386454 -0.122107 0.11899 0.325454 -0.938041 --0.124387 -0.0224076 0.120632 -0.722901 -0.616107 0.312772 --0.043995 -0.0496431 -0.125108 -0.320551 -0.831166 -0.454324 -0.119486 -0.0806352 0.122345 0.559427 -0.537192 0.631241 --0.0372496 -0.064974 0.156311 -0.292322 -0.867687 0.402078 --0.0422406 -0.0706578 0.138458 -0.30331 -0.888446 0.34448 -0.104009 -0.0906749 0.127593 0.479306 -0.279596 0.83192 --0.0122533 -0.0801598 0.135841 -0.273134 -0.860445 0.430154 -0.0566462 -0.272686 -0.127858 0.662403 0.0271841 -0.748655 --0.182843 0.25789 0.0728163 -0.9019 0.367456 0.227049 -0.0421548 -0.102633 0.137197 -0.220519 -0.0972295 0.970525 -0.0289132 -0.117886 0.135651 -0.418733 0.276907 0.864861 --0.0671306 0.0633115 -0.226985 -0.365515 -0.416433 -0.832456 -0.114632 -0.140159 0.132098 0.603352 0.360399 0.711392 --0.172295 0.272104 0.0864205 -0.854199 0.439129 0.278407 --0.0268317 -0.301465 0.136513 -0.588962 -0.149777 0.79416 -0.220793 0.29982 0.0995334 0.741093 0.611536 0.277138 --0.0272719 0.383013 -0.110916 -0.308993 0.892768 -0.327856 -0.251582 0.232451 -0.115619 0.836673 0.0688207 -0.543362 -0.210257 0.30806 0.108009 0.716301 0.631729 0.296364 --0.0556239 -0.474071 0.139128 -0.600054 -0.191252 0.776761 --0.000133423 -0.0625929 -0.125604 -0.170245 -0.868212 -0.466074 -0.0153932 -0.495271 0.130081 0.353416 -0.862977 0.361064 --0.151543 -0.173118 -0.238453 0.128628 0.836618 -0.532471 -0.0626211 0.377285 0.135893 0.0413899 0.845377 0.532565 --0.0677588 0.356156 0.126913 -0.42653 0.769904 0.474679 --0.0039567 -0.244145 -0.22944 0.692215 0.487098 -0.532517 --0.0375699 -0.175934 -0.14259 0.401535 0.909165 -0.110402 -0.199642 -0.0151844 0.139886 0.637556 -0.683816 0.354848 -0.150054 -0.0302328 -0.140839 0.427474 -0.756773 -0.494531 --0.161412 0.247916 0.134021 -0.788971 0.320669 0.524114 --0.181845 0.198333 0.121585 -0.868993 0.100815 0.484446 --0.171047 0.198127 0.138348 -0.799988 0.0795452 0.59472 --0.176284 0.132258 0.123757 -0.71683 -0.180972 0.673353 --0.155799 0.0825307 0.127842 -0.726903 -0.110489 0.677794 -0.290699 0.292357 -0.0850549 0.762478 -0.210418 -0.611843 --0.144574 0.0341498 0.137856 -0.796118 -0.124897 0.592112 --0.0553182 -0.168213 -0.134409 0.368244 0.927074 -0.0702164 -0.0412025 -0.403843 -0.13519 0.911136 0.130883 -0.39077 --0.184895 -0.370169 0.0634895 -0.331708 -0.0621415 0.941333 -0.00690076 -0.0893427 0.131494 -0.325639 -0.680527 0.656386 -0.0877296 -0.10222 0.132935 0.342967 0.0519449 0.93791 --0.128779 -0.497686 -0.147907 0.0171871 -0.999615 0.0217824 -0.122665 -0.156105 0.133162 0.662949 0.339568 0.667227 -0.0336082 0.379283 -0.145156 -0.00365724 0.869253 -0.494354 --0.159022 -0.351354 0.068734 -0.0498678 0.0677766 0.996453 -0.145827 -0.268862 0.121342 0.766564 -0.330134 0.55081 -0.0259334 -0.0459517 -0.162253 -0.0923355 -0.840706 -0.533561 -0.042212 -0.373328 0.110376 0.382251 -0.44866 0.807829 -0.0374095 -0.346174 0.130457 0.222728 -0.564782 0.794616 -0.0191357 -0.424304 0.124996 0.452579 0.55155 0.700689 -0.265886 0.305405 -0.111176 0.58528 -0.124756 -0.801176 --0.0726855 -0.456173 0.11726 -0.733639 0.167114 0.65867 -0.0210424 -0.496861 0.113974 0.33964 -0.922967 0.181043 --0.0140533 -0.49935 0.121883 0.0254248 -0.994188 0.104613 -0.136524 0.274554 0.199517 0.395003 0.248487 0.884436 --0.0103742 0.373627 0.132762 -0.166918 0.840389 0.515639 -0.147214 -0.307793 0.0668742 0.787666 -0.574213 0.223298 --0.126534 -0.46047 -0.233599 -0.110639 -0.517419 -0.84855 -0.319731 0.31419 -0.0162169 0.982114 -0.183664 0.0414732 --0.177856 0.150294 0.127086 -0.754108 -0.118732 0.645929 -0.131029 -0.31998 0.0841898 0.690138 -0.640309 0.337216 --0.0278713 -0.209215 -0.219798 0.570944 0.661715 -0.485959 -0.145107 -0.316459 0.0491865 0.793985 -0.586339 0.160606 -0.134226 -0.330902 0.0463236 0.772816 -0.604549 0.193068 --0.0575322 -0.168533 -0.151941 0.382344 0.920136 -0.0846298 --0.0575118 -0.170244 -0.169299 0.402926 0.904085 -0.142413 --0.158127 -0.0007521 0.0494867 -0.819365 -0.563452 0.105652 -0.0648068 0.314328 -0.21151 0.195834 0.577451 -0.792591 --0.229889 0.179363 -0.161388 -0.512371 -0.118526 -0.850546 -0.107068 0.391209 0.0952875 0.266504 0.886163 0.379065 -0.0238388 -0.10176 0.131233 -0.398823 -0.272274 0.875675 -0.224257 0.143373 -0.173135 0.765912 -0.0464559 -0.641265 -0.118292 -0.12443 0.120883 0.668991 0.271297 0.691989 -0.0900782 0.395356 0.0952483 0.167726 0.912513 0.373079 -0.121133 -0.296287 0.128367 0.577205 -0.548726 0.604759 -0.0968277 0.403977 0.0661015 0.158628 0.951153 0.264848 --0.0381854 -0.316234 0.124509 -0.641121 -0.181818 0.745591 --0.0241568 -0.321037 0.133711 -0.497138 -0.277756 0.822013 --0.0127899 -0.338033 0.132784 -0.337158 -0.396856 0.853715 -0.000716067 -0.352473 0.129242 -0.146182 -0.464268 0.873548 -0.0487814 0.251264 -0.249033 0.138366 0.350933 -0.926121 -0.0124546 -0.367434 0.121549 0.0392972 -0.473491 0.879922 --0.0803897 0.205579 -0.236 -0.427313 0.16218 -0.889439 -0.00193605 -0.410333 0.120962 0.111943 0.516267 0.84908 --0.291355 -0.272694 -0.161876 -0.980222 -0.15227 -0.126408 --0.134657 -0.497871 -0.164478 -0.0033028 -0.999769 -0.0212383 --0.303956 -0.186228 -0.220091 -0.97647 -0.17008 -0.132589 -0.058707 -0.0377505 -0.17496 0.0728354 -0.799407 -0.596358 -0.125534 0.37508 0.114216 0.377034 0.823967 0.422993 -0.140158 0.370465 0.109123 0.463069 0.793899 0.39407 -0.059402 0.406742 0.0676402 0.0214277 0.974543 0.223174 --0.173034 0.113272 0.122059 -0.670089 -0.198909 0.715133 --0.199065 -0.02419 -0.226228 0.567427 0.170758 -0.805523 --0.116023 -0.497266 -0.185768 -0.0165435 -0.995419 -0.0941655 -0.234941 0.0211206 0.128622 0.794221 -0.498779 0.347035 --0.16597 0.0139577 0.0580707 -0.860336 -0.486638 0.151678 --0.0648357 -0.0669988 0.121506 -0.438886 -0.859954 0.260496 --0.0308 -0.0778034 0.127914 -0.291328 -0.897196 0.331916 --0.195503 -0.467051 -0.187677 -0.676242 -0.502042 -0.53912 --0.0138229 -0.496115 -0.184891 -0.00321276 -0.954083 -0.299527 -0.265945 0.05367 0.0838399 0.912061 -0.335981 0.235078 -0.246606 0.20848 0.136441 0.81465 0.192077 0.547222 --0.0333717 -0.19803 0.107734 -0.818315 0.349012 0.456675 -0.148264 -0.205155 0.123733 0.818447 0.18398 0.54433 --0.195214 -0.445472 -0.205032 -0.643491 -0.452886 -0.617101 --0.00542099 0.0447699 -0.236764 -0.195923 -0.483456 -0.853162 --0.0869282 0.299947 -0.19153 -0.45656 0.566807 -0.685772 --0.118439 -0.497763 -0.16387 -0.00077982 -1 0.000593611 -0.0533803 -0.342298 0.127783 0.322191 -0.604736 0.728346 -0.0489931 -0.358208 0.116761 0.368907 -0.550867 0.748634 --0.00154976 -0.380003 0.115689 -0.0919297 -0.246497 0.964774 --0.0114626 0.0281103 -0.22517 -0.21812 -0.534809 -0.816335 -0.0371988 -0.486906 0.113345 0.722217 -0.585118 0.368836 --0.0774314 -0.496885 -0.185205 0.0442833 -0.991911 -0.118962 --0.0762395 -0.485531 0.113315 -0.502578 -0.534135 0.679791 --0.0607848 -0.487869 0.127877 -0.546402 -0.602676 0.581573 -0.0815486 -0.034899 -0.17413 0.175591 -0.785343 -0.593636 -0.196324 0.061695 -0.181987 0.651608 -0.297426 -0.697815 --0.0866142 0.364113 0.0874747 -0.509711 0.804649 0.304526 --0.257353 -0.358999 -0.187826 -0.83 -0.376443 -0.411571 --0.178728 0.230702 0.113829 -0.877065 0.262069 0.402587 -0.0997028 0.0435958 -0.230753 0.270883 -0.421598 -0.865377 -0.262261 0.136124 0.126649 0.903315 0.0631536 0.424303 -0.261083 0.119346 0.130755 0.904761 0.0128456 0.425725 --0.166097 0.0547265 0.112562 -0.827605 -0.229927 0.512058 -0.18155 -0.0388897 0.12064 0.582713 -0.75252 0.306853 --0.107399 -0.0443791 0.103332 -0.60799 -0.767697 0.202459 --0.0194334 -0.0861564 0.118311 -0.437152 -0.77934 0.448919 -0.114364 -0.100232 0.11861 0.65512 -0.0378967 0.754574 --0.00215479 -0.119272 0.111768 -0.751882 0.0205578 0.658977 -0.140422 0.0170296 -0.198211 0.429173 -0.532161 -0.729805 -0.159522 -0.198676 0.101059 0.886038 0.204765 0.415942 -0.0144799 -0.498957 0.0823907 0.0717182 -0.997162 0.0229051 --0.0408007 -0.233811 0.117779 -0.777172 0.244278 0.579942 -0.0870303 0.0551983 -0.239785 0.23382 -0.390299 -0.890503 --0.0427632 -0.336718 0.113845 -0.617859 -0.243658 0.747583 --0.0902424 -0.162035 -0.188465 0.27319 0.931281 -0.241005 --0.00584399 -0.365927 0.12118 -0.185919 -0.421419 0.887604 --0.270489 -0.319646 -0.192826 -0.873087 -0.309748 -0.376531 -0.0156274 -0.387895 -0.208833 0.787 -0.408922 -0.461967 -0.0104382 -0.39462 0.114045 0.166938 0.0928003 0.981591 --0.00657573 -0.395088 0.114171 -0.11025 0.186396 0.976269 --0.151562 0.171476 -0.198736 -0.527086 0.0605741 -0.84765 -0.0642605 -0.440442 0.0698771 0.849744 -0.110707 0.51544 --0.0569268 -0.371245 0.0916837 -0.646068 -0.201166 0.736294 -0.0109286 0.000905074 -0.210784 -0.157394 -0.628469 -0.761744 -0.149996 -0.296266 0.0836479 0.796684 -0.529691 0.29107 -0.13321 0.283619 -0.20487 0.426143 0.463905 -0.776656 -0.185805 0.212982 -0.201087 0.613574 0.234377 -0.754052 --0.0369633 -0.0953348 0.0713093 -0.639647 -0.731829 0.235114 --0.0228077 0.0426866 -0.23098 -0.241788 -0.495225 -0.834441 -0.0835419 0.315029 -0.20572 0.263275 0.577545 -0.77274 --0.127051 -0.46411 0.114406 -0.0764874 -0.17247 0.982041 --0.0866883 0.117573 -0.235353 -0.437699 -0.158564 -0.885029 -0.0452925 -0.474532 0.104954 0.889951 -0.208407 0.405652 --0.241254 -0.439463 -0.112175 -0.872647 -0.472899 -0.121876 --0.0703896 -0.47339 0.125073 -0.771989 -0.0939724 0.628651 -0.243871 0.0134088 0.0902742 0.81206 -0.527263 0.250106 --0.174619 -0.497206 -0.129171 -0.0817719 -0.996596 -0.0104821 -0.161149 0.0972329 -0.22019 0.535542 -0.17801 -0.825534 --0.047615 0.36262 0.132259 -0.339147 0.796686 0.500271 -0.17624 0.340721 0.114317 0.622837 0.692968 0.363138 --0.169154 0.265294 0.104349 -0.837783 0.414931 0.354897 -0.247556 0.253203 0.105979 0.842562 0.393308 0.367963 --0.190125 0.193073 0.105285 -0.915801 0.11542 0.384691 -0.117838 0.0399131 -0.222607 0.333906 -0.424271 -0.841725 -0.265655 0.187365 0.10505 0.927538 0.124867 0.352252 --0.249164 -0.424501 -0.113042 -0.877305 -0.463069 -0.126108 -0.26087 0.0687764 0.117314 0.905284 -0.259523 0.336316 --0.252969 -0.0265998 -0.202403 -0.772105 0.620264 -0.138299 --0.144162 0.318569 0.0789502 -0.724918 0.616908 0.306461 --0.150375 0.318814 0.0631595 -0.747207 0.601999 0.281564 -0.118938 -0.184187 0.149283 0.611256 0.273473 0.742683 --0.096181 0.106878 -0.228241 -0.45883 -0.205913 -0.864335 -0.133749 -0.111277 0.0974993 0.827231 0.0976651 0.553308 -0.13163 -0.129431 0.107792 0.771388 0.269787 0.576347 --0.0177992 -0.169849 0.115372 -0.818025 0.335359 0.467299 -0.143022 -0.176411 0.118238 0.795344 0.288733 0.532974 --0.0377506 -0.188486 0.0900463 -0.829487 0.418683 0.369669 --0.0442861 -0.207683 0.0963252 -0.796451 0.392235 0.460236 -0.156457 -0.255555 0.111153 0.858321 -0.189728 0.476747 --0.0526351 -0.284822 0.11352 -0.736783 0.00611844 0.676102 -0.152277 -0.274557 0.106856 0.814239 -0.379719 0.439122 -0.0721791 -0.336907 0.122475 0.386942 -0.641239 0.662638 -0.178591 0.119373 -0.212206 0.586168 -0.120327 -0.801204 -0.0613542 -0.366448 0.103316 0.491988 -0.509818 0.705715 --0.0833299 0.357524 -0.112211 -0.432485 0.833284 -0.344376 --0.0808019 -0.325788 0.079291 -0.730504 -0.162908 0.663193 --0.101717 0.345646 -0.115878 -0.462775 0.807962 -0.364741 -0.0188875 0.312452 -0.218846 -0.00167721 0.587289 -0.809376 --0.105512 -0.496161 -0.125393 0.0213336 -0.998758 0.0450239 --0.0203327 -0.403973 0.115066 -0.223166 0.450076 0.864655 -0.142739 0.233277 -0.223176 0.455826 0.29748 -0.838885 -0.142427 -0.108817 0.0814554 0.887683 0.0287353 0.459557 --0.0454861 -0.41612 0.110835 -0.531918 0.634034 0.561305 -0.140972 -0.128019 0.0923452 0.851387 0.236103 0.468397 --0.0699309 0.109048 -0.241621 -0.381984 -0.192834 -0.903827 --0.123543 -0.44595 0.114201 -0.0572817 0.237086 0.969799 -0.134075 -0.0799154 0.107569 0.650345 -0.560328 0.512917 --0.14263 -0.449287 0.1116 -0.344604 0.191183 0.919074 -0.157248 -0.0788829 0.0727256 0.738672 -0.574712 0.352235 --0.192474 -0.392424 -0.242393 -0.552825 -0.405925 -0.727743 --0.178571 0.0240698 -0.0166499 -0.808581 -0.588357 -0.00571833 --0.096882 -0.465974 0.112175 0.0959228 -0.139759 0.985528 -0.155095 0.173998 -0.229646 0.490191 0.0758931 -0.868305 --0.204484 -0.0726375 -0.221888 0.935046 -0.270076 -0.229668 --0.110774 -0.478992 0.109167 0.0236628 -0.413449 0.91022 --0.274316 0.15057 -0.0724821 -0.801493 -0.563167 -0.201126 -0.0940489 0.22585 -0.246614 0.312748 0.271296 -0.910268 -0.278379 0.146679 0.0782909 0.965496 0.0654726 0.252052 -0.212293 -0.0347872 0.04086 0.683618 -0.724095 0.0913923 --0.271985 -0.0637647 -0.238931 -0.708706 0.596565 -0.376625 --0.129601 -0.174199 -0.235261 0.12575 0.834136 -0.537033 -0.143161 0.211997 -0.229601 0.45142 0.221678 -0.864337 --0.0153647 0.38977 0.0993741 -0.21336 0.910033 0.355412 --0.0629766 0.366267 0.113627 -0.402872 0.813648 0.41913 --0.119959 -0.496141 -0.113543 0.0381273 -0.998527 0.0385916 -0.0849253 0.0335318 -0.229672 0.212074 -0.459075 -0.862713 --0.123835 -0.496996 -0.131256 0.0277621 -0.998951 0.0364112 --0.101237 -0.444038 -0.243403 0.0707718 -0.532314 -0.843584 --0.170598 0.248842 0.117351 -0.840338 0.339351 0.422698 -0.141235 0.13833 -0.237288 0.451578 -0.0500737 -0.890825 -0.209226 0.316978 0.0896798 0.720265 0.644878 0.255637 --0.229283 -0.346083 -0.236054 -0.656934 -0.367697 -0.658207 -0.196801 0.333093 0.0831278 0.715292 0.651408 0.253031 -0.18364 0.292737 0.163876 0.580881 0.469485 0.664952 --0.187963 0.142174 0.109923 -0.84902 -0.0951566 0.519722 -0.19793 0.323827 0.10298 0.706142 0.648124 0.28513 -0.10342 0.113409 -0.251748 0.336239 -0.130491 -0.932693 --0.180755 0.0852372 0.10335 -0.81977 -0.239402 0.520255 -0.268831 0.0799812 0.101444 0.940945 -0.191126 0.279451 -0.017924 -0.304189 0.156422 -0.180383 -0.360294 0.915232 --0.236385 0.0987634 -0.0671557 -0.781418 -0.608392 -0.138726 -0.223535 -0.0109275 0.0955027 0.716671 -0.652588 0.245989 --0.0486453 -0.0747307 0.120606 -0.348077 -0.897579 0.270545 -0.125919 -0.0939693 0.10802 0.74909 -0.182853 0.636733 --0.122589 -0.443867 -0.243717 -0.0822579 -0.509794 -0.856355 -0.0808244 0.215239 -0.253894 0.26081 0.225732 -0.938628 --0.00704127 -0.136498 0.1102 -0.819815 0.277632 0.500824 --0.0377037 -0.216926 0.113347 -0.794979 0.310019 0.521437 --0.0408749 0.157793 -0.255976 -0.279279 0.0173445 -0.960053 -0.0320274 0.12138 -0.265612 -0.00818586 -0.130473 -0.991418 -0.0898124 -0.327012 0.121706 0.427043 -0.659368 0.618764 -0.0669138 -0.352282 0.110878 0.440708 -0.601195 0.666589 -0.0375929 -0.389575 0.105472 0.439463 -0.201859 0.875286 -0.228375 0.411716 -0.111233 0.0571069 0.44186 -0.895264 -0.0360196 -0.428602 0.112883 0.692795 0.324753 0.643871 -0.0481816 -0.440015 0.0998902 0.861989 0.104289 0.496084 --0.0918773 -0.435472 0.107447 0.0642312 0.454585 0.888385 --0.241995 -0.271336 -0.261619 -0.594399 -0.330946 -0.732915 --0.130673 -0.433649 0.106926 -0.183534 0.612663 0.768739 --0.0726276 -0.438542 0.108226 -0.399786 0.477234 0.782572 --0.160681 -0.447139 0.0991284 -0.627603 0.289033 0.722893 --0.107296 -0.404285 -0.267578 -0.011679 -0.463592 -0.885972 -0.00246408 0.164615 -0.265482 -0.139999 0.0180279 -0.989988 --0.0727165 -0.454458 -0.230336 0.29 -0.523665 -0.801046 -0.232195 0.00193365 0.101186 0.766916 -0.583446 0.267266 --0.0859635 -0.451041 0.110394 -0.0317353 0.126734 0.991429 --0.154504 -0.464863 0.105571 -0.525299 -0.180927 0.83146 --0.0659043 -0.354243 0.0878885 -0.696714 -0.191144 0.691414 --0.0867421 -0.292197 0.0789387 -0.6693 -0.0178694 0.742778 --0.291837 -0.154546 -0.265204 -0.820461 -0.0581672 -0.568736 --0.0498706 -0.225213 0.0998735 -0.779796 0.33448 0.529189 -0.262309 0.40651 -0.10516 0.392888 0.3006 -0.869068 --0.0950927 -0.483205 0.107529 -0.115002 -0.42593 0.897417 --0.0738009 -0.248819 -0.280268 0.281115 0.38904 -0.877281 --0.164935 0.0380426 0.104254 -0.866192 -0.3315 0.373925 --0.0806391 -0.469883 0.109808 -0.410595 -0.0440715 0.910752 --0.0451439 -0.497892 0.121909 -0.22755 -0.941177 0.249814 --0.121896 -0.360388 -0.283914 -0.126352 -0.290249 -0.948573 -0.270487 0.100124 0.106009 0.946938 -0.0787888 0.311611 --0.0533164 0.383416 0.0825887 -0.36929 0.887853 0.274485 -0.157759 0.361714 0.102414 0.556011 0.74907 0.360202 --0.099866 0.35205 0.0944112 -0.557223 0.757176 0.340863 --0.104099 -0.258516 -0.290469 0.103747 0.257055 -0.960812 -0.243117 0.274457 0.0878807 0.810437 0.507826 0.292069 --0.178938 0.245114 0.101329 -0.884342 0.324182 0.335925 --0.136444 -0.276345 -0.294002 -0.0750425 0.0601806 -0.995363 --0.19569 0.152584 0.0969672 -0.914092 -0.0259097 0.404679 --0.0515072 -0.0600031 0.154985 -0.374054 -0.832322 0.409052 --0.193507 0.326583 -0.105847 0.123471 0.830545 -0.543093 --0.06356 -0.257179 0.096416 -0.742503 0.186762 0.64328 -0.20382 0.461757 -0.0551036 -0.47434 0.791374 -0.385654 -0.135539 -0.263709 0.136894 0.69741 -0.286134 0.657075 --0.0348819 -0.0819308 0.110811 -0.387094 -0.86674 0.314516 --0.0169978 -0.145835 0.0968083 -0.888034 0.29465 0.352954 -0.19291 0.0768084 -0.190673 0.642183 -0.249769 -0.724718 -0.161629 -0.265317 0.0945524 0.887769 -0.292739 0.355204 --0.0232271 -0.386848 0.109585 -0.322977 0.0122842 0.946327 --0.0360761 -0.398251 0.105075 -0.511835 0.291746 0.808028 -0.182182 0.15113 0.184805 0.402076 0.233017 0.885459 -0.109964 0.17472 -0.250686 0.349913 0.0782076 -0.933512 -0.268178 0.141901 0.111553 0.931292 0.0699101 0.357501 -0.199815 0.111038 -0.193451 0.6657 -0.149311 -0.731129 -0.151406 0.384762 0.0590187 0.522174 0.740877 0.422416 -0.0233478 -0.358072 -0.215983 0.844651 -0.238305 -0.479349 -0.044716 -0.488843 0.0933642 0.704441 -0.638843 0.30926 -0.0710958 -0.243948 -0.109375 0.598284 0.278068 -0.751488 --0.0594325 -0.496756 0.111374 -0.288416 -0.925842 0.244197 --0.246558 0.108194 -0.160318 -0.895651 0.427442 -0.122888 --0.05033 0.377611 0.100971 -0.348754 0.863017 0.365477 -0.174979 0.351105 0.0945819 0.636785 0.704669 0.312964 --0.142343 0.186606 -0.203042 -0.535223 0.115289 -0.836806 --0.123348 -0.184715 -0.248306 0.148723 0.749011 -0.64565 -0.216309 0.00554854 -0.111533 0.69683 -0.588353 -0.410206 --0.255002 -0.323636 -0.218625 -0.779133 -0.338374 -0.527688 -0.137967 -0.0924972 0.0922865 0.808182 -0.257455 0.529678 --0.0080889 -0.10219 0.110205 -0.630644 -0.45665 0.627502 --0.120943 0.348988 0.0594337 -0.608633 0.757524 0.236057 --0.0125259 -0.127675 0.0963596 -0.894092 0.0678027 0.442721 -0.018025 -0.328089 -0.233159 0.819433 -0.0544687 -0.570581 -0.0820434 -0.344314 0.108133 0.463018 -0.651874 0.600563 -0.120861 -0.0358689 0.1984 0.395966 -0.765782 0.506744 --0.0998456 -0.424016 0.0982713 -0.080251 0.652668 0.753382 --0.274998 0.321655 -0.103523 -0.353187 0.551748 -0.755535 -0.00733037 -0.497871 -0.130132 -0.0280203 -0.999576 0.0079791 -0.257069 0.0513045 -0.084505 0.877036 -0.361034 -0.316959 --0.0728958 -0.495132 0.100737 -0.190542 -0.940823 0.280261 --0.12751 -0.494724 0.0906434 -0.112415 -0.933712 0.339919 -0.120151 0.392477 0.0815206 0.337037 0.873549 0.351167 --0.0924473 -0.496855 0.0372666 0.00682905 -0.999444 -0.032623 --0.140975 -0.182612 -0.249544 0.134143 0.764896 -0.630032 --0.0798383 -0.0613824 0.112259 -0.50211 -0.832217 0.235161 -0.262711 0.204132 0.106252 0.91474 0.165154 0.368749 --0.0802751 -0.0657235 0.0930578 -0.499503 -0.846767 0.182979 --0.174713 0.0528873 0.0940299 -0.873829 -0.323963 0.362589 --0.163686 0.0240784 0.0907726 -0.871505 -0.413251 0.264014 -0.185861 -0.0425184 0.102612 0.595632 -0.753698 0.27778 -0.285135 0.110866 -0.00779144 0.994038 -0.0884484 -0.0637562 -0.159581 -0.0622871 0.101297 0.566782 -0.754858 0.330072 -0.0177537 0.411532 0.0176725 -0.116451 0.990905 0.0674247 -0.162554 -0.187348 0.086541 0.914134 0.252863 0.31689 --0.225509 -0.30515 -0.259295 -0.562653 -0.318608 -0.762831 -0.167158 0.294485 0.175171 0.507973 0.44833 0.735502 --0.0642633 -0.293395 0.100474 -0.726939 -0.0192833 0.686431 --0.0510902 -0.321408 0.111109 -0.688758 -0.153861 0.708476 --0.0742657 -0.0582879 0.131982 -0.481029 -0.818027 0.315347 -0.177516 0.233793 -0.200147 0.585808 0.295721 -0.754571 --0.214392 0.226555 -0.16654 -0.280402 0.177908 -0.943252 -0.170221 0.220008 -0.210812 0.557992 0.258682 -0.788497 --0.089274 -0.409048 0.0904926 -0.0369251 0.637758 0.769352 -0.018159 -0.308974 -0.232296 0.834174 0.0890013 -0.544272 --0.118865 -0.420738 0.094082 -0.0896291 0.744328 0.661772 --0.198423 0.115667 0.081209 -0.928601 -0.158477 0.335538 -0.261776 0.221911 0.0989799 0.902981 0.226561 0.365097 --0.0821643 -0.496985 0.0504199 -0.0137175 -0.999841 -0.0114024 --0.169477 -0.461572 0.0931349 -0.764673 -0.0848733 0.638805 --0.144142 -0.484139 0.100938 -0.339619 -0.635269 0.693609 --0.151833 -0.495308 0.0684129 -0.219744 -0.967633 0.12409 --0.0580745 0.18708 -0.248309 -0.347728 0.102229 -0.932006 -0.0658371 0.402896 0.081973 0.050249 0.95366 0.296659 --0.0908749 -0.494303 0.0979953 -0.114776 -0.901143 0.418053 -0.160533 -0.291112 0.000812704 0.906328 -0.384337 -0.175654 -0.186861 0.338034 0.0979974 0.686966 0.66663 0.289278 -0.253468 0.255705 0.0885048 0.844272 0.421632 0.330804 --0.225373 0.0367814 -0.163324 -0.964635 -0.249399 -0.0853163 --0.0407199 -0.498856 0.0802992 -0.0350321 -0.999236 -0.0173353 -0.0305137 -0.351166 -0.203541 0.920369 -0.161155 -0.356301 -0.267081 0.0672401 -0.0718326 0.919197 -0.283446 -0.273379 -0.25898 0.0428741 0.0930772 0.881976 -0.393273 0.259719 --0.11096 -0.0477881 0.0724989 -0.623099 -0.774354 0.110102 --0.0706391 0.159029 -0.245519 -0.383035 0.0300334 -0.923246 -0.175259 -0.0544626 0.0922871 0.584573 -0.76201 0.278595 -0.159856 0.240282 -0.210136 0.518733 0.319092 -0.793156 -0.121927 -0.024992 0.21234 0.407999 -0.691255 0.596409 --0.0366048 0.131814 0.253152 -0.80028 0.329576 0.50093 -0.159718 -0.171857 0.0815978 0.914819 0.280152 0.290897 --0.0256457 -0.156881 0.0815278 -0.903511 0.357854 0.235813 -0.0180815 -0.373751 -0.215463 0.801485 -0.330613 -0.498313 -0.166854 -0.204924 0.0865302 0.93275 0.172686 0.316474 --0.0545113 -0.242079 0.102643 -0.768901 0.247048 0.58971 -0.171713 -0.240588 0.0775268 0.961935 -0.0661925 0.265141 -0.165615 -0.272678 0.0745739 0.901283 -0.361263 0.239119 --0.0773283 -0.26531 0.0842822 -0.690142 0.170456 0.703313 --0.034784 0.257965 0.218962 -0.256063 0.276696 0.926213 --0.172274 0.0204634 -0.0759839 -0.708774 -0.702368 -0.0657183 -0.0956277 -0.335562 0.107334 0.49689 -0.675045 0.545358 -0.0485123 -0.40305 0.0955735 0.63787 -0.11869 0.760943 -0.0468956 -0.42321 0.0974396 0.764107 0.0784139 0.640306 -0.0567576 -0.432965 0.0836685 0.843304 -0.0444322 0.535598 --0.133447 -0.0245796 0.086224 -0.731279 -0.661256 0.167247 -0.235842 -0.00126703 0.0821622 0.767427 -0.60231 0.219723 --0.0222045 -0.0943109 0.10097 -0.623812 -0.647704 0.437423 -0.00540314 -0.498915 0.0512017 0.00349168 -0.999786 -0.0203725 --0.0720449 -0.496446 -0.105112 -0.000474417 -0.999996 -0.00269795 -0.225871 0.021751 -0.116327 0.738904 -0.5223 -0.425703 -0.0458448 -0.435608 -0.156527 0.753492 0.461376 -0.468383 -0.0529552 0.398909 0.093505 0.00645408 0.931706 0.363155 --0.0758015 0.0298932 -0.201823 -0.371363 -0.551566 -0.746903 --0.0897018 0.368839 0.0675558 -0.503768 0.832795 0.2295 --0.137731 0.316806 0.0965774 -0.702242 0.618225 0.353064 --0.103816 -0.151931 -0.0869337 0.141163 0.978218 0.152193 -0.268433 0.203539 0.0912547 0.931444 0.145379 0.333582 --0.199962 0.166097 0.0850174 -0.952696 0.0451314 0.300557 --0.19697 0.133887 0.091637 -0.914913 -0.0942209 0.3925 -0.246547 0.00953277 0.071426 0.811219 -0.551228 0.19512 --0.0143907 -0.225348 -0.22332 0.637624 0.579994 -0.506994 --0.0123695 -0.497386 -0.138357 -0.0303753 -0.999362 0.0187844 -0.00992574 -0.438349 -0.196122 0.471196 0.248712 -0.846237 -0.148275 -0.141361 0.085856 0.888839 0.265345 0.373574 -0.169741 -0.257391 0.0767145 0.944789 -0.20528 0.255409 --0.0775058 -0.283898 0.0866823 -0.68831 0.0437101 0.724099 -0.27858 0.0739919 0.0474824 0.969027 -0.227099 0.0970168 -0.0698772 -0.374977 0.0901248 0.591616 -0.452654 0.667154 -0.0619328 -0.393788 0.0865704 0.651082 -0.288015 0.702239 -0.229713 0.285628 0.10442 0.781444 0.540237 0.312233 --0.139647 -0.266059 0.0530903 -0.00804302 0.338912 0.940784 --0.0710909 -0.0366709 0.175966 -0.493085 -0.713163 0.498263 --0.0982194 0.344299 0.112622 -0.554476 0.726944 0.405103 --0.117256 0.344866 0.0800273 -0.612065 0.730559 0.302754 --0.0102368 -0.499731 0.101016 0.0127946 -0.999905 0.00511768 -0.123179 0.259235 -0.22262 0.393334 0.380514 -0.836957 -0.214333 -0.0136351 -0.0809335 0.689957 -0.658422 -0.300732 --0.0549585 0.386989 0.0652124 -0.379199 0.905223 0.191778 --0.176431 -0.496119 -0.0582907 -0.0714656 -0.997089 0.0265587 --0.162441 0.284846 0.0936319 -0.806508 0.497464 0.31949 -0.144782 0.286844 0.191587 0.413296 0.332088 0.847882 -0.150782 0.267271 0.194541 0.406413 0.204229 0.890572 -0.277413 0.179747 0.0709666 0.963769 0.0836739 0.253276 -0.187118 -0.0271245 -0.104241 0.573679 -0.728254 -0.374886 -0.280044 0.100521 0.0697344 0.974315 -0.103852 0.199814 -0.0261631 -0.371608 -0.201062 0.87743 -0.291395 -0.381058 --0.171321 0.0289471 0.0698964 -0.879614 -0.431192 0.200882 -0.14863 -0.123548 0.0740371 0.927575 0.162708 0.336348 --0.0630703 -0.22975 0.0844098 -0.730565 0.371887 0.57269 --0.0700925 -0.246107 0.0849911 -0.710552 0.281927 0.644697 --0.0600819 0.319508 -0.190258 -0.37078 0.651556 -0.661813 -0.132626 0.104944 -0.237943 0.433927 -0.151442 -0.888128 -0.108226 -0.33513 0.0943175 0.579528 -0.671781 0.461366 -0.0950389 -0.358212 0.079263 0.633843 -0.589431 0.500813 --0.111939 -0.432594 0.107429 0.00806308 0.596067 0.802894 -0.0839997 -0.371178 0.0789932 0.65213 -0.488165 0.580018 -0.076262 -0.388111 0.0758336 0.685291 -0.369026 0.62785 --0.181521 0.0120629 -0.12211 -0.267785 -0.653473 0.708 --0.0492565 -0.0100227 0.224906 -0.449501 -0.616354 0.646573 --0.0507053 -0.407961 0.0971252 -0.591819 0.438882 0.676116 --0.0566574 0.113661 -0.247493 -0.330629 -0.166268 -0.928999 -0.058771 -0.415368 0.0839389 0.751153 -0.137107 0.645733 --0.0601367 -0.399127 0.083391 -0.49487 0.275998 0.823971 -0.132442 -0.308504 0.100455 0.675617 -0.607763 0.417332 --0.131841 -0.411807 0.0798579 -0.162192 0.602975 0.781099 --0.176679 -0.448963 0.0813044 -0.831899 0.193967 0.519923 --0.217829 0.126603 0.0271331 -0.728247 0.129045 0.673056 -0.0271015 -0.497275 -0.16142 0.127132 -0.983156 -0.13131 --0.0229869 -0.163316 0.0984655 -0.868195 0.356389 0.345289 --0.1007 -0.473706 -0.225317 0.100693 -0.563579 -0.819902 --0.0565894 0.132484 -0.250122 -0.329273 -0.0896103 -0.939973 -0.00639151 -0.499168 0.0972138 0.0694095 -0.997366 0.0210343 --0.0778197 -0.496907 0.0835666 -0.0575625 -0.995874 0.0701525 -0.0995373 0.304483 -0.207153 0.316688 0.540611 -0.77939 -0.0991042 0.319272 -0.196296 0.312324 0.593137 -0.742052 --0.197752 0.20109 0.0780057 -0.956252 0.175442 0.234098 --0.190608 0.0975277 0.0913764 -0.88513 -0.217235 0.411525 -0.0871815 -0.454594 -0.125958 0.310105 0.248761 -0.91758 --0.125452 -0.0356431 0.0701995 -0.679411 -0.725879 0.107242 -0.176187 -0.0376852 -0.0984067 0.522778 -0.774582 -0.355985 -0.16907 -0.0707517 0.0616569 0.712494 -0.663591 0.228032 --0.0253433 -0.102888 0.08331 -0.777066 -0.520982 0.353195 --0.0203822 -0.119609 0.0796063 -0.924892 -0.188138 0.330423 --0.102724 -0.496705 0.020341 0.0503183 -0.997277 -0.0539141 --0.0323364 -0.17233 0.0834096 -0.860936 0.422174 0.283829 --0.0565727 -0.212824 0.08069 -0.749005 0.447149 0.488927 -0.213773 -0.0233323 0.087806 0.67432 -0.704416 0.221566 --0.103507 -0.171127 -0.221645 0.216723 0.863019 -0.456321 --0.0642147 -0.336459 -0.286182 0.262037 -0.174549 -0.949141 --0.116873 -0.403894 0.0762708 -0.101462 0.530926 0.841322 --0.0332238 -0.414398 -0.239297 0.483242 -0.512016 -0.710153 --0.175977 -0.171757 -0.243269 0.260791 0.825038 -0.5013 -0.174912 -0.0282281 -0.118464 0.528114 -0.737032 -0.421757 --0.142855 -0.00909878 0.0980027 -0.794435 -0.557834 0.240196 -0.0566499 -0.233299 -0.116512 0.579412 0.400335 -0.709939 -0.0528842 -0.472585 0.088449 0.901484 -0.210997 0.377898 --0.168499 -0.486618 0.07477 -0.630817 -0.710746 0.311303 --0.0542706 0.338341 -0.172694 -0.372171 0.732747 -0.569711 -0.246623 0.034266 0.118266 0.842587 -0.433977 0.318923 -0.207706 0.324898 0.0728297 0.725949 0.64603 0.235889 -0.232204 0.291438 0.085862 0.769015 0.583597 0.260825 --0.185582 0.178863 0.11734 -0.868999 0.0189225 0.494452 -0.279293 0.130854 0.0773685 0.970462 0.0177315 0.240601 --0.202103 0.146938 0.0785469 -0.959021 -0.0221745 0.282467 -0.274968 0.0833887 0.0808968 0.958245 -0.179991 0.222195 -0.216325 -0.0262881 0.068989 0.681842 -0.712591 0.165244 --0.238094 -0.307206 -0.247739 -0.644434 -0.336414 -0.686681 --0.196684 0.186874 0.0898298 -0.94513 0.115762 0.305497 --0.0238388 -0.499533 0.0905143 -0.0203352 -0.999686 -0.0146472 --0.0232783 -0.129157 0.0619551 -0.988178 -0.0429866 0.147162 -0.169121 -0.195524 0.0718763 0.948707 0.225499 0.221596 --0.0424991 -0.183407 0.0706783 -0.80115 0.511706 0.310348 -0.22835 0.196829 -0.162601 0.779388 0.15027 -0.608254 -0.201611 0.311129 0.12145 0.694533 0.622701 0.360372 -0.119713 -0.322254 0.0987958 0.609116 -0.663197 0.434911 -0.0343431 0.386403 0.120349 -0.0406326 0.881441 0.470543 --0.142192 -0.496459 0.0514227 -0.0671773 -0.997663 0.0124943 --0.027708 -0.499591 0.110933 -0.0342811 -0.999012 0.0282716 --0.147483 -0.384268 0.0708817 -0.0675397 0.103188 0.992366 --0.0360255 -0.0274844 -0.164124 -0.304954 -0.751725 -0.584734 --0.0990015 -0.396393 0.0763902 -0.146973 0.541393 0.827824 --0.11364 -0.384512 0.0688066 -0.00968647 0.270371 0.962708 --0.292012 -0.251558 -0.104836 -0.980857 0.17534 0.084704 -0.0262074 -0.497192 0.0980562 0.294301 -0.946301 0.133795 -0.27448 0.199509 0.074645 0.948432 0.0993364 0.301014 --0.162728 -0.421027 0.0736755 -0.494868 0.386418 0.778323 --0.0431326 -0.273595 0.123422 -0.730524 0.0339673 0.682042 --0.305859 0.193524 -0.034963 -0.915688 -0.379653 0.131831 --0.0829206 -0.343172 -0.288537 0.134449 -0.22122 -0.965912 --0.132237 -0.49681 0.0718356 -0.0595903 -0.995545 0.0730692 --0.260709 -0.346175 -0.192303 -0.837003 -0.35524 -0.416211 --0.021701 0.394024 0.0820623 -0.240625 0.931642 0.272291 --0.0142014 0.399392 0.0681191 -0.220299 0.951475 0.214857 -0.148344 0.379239 0.0766511 0.514511 0.791285 0.330373 -0.0518872 0.413143 0.0231734 -0.0194462 0.996733 0.0783964 -0.253698 0.266065 0.0722118 0.798255 0.499565 0.336487 -0.28279 0.121001 0.061712 0.982845 -0.0256861 0.182634 -0.0665553 0.413542 0.0181106 0.0180019 0.997481 0.0686054 -0.140148 -0.145406 0.104159 0.813793 0.303258 0.495758 --0.183814 0.0604011 0.07702 -0.893682 -0.350965 0.279563 --0.00741194 0.224062 -0.256698 -0.15486 0.213102 -0.964679 --0.023753 -0.18771 0.117413 -0.809174 0.324349 0.489934 --0.146527 -0.0101035 0.0808756 -0.796312 -0.581024 0.168223 --0.231383 -0.40174 -0.194125 -0.758864 -0.436911 -0.482943 --0.0246924 -0.499012 0.0713185 -0.0201114 -0.999438 -0.0268011 --0.0339526 -0.166576 0.0642977 -0.860504 0.481448 0.166555 --0.0323884 0.240243 0.224019 -0.247022 0.190901 0.950019 -0.173117 -0.210654 0.0669211 0.969942 0.146115 0.194586 --0.0688581 -0.216678 0.0671928 -0.675933 0.494752 0.546201 --0.0778366 -0.234253 0.0704583 -0.652277 0.399499 0.644155 --0.0859167 -0.253552 0.0727462 -0.632381 0.275284 0.724095 --0.0910508 -0.273519 0.0736057 -0.641717 0.107972 0.759303 -0.158378 -0.289356 0.0708154 0.847365 -0.482756 0.221177 --0.20048 0.16189 -0.174164 -0.428541 -0.0200059 -0.903301 -0.12277 -0.338429 0.0622126 0.725232 -0.624216 0.290504 --0.121648 -0.315571 0.064099 0.0428523 0.133485 0.990124 --0.151133 -0.335241 0.0667097 0.0370357 0.121983 0.991841 --0.166632 -0.322398 0.0650484 -0.052972 0.134093 0.989552 --0.180546 -0.351887 0.0653097 -0.248306 0.0157999 0.968553 -0.109181 -0.345238 0.0778342 0.64637 -0.645765 0.406441 --0.0138063 -0.18001 -0.103105 0.26093 0.947325 -0.185716 -0.116798 0.0882365 -0.241526 0.368146 -0.230102 -0.900845 -0.0835879 -0.276816 -0.105572 0.649187 0.013008 -0.760518 --0.197029 -0.354081 0.0595089 -0.377715 -0.0383993 0.925125 --0.0433428 -0.493565 -0.191555 0.0328433 -0.834976 -0.549305 --0.081447 -0.346342 0.0724656 -0.63191 -0.148084 0.760763 --0.168699 -0.38214 0.0675342 -0.240556 -0.0211616 0.970405 --0.293196 0.249794 -0.0222389 -0.00595191 0.0803417 0.99675 -0.174438 -0.0361475 0.139586 0.56037 -0.746659 0.35845 --0.162695 -0.398716 0.0693994 -0.304446 0.0902751 0.948242 --0.00708132 -0.497785 0.0217931 -0.0321553 -0.995597 -0.0880473 --0.178108 -0.436397 0.0690151 -0.745095 0.27773 0.606382 --0.168498 0.0739741 0.115715 -0.750706 -0.174794 0.637093 -0.255375 0.238955 0.101957 0.871414 0.323375 0.368873 -0.0556728 -0.452538 0.0848854 0.898615 -0.0423748 0.436687 --0.266033 0.275597 -0.132147 -0.489339 0.282089 -0.825211 --0.0464231 0.0324678 -0.216613 -0.298818 -0.538693 -0.787729 --0.10335 -0.446324 0.11399 0.111756 0.186998 0.975983 -0.216428 0.294611 0.119981 0.73346 0.571227 0.368422 -0.105871 -0.299167 0.138099 0.454881 -0.564232 0.689003 --0.287667 -0.276181 -0.17929 -0.954471 -0.218409 -0.203182 --0.125412 0.32171 0.110442 -0.6555 0.646572 0.390211 -0.220261 0.127015 -0.175725 0.749339 -0.103187 -0.654098 -0.0513381 0.38606 0.121476 0.00754139 0.879547 0.475753 --0.0694078 0.0818021 -0.23373 -0.381657 -0.31904 -0.867497 -0.00261415 -0.499137 0.115304 0.0838525 -0.992783 0.0857309 --0.0877437 0.0887112 -0.227522 -0.430198 -0.288544 -0.855378 -0.0615122 -0.00260378 0.250316 0.16982 -0.328268 0.929194 --0.0251007 -0.148391 0.0676357 -0.946721 0.285135 0.149725 --0.0572157 -0.198093 0.0630524 -0.711561 0.569012 0.412196 --0.0961519 0.168276 -0.233119 -0.465282 0.0524068 -0.88361 --0.15082 -0.318203 0.0642408 0.0474249 0.158876 0.986159 -0.00240618 0.076759 -0.252868 -0.13561 -0.326937 -0.935266 -0.0384601 0.188224 -0.265209 0.0548255 0.115912 -0.991745 --0.185083 -0.320665 0.0624699 -0.210284 0.105869 0.971891 --0.171313 0.155711 -0.18782 -0.461011 -0.00525394 -0.887379 --0.0154419 -0.495593 0.142263 -0.00539853 -0.861931 0.506997 --0.113386 -0.331379 0.064828 0.0124478 0.0724438 0.997295 --0.250386 0.131565 -0.108858 -0.812186 -0.519966 -0.264553 -0.1593 -0.152021 0.0556534 0.954917 0.275707 0.110092 -0.145808 0.33248 -0.161462 0.377527 0.582189 -0.72009 --0.110052 -0.366944 0.0666684 0.0821238 0.132792 0.987736 --0.102938 -0.347306 0.0641908 -0.0717196 -0.0130724 0.997339 --0.147745 0.00565275 0.110081 -0.82792 -0.456859 0.325313 --0.0908065 -0.362922 0.0628198 -0.260871 0.0413035 0.96449 --0.0932881 0.189452 -0.232334 -0.45365 0.12519 -0.882343 -0.0979683 -0.0666031 -0.112823 0.233407 -0.867128 -0.440012 --0.0962866 -0.311024 -0.294916 0.0702199 -0.0647252 -0.995429 -0.230243 0.00694942 0.116826 0.766675 -0.563937 0.306896 --0.0941258 0.212329 0.199393 -0.507256 -0.0266787 0.861382 -0.245205 0.161888 0.149791 0.74979 0.130669 0.648646 -0.117899 0.107718 -0.245194 0.384828 -0.145113 -0.911509 --0.175594 0.185591 -0.184553 -0.401971 0.085691 -0.911634 --0.0497914 -0.496358 -0.132246 -0.0076379 -0.999724 0.0222294 --0.108593 0.176758 -0.22554 -0.500018 0.0812455 -0.862196 -0.0286238 0.174554 -0.266703 0.00443745 0.0680128 -0.997675 -0.00936686 -0.499244 0.0674296 0.0261414 -0.999623 -0.00842851 -0.256652 0.0225358 0.0632131 0.858698 -0.485589 0.163834 --0.228662 0.181675 -0.00674231 -0.314523 0.37886 0.870368 --0.0379448 -0.195774 -0.211229 0.531 0.733552 -0.424193 -0.0185221 -0.498134 -0.00484222 -0.159526 -0.984829 -0.0682885 --0.193462 0.229972 0.067105 -0.947764 0.262897 0.180633 -0.279493 0.195374 0.0577585 0.969744 0.0425726 0.240382 -0.27048 0.0543893 0.0657234 0.929332 -0.322699 0.179465 -0.161894 0.344752 0.128573 0.551834 0.710115 0.437282 --0.177117 -0.139883 -0.139294 -0.173121 0.982775 -0.064664 -0.179603 -0.0577503 0.0721974 0.632805 -0.741017 0.224613 --0.0693802 -0.0773184 0.0593165 -0.506693 -0.85847 0.0793133 --0.0505108 -0.0878642 0.0626848 -0.527081 -0.839494 0.132045 --0.157343 0.212781 -0.188477 -0.467942 0.215133 -0.857174 --0.0814495 -0.39737 0.0777716 -0.0918619 0.479461 0.872742 -0.0316154 -0.4554 0.131164 0.770003 0.133455 0.623927 -0.194499 0.000492389 -0.136458 0.614958 -0.620089 -0.48715 -0.166842 -0.18153 0.0644075 0.946114 0.27162 0.176327 --0.0837858 -0.222396 0.0560195 -0.55798 0.526905 0.641116 --0.000838205 0.0590895 -0.245196 -0.166067 -0.411648 -0.896085 --0.0933636 -0.241306 0.0608869 -0.557703 0.387493 0.734041 -0.138576 -0.28604 0.118113 0.703374 -0.476529 0.527433 --0.140515 -0.285835 0.0578326 -0.0250511 0.214048 0.976502 --0.153814 0.00633526 0.0926834 -0.842437 -0.481337 0.242103 --0.154145 -0.298886 0.0608261 0.0219261 0.199424 0.979668 -0.21034 0.0102701 -0.127117 0.677905 -0.574758 -0.458365 --0.172503 -0.306873 0.0623211 -0.0807516 0.171738 0.981828 -0.191009 -0.0130494 0.157931 0.614265 -0.674716 0.40919 -0.274464 0.117284 0.0954263 0.958612 -0.0208943 0.283949 --0.130771 -0.370556 0.06842 0.0691166 0.112708 0.991221 --0.195069 0.342052 -0.0741485 0.192312 0.946622 -0.258693 -0.16611 0.271543 -0.190967 0.528643 0.409529 -0.74352 --0.0912497 -0.328818 0.0657544 -0.487462 -0.0476269 0.871844 --0.208396 -0.33738 0.0552641 -0.414271 -0.00870353 0.910112 -0.251678 0.108135 -0.127468 0.860038 -0.1208 -0.495724 -0.0988463 -0.368332 0.0632079 0.71999 -0.490423 0.491019 --0.189411 -0.385712 0.0599461 -0.412714 -0.119395 0.903002 --0.180132 -0.399013 0.0626596 -0.427937 -0.050201 0.902413 -0.0185136 0.242827 -0.254205 -0.0229411 0.303882 -0.952433 --0.179703 -0.476355 0.0613296 -0.828716 -0.493116 0.264702 -0.0445939 0.408104 0.0609389 -0.0267953 0.980551 0.194428 -0.0958909 -0.483935 0.0149691 0.550666 -0.574335 0.605728 --0.0302803 0.380751 0.110508 -0.276196 0.872035 0.404067 -0.129528 0.394454 -0.100413 -0.0958983 0.860799 -0.499828 -0.165906 0.37113 0.0657319 0.605653 0.732455 0.310958 -0.221498 0.312892 0.0624982 0.7324 0.640491 0.230999 --0.103186 0.317889 -0.161871 -0.484259 0.674242 -0.557577 -0.0154419 0.409793 -0.0428356 -0.123086 0.982224 -0.141723 -0.0301468 -0.0704789 0.170189 -0.0311723 -0.911978 0.409054 --0.208911 0.158448 0.0461209 -0.986061 0.0525471 0.157866 --0.208609 0.126129 0.0470482 -0.952011 -0.0376778 0.303737 --0.15788 0.103267 0.130212 -0.663042 -0.156819 0.731972 -0.258731 0.0985194 0.13472 0.902849 -0.0641811 0.42514 --0.0566211 -0.0855938 0.0465232 -0.536719 -0.842745 0.0414076 --0.0262953 -0.120855 0.0326388 -0.960091 -0.279394 -0.0128165 -0.177588 -0.233631 0.0466775 0.998583 -0.0181884 0.0500199 --0.101212 -0.259814 0.0631259 -0.580319 0.218629 0.784494 --0.173677 -0.416734 0.0658401 -0.511413 0.131762 0.849174 -0.0593571 0.07619 -0.253383 0.123052 -0.320256 -0.939305 --0.270954 0.184219 -0.123881 -0.785381 -0.304157 -0.539133 -0.045793 -0.119934 0.142716 -0.190506 0.352686 0.916144 -0.0195155 0.159468 -0.267096 -0.0529703 0.0122748 -0.998521 -0.17218 -0.264014 0.0566157 0.954122 -0.271307 0.126662 --0.127638 -0.29706 0.0611814 0.0158394 0.193964 0.980881 -0.166399 -0.279667 0.0550078 0.901826 -0.413678 0.124821 --0.109285 0.365114 -0.0335622 -0.477138 0.87315 -0.0997456 --0.201624 -0.292531 0.0532622 -0.334364 0.201995 0.920543 -0.190005 0.412681 -0.105581 -0.257072 0.580005 -0.772986 -0.109846 -0.499017 -0.0604664 0.00183563 -0.999833 0.01819 -0.0282332 -0.291901 -0.204389 0.931532 0.222027 -0.288015 --0.212203 -0.307388 0.0513879 -0.419027 0.132288 0.898285 --0.215885 -0.373333 0.0473101 -0.549607 -0.180455 0.815701 -0.280062 0.0876521 0.058722 0.974586 -0.172621 0.142774 --0.0398245 0.322387 -0.197832 -0.306992 0.652845 -0.692495 -0.165915 0.185808 -0.221734 0.531528 0.122215 -0.838177 -0.0599903 -0.487368 0.0593987 0.705 -0.620325 0.343762 -0.136459 0.396077 0.0550409 0.356613 0.823701 0.440844 -0.0280515 0.376748 0.136381 -0.0571826 0.845018 0.531672 --0.202029 0.194988 0.0619462 -0.971956 0.163159 0.169355 --0.263112 -0.39659 -0.113467 -0.895197 -0.423472 -0.138903 -0.273954 0.0568592 0.0464228 0.946074 -0.311752 0.088062 --0.060337 0.253088 -0.232839 -0.374192 0.320279 -0.870288 --0.265587 -0.396856 -0.0574534 -0.89023 -0.449004 0.0767181 -0.248589 0.00741855 0.0533856 0.818077 -0.565213 0.106225 -0.195763 0.257915 -0.173847 0.633785 0.340446 -0.69456 -0.158352 -0.0877403 0.0552997 0.869301 -0.444318 0.216556 --0.0279157 -0.109407 0.0652386 -0.872185 -0.44037 0.212996 --0.19154 0.22997 -0.171396 -0.243079 0.237867 -0.940389 -0.11118 0.380312 0.115724 0.293775 0.850654 0.435987 --0.0598943 -0.190472 0.045257 -0.627723 0.694749 0.351124 --0.0712876 -0.205563 0.0521628 -0.60861 0.623529 0.49072 -0.00725933 -0.0239883 -0.186531 -0.173734 -0.720841 -0.670973 --0.194853 -0.161004 -0.238759 0.489844 0.804209 -0.336602 --0.00933059 -0.197255 -0.162223 0.613543 0.741492 -0.271579 --0.23263 0.0862933 -0.116513 -0.769829 -0.273174 0.576835 --0.138207 -0.310731 0.0619899 -0.0159035 0.143461 0.989528 -0.157521 -0.237146 -0.0320833 0.857377 0.0436926 -0.512831 --0.190032 -0.276389 0.0526156 -0.219439 0.289404 0.931714 --0.213761 -0.225017 -0.287038 -0.0134347 -0.0459182 -0.998855 -0.11037 -0.3537 0.0614856 0.725832 -0.569898 0.385206 -0.139637 -0.189149 0.1295 0.766808 0.259223 0.587204 -0.16632 0.148305 0.193368 0.410034 0.208529 0.887912 -0.127547 -0.0530354 -0.119385 0.345825 -0.834822 -0.428342 -0.114894 0.347265 -0.163371 0.314569 0.682173 -0.660065 --0.0520566 -0.227543 -0.258184 0.428948 0.556401 -0.711633 --0.186576 -0.469872 0.0486393 -0.850194 -0.427526 0.307234 -0.0681821 -0.471218 0.0569368 0.839057 -0.225252 0.495223 -0.18981 0.43471 -0.0844112 -0.411753 0.705967 -0.576255 -0.265226 0.0406549 -0.0336463 0.898355 -0.417016 -0.138042 --0.0978368 -0.496552 0.0794379 -0.0202602 -0.996693 0.0786927 --0.128235 0.267945 0.161787 -0.636545 0.375565 0.673618 -0.056735 -0.495534 0.0406154 0.323354 -0.926465 0.192627 -0.0775824 0.406123 0.0661425 0.0810739 0.969394 0.231739 -0.109121 -0.0569559 -0.12539 0.279098 -0.850154 -0.446477 -0.181375 0.359383 0.0582934 0.692402 0.662626 0.285494 --0.137504 0.336594 0.0544315 -0.668672 0.698307 0.255431 --0.0183009 0.399263 -0.0621071 -0.26509 0.943345 -0.199569 -0.252768 0.277784 0.0556571 0.7182 0.579612 0.385017 --0.0124842 -0.176928 0.127728 -0.766298 0.31589 0.559465 -0.274723 0.271001 0.0405634 0.387593 0.479185 0.787498 --0.143819 0.233668 0.160764 -0.681484 0.195314 0.705288 -0.27429 0.246081 0.055966 0.764498 0.274351 0.58333 -0.11983 0.153497 0.211554 0.457206 0.413013 0.787644 -0.0713249 -0.498609 -0.0301588 0.0189439 -0.999577 0.0220622 -0.066813 0.269532 0.221362 0.13252 0.279974 0.950817 -0.282836 0.18958 0.0417192 0.990225 0.00816867 0.139238 -0.0740798 -0.262241 0.170079 0.180256 -0.26189 0.948115 --0.178345 -0.141341 -0.117839 -0.190356 0.973941 0.123301 --0.0284014 -0.179356 0.101759 -0.845666 0.365686 0.388746 -0.156718 -0.139762 0.0418352 0.974971 0.220402 0.0292246 --0.0244178 -0.133909 0.0434984 -0.999875 -0.00152515 0.0157532 --0.0449904 0.350182 -0.16284 -0.355411 0.773548 -0.524697 -0.10628 -0.151854 0.144562 0.517484 0.369644 0.771734 -0.0890301 0.276952 -0.227496 0.283836 0.444678 -0.849528 --0.252503 0.306718 -0.12299 -0.267969 0.531427 -0.803603 --0.221009 -0.322531 0.0485689 -0.498238 0.0481092 0.865704 --0.222969 -0.430063 -0.181053 -0.767959 -0.449599 -0.45618 --0.196441 -0.402869 0.0532746 -0.553788 -0.183072 0.812283 -0.0752385 -0.432953 0.0556629 0.795274 -0.187909 0.576394 --0.213084 -0.418912 0.0323002 -0.70434 -0.326378 0.630383 --0.279417 0.290526 -0.117818 -0.546845 0.308225 -0.778433 --0.164408 -0.493543 0.0548734 -0.411461 -0.904836 0.109412 --0.0415357 -0.499028 0.101062 -0.0634617 -0.997815 0.0184017 -0.264836 0.262893 0.0553555 0.663207 0.507168 0.550397 --0.0355566 -0.0885457 0.0918445 -0.514103 -0.797319 0.316198 -0.116013 -0.0635155 -0.10752 0.30832 -0.850514 -0.426103 --0.116222 -0.47339 -0.226245 -0.0163659 -0.560874 -0.827739 --0.17857 0.0460918 -0.198347 0.104079 0.0853965 -0.990896 -0.168916 0.376509 0.0486374 0.637637 0.614122 0.465052 --0.140267 -0.166421 -0.223953 0.0973515 0.892236 -0.44095 -0.103159 -0.0734548 -0.0961175 0.267202 -0.843138 -0.466606 --0.15912 0.244976 -0.176697 -0.40234 0.365174 -0.839506 -0.261511 0.280937 0.0404047 0.465808 0.591457 0.658181 -0.180454 0.0575732 -0.193912 0.596718 -0.314534 -0.738238 -0.285535 0.156035 0.0298516 0.996329 0.0578798 0.0630828 --0.213724 0.109911 0.0324045 -0.825179 -0.146179 0.54563 -0.26824 0.0387442 0.0173914 0.913121 -0.407665 0.00431391 -0.268503 0.0416643 0.0378048 0.916065 -0.397468 0.0533322 -0.31929 0.320229 -0.0378763 0.965886 -0.184818 -0.181401 -0.237428 -0.00964724 0.0256757 0.766807 -0.641567 0.0199638 --0.133532 -0.0299337 0.0514774 -0.706725 -0.705471 0.0533869 --0.076963 -0.169102 -0.197802 0.335639 0.890783 -0.306354 --0.193878 -0.153735 -0.216904 0.383074 0.903169 -0.19375 -0.284471 0.177119 0.0250551 0.997897 0.0291815 0.0578738 --0.0152857 -0.0549261 -0.132637 -0.232115 -0.843123 -0.485043 -0.13569 0.165871 0.20205 0.370507 0.198274 0.90742 --0.206011 -0.463642 -0.175952 -0.738219 -0.484763 -0.469081 -0.175942 -0.213921 0.0501633 0.987957 0.135992 0.0738098 -0.13683 -0.254368 -0.0583531 0.709294 -0.00783031 -0.704869 --0.102633 -0.231712 0.0491472 -0.462256 0.458961 0.758732 --0.258985 -0.224627 -0.270575 -0.569961 -0.354006 -0.741501 --0.293712 -0.0998587 -0.240375 -0.884929 0.375307 -0.275762 -0.206151 -0.0175784 0.121967 0.653933 -0.690509 0.309143 --0.149006 -0.250678 0.0455367 -0.0245522 0.447017 0.894188 -0.289294 0.462905 -0.0560717 0.515662 0.559878 -0.64856 --0.218992 -0.291793 0.0451517 -0.460293 0.190893 0.867 -0.154368 -0.306062 0.0331469 0.853281 -0.517774 0.0618242 --0.0313713 -0.496934 -0.173031 -0.0161888 -0.995935 -0.0886107 -0.114741 -0.303852 -0.074414 0.713025 -0.167103 -0.680935 --0.201177 -0.43564 0.0391518 -0.777633 -0.20496 0.594373 -0.081282 -0.446674 0.043543 0.77489 -0.156056 0.612529 -0.0706326 -0.482948 0.045212 0.711273 -0.521766 0.47101 --0.0891941 -0.0504143 0.127283 -0.545372 -0.783999 0.296504 -0.249768 0.0929692 0.151216 0.870372 -0.0756088 0.486556 --0.141484 0.294131 0.123049 -0.723951 0.536662 0.433461 -0.070442 0.412221 0.0351312 0.0344094 0.992975 0.113207 -0.153704 0.411838 0.034081 -0.0894173 0.626908 0.773945 -0.0684615 0.385587 0.121303 0.0666775 0.879154 0.47185 --0.127196 -0.494929 -0.199065 -0.0705094 -0.95238 -0.296649 --0.149112 0.00211449 -0.0872195 -0.625238 -0.770931 -0.121419 -0.191997 0.352862 0.0455047 0.72323 0.619785 0.30464 -0.202303 0.339651 0.04949 0.725533 0.637324 0.259655 --0.0161251 0.125213 0.277874 -0.583951 0.0877318 0.807034 --0.0448203 -0.0575321 -0.109348 -0.334279 -0.845214 -0.416979 -0.083216 -0.0756643 -0.102436 0.183541 -0.862767 -0.471112 -0.279169 0.0718781 0.031978 0.969778 -0.240753 0.0395962 -0.0416162 -0.347855 -0.156575 0.995899 -0.00824192 -0.0900922 -0.171781 -0.194653 0.0538926 0.969212 0.226366 0.0968862 -0.089633 -0.30036 0.146274 0.358659 -0.548756 0.755136 --0.122376 -0.236229 0.0411327 -0.296523 0.448326 0.843254 --0.114654 -0.220851 0.0355847 -0.341528 0.549196 0.76272 --0.177338 -0.233114 0.0339817 -0.109728 0.523997 0.844622 -0.0442267 -0.137328 -0.0585726 -0.203727 0.0586302 -0.977271 --0.204324 -0.248032 0.0362825 -0.317254 0.445622 0.837121 --0.210969 -0.0234806 -0.14628 0.0164869 -0.413205 0.910489 --0.232227 -0.336601 0.0412834 -0.608461 -0.0356948 0.792781 -0.168651 -0.0220978 -0.135671 0.507398 -0.708425 -0.490593 -0.122617 -0.346784 0.0449563 0.791956 -0.550505 0.264101 --0.241559 -0.35085 0.0318267 -0.68899 -0.130609 0.712905 --0.0644554 -0.0708743 0.107334 -0.436523 -0.872857 0.218101 -0.11768 0.322387 -0.185193 0.358523 0.599078 -0.715938 --0.195574 -0.466561 0.0324266 -0.809896 -0.461851 0.36161 --0.0203445 0.345067 -0.182119 -0.238112 0.737007 -0.632553 -0.0712808 -0.492437 0.0312361 0.470372 -0.807453 0.356049 --0.0760281 0.305589 0.17783 -0.442958 0.540489 0.715304 -0.0849413 0.344465 -0.179436 0.251907 0.691787 -0.676738 -0.13836 0.404486 0.0402776 0.0858422 0.816249 0.571287 --0.0281952 -0.241921 0.135636 -0.717231 0.140318 0.682561 --0.210609 0.00523563 -0.135441 -0.355875 -0.271935 0.894094 -0.252473 0.112438 0.147502 0.863974 0.0203682 0.503124 -0.171227 0.406417 0.0340188 0.279338 0.207594 0.937483 -0.0939795 -0.0553695 0.183851 0.283721 -0.858991 0.426189 --0.129839 0.347171 0.0402719 -0.609188 0.768546 0.195516 -0.102373 -0.455136 0.0191046 0.684465 -0.129683 0.717419 -0.0868131 0.0139458 -0.218121 0.208872 -0.532569 -0.820209 --0.0845612 0.272466 -0.212102 -0.454114 0.426206 -0.782387 -0.0981987 -0.285133 0.152474 0.382912 -0.471947 0.794131 --0.201018 -0.375061 -0.245125 -0.561541 -0.383039 -0.733453 -0.292653 0.271721 0.0342615 0.541178 0.189625 0.819249 --0.181836 -0.37874 -0.256427 -0.483918 -0.361669 -0.796881 -0.287328 0.223535 0.0365723 0.940155 -0.185313 0.285951 --0.211512 0.160913 0.0254296 -0.955862 0.13636 0.260257 --0.0955608 0.282458 -0.198957 -0.484454 0.486799 -0.726864 --0.0892555 -0.0276035 0.168627 -0.586651 -0.641643 0.494099 --0.150029 -0.0133023 0.024168 -0.749083 -0.662458 -0.00495592 -0.0112609 -0.0771021 -0.100871 -0.137507 -0.881783 -0.451166 --0.166685 0.258595 -0.16717 -0.288137 0.459001 -0.840414 -0.185094 -0.059872 0.0319396 0.662606 -0.747953 0.0389759 --0.0645096 -0.0809324 0.0288447 -0.526176 -0.849991 -0.0255729 -0.159459 -0.0890395 0.0356881 0.897375 -0.441077 0.0130047 --0.300915 -0.115515 -0.233142 -0.955188 0.239196 -0.17436 --0.0854707 -0.208344 0.0409152 -0.453048 0.673083 0.584557 -0.0413163 -0.366163 -0.149564 0.980247 -0.0870525 -0.177591 -0.176925 -0.23813 0.0299273 0.996372 -0.0478034 -0.0704075 -0.17552 -0.253109 0.0426004 0.985158 -0.16991 0.0243819 --0.000791848 -0.494518 0.00317354 -0.0671673 -0.985686 -0.154636 --0.0522422 0.351234 0.145895 -0.351443 0.751318 0.558577 -0.105058 0.025903 -0.219747 0.282523 -0.477734 -0.831836 --0.0838496 0.347573 0.124591 -0.496953 0.736081 0.45959 -0.0968716 -0.19636 0.165907 0.363871 0.184426 0.913009 --0.113431 0.33798 0.101242 -0.607398 0.704349 0.36737 --0.010929 -0.497395 -0.168036 -0.0122569 -0.998929 -0.0446054 --0.0304269 -0.174229 -0.0962542 0.306815 0.945417 -0.10978 -0.184398 0.423559 0.0292399 0.154689 0.160264 0.974878 -0.114566 0.370097 0.1313 0.307078 0.806947 0.504519 --0.111081 0.10938 -0.220446 -0.499848 -0.191089 -0.84477 -0.164698 0.428046 0.026711 -0.283489 0.588127 0.757457 -0.283433 0.110278 -0.0267514 0.990555 -0.0857623 -0.106988 --0.29291 0.286757 -0.107751 -0.686311 0.189258 -0.702252 -0.00449469 0.408217 0.0329803 -0.160024 0.981775 0.102517 --0.117136 0.357063 0.0393478 -0.570096 0.806019 0.159134 --0.16156 0.321573 0.028348 -0.711913 0.596949 0.369908 --0.0307002 -0.49809 0.133035 -0.152223 -0.92476 0.34878 --0.171942 0.308838 0.024578 -0.797128 0.428208 0.425706 --0.00400711 -0.163296 0.13173 -0.733761 0.321774 0.598378 -0.248446 0.293362 0.039619 0.601755 0.642433 0.474522 -0.137983 -0.0266679 0.197813 0.45051 -0.724488 0.521687 -0.0888763 -0.0851359 0.137753 0.326737 -0.529268 0.783019 --0.0325068 -0.475503 -0.201365 0.00711507 -0.361107 -0.932497 -0.286595 0.142313 0.0172792 0.999496 0.0266773 0.017194 --0.210686 0.14247 0.0369573 -0.956908 0.0919413 0.27545 --0.121603 0.0945276 -0.210053 -0.504959 -0.249868 -0.826186 -0.191916 0.280818 0.164087 0.605598 0.417045 0.677735 --0.202624 0.0756407 0.02941 -0.835338 -0.457705 0.304494 --0.139325 -0.0241225 0.0151226 -0.698136 -0.714203 -0.0501902 -0.0513552 0.337204 -0.1958 0.129837 0.677181 -0.724271 --0.108815 0.158259 -0.226503 -0.501242 0.0178018 -0.865124 --0.0274866 -0.114606 0.0500433 -0.925682 -0.371396 0.0719585 --0.0535407 0.12275 0.226474 -0.851696 0.30457 0.42644 --0.13873 0.0161522 0.138658 -0.804946 -0.305765 0.508498 --0.2739 -0.0766493 -0.252835 -0.668439 0.536939 -0.51467 -0.241494 0.224681 0.13753 0.792909 0.239404 0.560339 --0.0486348 -0.176992 0.0353646 -0.630236 0.750965 0.197111 --0.0742119 -0.195965 0.034308 -0.500458 0.743878 0.442931 --0.20471 -0.465191 0.0105851 -0.812236 -0.49143 0.314276 -0.175182 -0.223302 0.0160606 0.981406 0.0815759 -0.173744 --0.235087 -0.288738 0.0344974 -0.584239 0.187588 0.789605 --0.229086 -0.305224 0.0417801 -0.54764 0.122145 0.82775 -0.0690307 0.340876 -0.188146 0.197716 0.684547 -0.701643 -0.230884 0.230621 0.14852 0.728946 0.237633 0.642004 --0.105164 -0.156518 -0.181791 0.218981 0.953959 -0.204962 --0.132507 0.293017 0.137779 -0.682055 0.524435 0.509675 -0.137955 -0.0160569 0.211036 0.450138 -0.651054 0.611151 -0.0133711 -0.498336 0.0144034 -0.0555589 -0.997089 -0.0522255 -0.00296378 0.0317147 -0.230756 -0.170638 -0.520941 -0.836363 -0.197024 0.440878 0.0256069 0.049798 0.225121 0.973057 -0.0926889 -0.0176267 0.233887 0.266706 -0.490144 0.829835 -0.0867875 -0.428707 0.0421997 0.754132 -0.213902 0.620911 -0.120468 0.411383 0.0255196 -0.0546458 0.960368 0.273327 --0.0340192 0.357805 0.146989 -0.2737 0.774092 0.57085 -0.0121789 0.339988 -0.195202 -0.0633249 0.706464 -0.704911 -0.145688 -0.304458 -0.0287185 0.860055 -0.357983 -0.363531 -0.162489 -0.0419846 -0.107267 0.466752 -0.796215 -0.384947 -0.215517 0.328879 0.0385864 0.714152 0.631143 0.302731 -0.23795 0.322119 0.0164532 0.39606 0.560618 0.727217 -0.281207 0.302467 0.0251084 0.0295861 0.377727 0.925444 -0.133818 -0.111991 -0.0309563 0.795912 -0.197612 -0.572253 --0.292179 0.190132 -0.0890547 -0.852329 -0.387955 -0.350751 -0.292282 0.227656 0.0180558 0.943885 -0.301963 0.133786 -0.148239 -0.221814 0.127911 0.812516 0.0713707 0.578554 -0.0202619 0.351953 -0.18306 -0.0315396 0.757699 -0.651841 -0.0813615 -0.217705 -0.0911776 0.444344 0.377261 -0.812547 --0.0221534 -0.0944315 -0.0457067 -0.452332 -0.778429 -0.435252 -0.154104 0.0483736 -0.208239 0.483079 -0.372012 -0.792617 --0.00563516 -0.197504 0.145335 -0.669765 0.254098 0.697745 --0.186815 0.0419848 0.0214317 -0.87192 -0.467925 0.144226 --0.181446 0.0291749 0.00477181 -0.84528 -0.531156 0.0580861 -0.153981 -0.124718 0.0318642 0.995821 0.0843752 -0.0349538 -0.0532495 0.350647 -0.18194 0.122567 0.732757 -0.669361 -0.170942 -0.222041 0.0808179 0.956361 0.0628486 0.285349 --0.00927577 -0.0732213 0.154297 -0.189154 -0.900948 0.390529 --0.0723318 -0.41484 0.0884432 -0.106794 0.641471 0.759678 -0.2189 0.0869353 0.192801 0.707469 0.0523236 0.704805 --0.0630878 -0.183862 0.0253649 -0.511652 0.805494 0.298984 --0.195899 -0.478964 -0.174787 -0.64702 -0.615247 -0.450373 -0.226693 0.0230864 0.147768 0.773722 -0.488918 0.402882 --0.140708 -0.236291 0.0380549 -0.072416 0.488523 0.869541 --0.222598 -0.255292 0.0316203 -0.463689 0.381033 0.799879 --0.245942 -0.300665 0.0276276 -0.681168 0.112973 0.723359 --0.236708 -0.31833 0.0376019 -0.626257 0.0435084 0.778402 --0.249028 -0.317633 0.026459 -0.706288 0.033424 0.707135 --0.255548 -0.34901 0.0169997 -0.77558 -0.148138 0.613621 --0.0197614 0.0303455 0.267963 -0.241878 -0.40945 0.879685 --0.186528 0.125096 0.109253 -0.823541 -0.144849 0.548451 --0.0987861 0.144429 -0.23209 -0.474091 -0.0308108 -0.879936 --0.131227 0.0636624 0.15158 -0.611134 0.0442546 0.790289 --0.131763 0.0438137 0.151838 -0.726229 0.0449511 0.685982 --0.296929 -0.202313 -0.232721 -0.907805 -0.281414 -0.310961 -0.233233 0.212797 0.150953 0.693924 0.157691 0.702569 --0.0324432 0.270315 -0.235844 -0.261704 0.404329 -0.876373 --0.154443 0.217339 0.154381 -0.711787 0.124476 0.691278 -0.126505 0.35792 0.141534 0.363819 0.755898 0.544292 -0.0372008 -0.308314 0.155396 0.0471595 -0.4699 0.881459 --0.235539 0.123419 -0.163057 -0.738411 0.595642 -0.316165 --0.0159222 -0.496973 -0.122923 -0.0316775 -0.999479 0.00612031 --0.28701 -0.101419 -0.189925 -0.716694 0.154382 0.680086 -0.124904 -0.234166 0.153954 0.62699 -0.0417873 0.777906 -0.229999 0.316751 0.0313785 0.65585 0.633106 0.411142 -0.0634142 -0.125806 0.147153 0.0161488 0.408884 0.912444 -0.0692497 -0.144088 0.155257 0.0830726 0.412187 0.907304 -0.0470979 0.309597 -0.218885 0.127365 0.569378 -0.81215 --0.0234278 -0.0572384 0.180336 -0.269389 -0.834595 0.480501 --0.0990289 -0.00537382 -0.154584 -0.408174 -0.731032 -0.546797 --0.209405 -0.158763 -0.0804877 -0.323911 0.922063 0.211854 -0.137574 0.111494 0.244267 0.539317 0.577844 0.612563 --0.031617 -0.370288 -0.263226 0.454594 -0.335013 -0.825294 --0.00506031 -0.091051 0.12311 -0.428137 -0.669999 0.606465 -0.244064 0.125999 0.158228 0.773959 0.11912 0.621931 -0.245416 0.179415 0.145945 0.7637 0.135628 0.631164 -0.069183 -0.422017 0.0679759 0.78947 -0.207955 0.577487 --0.235393 0.121497 0.0167888 -0.544494 -0.0505982 0.837237 --0.0356744 0.146136 0.240569 -0.772626 0.438147 0.45943 --0.230688 -0.0789284 -0.263277 0.532438 0.216278 -0.818373 -0.271231 0.0498125 -0.0172383 0.927802 -0.363462 -0.0841423 -0.0745687 0.103603 -0.258441 0.209405 -0.20079 -0.956992 -0.0489977 -0.474638 -0.172161 0.757975 -0.132197 -0.638747 -0.156937 -0.144477 0.0229679 0.965976 0.228983 -0.120236 --0.0228534 -0.139202 0.00159545 -0.970575 0.0856048 -0.225067 --0.182528 -0.47772 -0.192372 -0.573847 -0.604418 -0.55261 --0.0909076 -0.19785 0.023078 -0.30719 0.780917 0.543877 --0.187075 -0.219596 0.0236994 -0.179686 0.58509 0.790812 -0.0486422 -0.453011 -0.167615 0.776898 0.289048 -0.559357 --0.206201 -0.221477 0.0183767 -0.3359 0.566243 0.752689 --0.236572 -0.271276 0.0281458 -0.592425 0.264142 0.761093 -0.174345 -0.257548 0.0248695 0.979404 -0.185046 -0.0807841 --0.0469772 0.008258 -0.19762 -0.306771 -0.632319 -0.711382 -0.115337 -0.371688 0.0271932 0.89184 -0.311533 0.327977 --0.247822 -0.377833 0.0154037 -0.761156 -0.298892 0.575592 -0.111885 -0.390199 0.0236157 0.881179 -0.205296 0.425884 -0.152945 0.154397 -0.231367 0.484251 0.000740773 -0.874929 -0.0930185 -0.469418 0.0254919 0.692074 -0.24187 0.680098 -0.0994655 -0.468137 -0.123441 0.189274 -0.0123898 -0.981846 -0.0362969 -0.37499 -0.167465 0.945547 -0.209567 -0.249043 --0.219043 -0.157555 -0.107423 -0.396492 0.905023 0.154039 -0.203673 0.302523 -0.146719 0.470944 0.260824 -0.842723 -0.139349 -0.0419292 -0.130581 0.381207 -0.804571 -0.455354 --0.186337 -0.490199 -0.00878823 -0.433221 -0.885662 0.1671 --0.0453985 -0.0644137 -0.0942964 -0.35414 -0.854003 -0.381136 -0.200618 0.290621 0.148026 0.656954 0.495384 0.568337 --0.124692 -0.496369 0.0182181 -0.0192641 -0.999741 -0.0121098 -0.0252219 0.357038 0.162767 -0.0580003 0.765367 0.640975 --0.0940768 -0.1883 -0.243407 0.274374 0.725974 -0.630619 -0.305863 0.47144 -0.025072 0.8286 0.549785 -0.105637 --0.0527936 -0.449304 -0.225084 0.405687 -0.537494 -0.739268 -0.225038 0.446383 0.0164372 0.323855 -0.134709 0.936467 -0.127962 0.288922 0.198372 0.360062 0.342524 0.867775 -0.21797 0.415213 0.0121421 0.407037 -0.187786 0.8939 --0.0600439 0.391144 0.0115149 -0.392247 0.919363 0.0302212 --0.290718 0.167546 -0.0159025 -0.80206 -0.303758 0.514228 -0.192186 0.380715 0.0208386 0.602283 0.0958123 0.792512 --0.14251 0.343484 -0.0641094 -0.280721 0.929699 -0.238445 -0.19534 0.360839 0.026233 0.712038 0.450307 0.538726 -0.211641 0.34819 0.0168995 0.609804 0.457639 0.647075 --0.259314 -0.331159 0.0155576 -0.791262 -0.0437165 0.609912 -0.0170081 -0.133428 0.136172 -0.544062 0.378261 0.748942 -0.0092533 -0.254834 -0.218992 0.807577 0.40963 -0.42429 -0.243086 0.306582 0.0276503 0.499522 0.641691 0.581988 -0.301938 0.308717 0.0202569 0.456112 0.219125 0.862523 --0.244864 -0.0672825 -0.264046 -0.0122099 0.511962 -0.858921 -0.261391 0.155505 0.124494 0.900387 0.095856 0.424398 -0.295658 0.289584 0.0281053 0.449276 0.205917 0.869339 -0.308692 0.292942 0.0158153 0.826222 -0.021202 0.562946 -0.183128 -0.0423505 -0.0755284 0.551854 -0.775051 -0.30782 -0.219718 0.0442194 0.178987 0.766253 -0.337777 0.546592 -0.155681 0.223135 -0.21924 0.498509 0.271552 -0.823255 -0.00625335 -0.384425 -0.22483 0.714716 -0.396072 -0.576461 --0.226633 0.107544 0.0208984 -0.646248 -0.264728 0.715739 --0.0220342 -0.203937 -0.203195 0.605389 0.692277 -0.392754 --0.21649 0.0912581 0.021669 -0.741096 -0.460702 0.488396 --0.208488 0.0747315 0.0126435 -0.775324 -0.56819 0.275741 -0.274212 0.0544489 0.0264121 0.944593 -0.327415 0.0233277 -0.248155 0.00414768 0.0166673 0.815031 -0.579416 0.00118845 --0.278295 -0.355529 -0.122639 -0.936394 -0.312721 -0.159287 -0.157548 -0.0909801 0.0150017 0.889202 -0.444965 -0.106427 -0.274312 0.096467 0.0904809 0.960451 -0.106123 0.257433 --0.110172 -0.197086 0.0149366 -0.177534 0.756132 0.629878 --0.122386 -0.207726 0.0222768 -0.208211 0.642705 0.737278 --0.129629 -0.194725 0.00878059 -0.0974972 0.723009 0.683924 --0.167986 -0.219299 0.0257166 -0.0673935 0.584985 0.808239 -0.174568 -0.241424 0.0115664 0.981273 -0.055333 -0.184505 --0.26132 -0.291091 0.00899631 -0.789059 0.120953 0.602293 -0.124176 -0.445322 -0.117349 0.270431 0.406563 -0.872682 --0.241041 -0.394654 0.0148141 -0.753959 -0.368388 0.543909 --0.249344 0.325426 -0.0199902 -0.221848 -0.0079822 0.975049 --0.195407 -0.476708 0.0132636 -0.717047 -0.64817 0.256356 --0.183595 -0.482343 0.0289655 -0.674828 -0.705704 0.215845 --0.0596048 -0.0491406 0.167104 -0.427134 -0.779227 0.458652 --0.00751695 -0.0947243 -0.0573171 -0.363896 -0.779611 -0.509692 --0.0278693 -0.497355 0.0297093 -0.106133 -0.987539 -0.116199 -0.231378 0.0526339 -0.13614 0.779257 -0.342981 -0.524522 -0.249003 0.489867 0.00568434 -0.0704576 0.705358 0.705341 -0.219025 0.476303 0.0114124 -0.276954 0.678714 0.680179 --0.275187 -0.237823 -0.0426463 -0.865292 0.378571 0.328563 -0.120671 0.118542 0.252226 0.531936 0.580452 0.616539 --0.185099 0.212707 0.109426 -0.903739 0.187924 0.384629 -0.17558 -0.0259245 0.157103 0.559301 -0.725213 0.401558 -0.204861 0.344306 0.0321327 0.713841 0.597876 0.364658 --0.138154 0.278593 -0.16945 -0.501922 0.525779 -0.686754 --0.0935111 0.374755 0.0127668 -0.478744 0.876575 0.049202 --0.180234 -0.162978 -0.228392 0.274722 0.894538 -0.352604 --0.24614 0.238394 -0.15214 -0.45906 0.13306 -0.878384 --0.111565 0.363842 0.0182376 -0.523732 0.847518 0.0861334 --0.138216 0.348539 0.00300733 -0.498713 0.857117 0.128979 -0.0250959 -0.494472 -0.178055 0.287543 -0.882448 -0.372297 -0.28982 0.337719 0.0125078 -0.0434176 0.277741 0.959674 --0.0838937 -0.1746 -0.217613 0.310939 0.844349 -0.43634 -0.306108 0.324886 0.0146231 0.465024 0.167832 0.869244 --0.107724 0.246016 -0.209894 -0.50947 0.310774 -0.802409 -0.250426 0.335175 0.00763794 0.00937449 0.353544 0.935371 -0.151608 0.327984 0.159468 0.466631 0.630362 0.620403 -0.220908 0.058094 -0.153651 0.741877 -0.318078 -0.590293 -0.211011 0.141668 -0.18742 0.715928 -0.0410232 -0.696968 --0.207996 0.346548 -0.0659309 0.207643 0.959872 -0.188494 -0.286671 0.128353 0.00322254 0.999405 -0.0210276 -0.0273293 --0.246295 0.137781 0.00990077 -0.389225 0.15643 0.907763 -0.142325 0.0567661 -0.219015 0.446373 -0.349666 -0.823702 --0.22899 0.0931957 0.0055214 -0.686737 -0.626553 0.368542 -0.0147234 -0.498188 -0.0961245 -0.0218087 -0.999712 -0.0100084 -0.0185731 0.41234 -0.000880496 -0.117553 0.992797 0.0231298 -0.143622 0.295404 -0.191213 0.444752 0.50062 -0.742681 -0.142747 0.317388 0.175366 0.423855 0.561685 0.710533 --0.291561 -0.259726 -0.176946 -0.975711 -0.181603 -0.122511 -0.152048 -0.140673 0.00423734 0.933199 0.181957 -0.309891 --0.036782 -0.165621 0.0236996 -0.711684 0.699734 0.0622779 --0.0785329 -0.188429 0.0152187 -0.344799 0.848973 0.400448 --0.248808 -0.21984 -0.0161688 -0.652037 0.541552 0.53063 -0.0915803 0.196309 0.219463 0.462381 -0.0248853 0.886332 --0.250384 -0.282474 0.0195764 -0.696898 0.189157 0.691775 --0.265728 -0.344136 0.00260972 -0.858304 -0.131499 0.496006 --0.259647 -0.36485 0.00514208 -0.822161 -0.254158 0.509367 -0.118194 -0.384514 0.00927765 0.945585 -0.136231 0.295482 -0.121988 -0.415913 -0.000240009 0.862325 0.095173 0.49733 -0.214129 0.203834 -0.177134 0.722038 0.185199 -0.666605 -0.135721 0.145876 0.206693 0.435505 0.418313 0.797088 -0.0930314 -0.0715785 0.151154 0.277328 -0.806203 0.522614 --0.0431381 0.372224 0.118803 -0.323534 0.838936 0.437621 -0.121567 -0.0996562 -0.0503931 0.573925 -0.467852 -0.672105 --0.255933 -0.211951 -0.0352055 -0.696869 0.575688 0.427734 -0.0803541 -0.494413 0.0144683 0.355224 -0.880122 0.314964 --0.121169 0.174845 0.174449 -0.475501 -0.320405 0.819292 --0.0787503 -0.494943 0.0195037 0.200173 -0.922025 -0.331361 -0.0934772 -0.348293 0.0933267 0.55259 -0.651417 0.519904 --0.0985222 -0.490179 -0.0141786 0.397188 -0.917292 -0.0285757 --0.116029 -0.0147061 0.147769 -0.716007 -0.531089 0.453077 -0.0752021 0.137814 0.272392 0.544401 0.447734 0.709339 -0.276506 0.286783 0.0318741 0.168079 0.436406 0.883911 --0.198457 -0.061996 -0.212326 0.905721 -0.364821 -0.215815 -0.0215077 -0.117486 -0.0540812 -0.385914 -0.38219 -0.839643 --0.192848 -0.00639585 -0.217305 0.487554 0.261543 -0.832998 -0.176444 0.44268 0.0191379 -0.406304 0.644588 0.647629 -0.252646 0.426868 0.00334563 0.177389 -0.160035 0.971042 -0.172861 0.447348 0.000297222 -0.61859 0.77135 0.149549 -0.238885 0.412824 0.003849 0.248061 -0.144192 0.957953 -0.0357888 0.412177 0.0291748 -0.0589828 0.993976 0.0923718 --0.247814 -0.286551 -0.248685 -0.670141 -0.339528 -0.660024 --0.171444 0.325705 0.00991104 -0.569128 0.632945 0.524856 -0.227989 0.369083 0.00344096 0.256461 0.036999 0.965846 --0.148376 0.20085 0.161291 -0.645936 -0.00664617 0.763363 -0.0402396 0.199164 0.235104 0.124296 0.225191 0.966354 -0.176479 0.277197 0.177791 0.524698 0.339787 0.780536 -0.223488 0.354111 0.00656229 0.367823 0.236691 0.899269 -0.241775 0.3533 0.00287999 0.108157 0.182753 0.977192 -0.122853 -0.0671403 0.1382 0.400266 -0.793781 0.457929 --0.129357 0.344421 -0.0784377 -0.404342 0.869647 -0.283234 -0.0221111 -0.429622 -0.182384 0.659451 0.306284 -0.686523 --0.21056 0.17821 0.017959 -0.95553 0.202374 0.214495 -0.119964 -0.0284805 -0.165048 0.332128 -0.752533 -0.56867 -0.00463469 -0.0789336 0.146698 -0.169991 -0.866073 0.470127 --0.123073 -0.0345198 -0.0166166 -0.624363 -0.769878 -0.132135 --0.0615938 -0.423844 0.102718 -0.425442 0.6519 0.627714 --0.0101599 -0.216557 -0.206102 0.670611 0.624258 -0.400728 -0.158092 -0.15797 0.00922978 0.925933 0.267353 -0.266779 --0.14033 -0.206332 0.0177235 -0.0989388 0.631209 0.769276 --0.238198 -0.25392 0.0200578 -0.593111 0.366827 0.716699 -0.0313554 -0.37481 -0.184842 0.914725 -0.264487 -0.30549 -0.133665 -0.337054 0.0261123 0.832018 -0.540448 0.125149 -0.0943408 -0.254695 0.166687 0.324134 -0.232179 0.917077 --0.211828 -0.450098 0.0115866 -0.829674 -0.398827 0.390614 -0.05691 -0.252822 -0.124532 0.644537 0.218886 -0.732572 --0.278584 -0.347543 -0.135529 -0.934039 -0.302582 -0.189776 -0.135398 -0.222809 0.143541 0.725094 0.0600135 0.68603 -0.157013 -0.0484189 0.139034 0.49792 -0.786538 0.365284 -0.13371 0.404978 -0.0818529 -0.259177 0.875884 -0.407008 -0.28325 0.487718 -0.00237521 0.443743 0.621777 0.645357 -0.221982 0.331302 0.0221894 0.624798 0.591 0.510241 --0.156897 -0.497476 -0.123267 0.00263947 -0.99989 0.0145988 --0.0332489 -0.170501 -0.0566752 0.186093 0.980413 -0.0645006 -0.283256 0.436127 0.00187856 0.0836025 -0.0743058 0.993725 --0.0251951 -0.164605 -0.0257196 -0.309592 0.873065 -0.376709 -0.0128986 -0.217633 0.163745 -0.454388 0.128018 0.881557 --0.00209686 -0.166492 -0.0514709 -0.381496 0.809493 -0.446297 -0.291526 0.417172 0.000991615 0.0450759 0.00238643 0.998981 --0.0746029 -0.157272 -0.0911624 0.274091 0.961041 -0.0356886 --0.050296 -0.166658 -0.0528907 0.169896 0.982321 0.0786129 --0.147753 -0.015513 0.0422658 -0.761264 -0.646329 0.0523046 -0.258962 0.409183 0.000411388 0.0739349 -0.0683559 0.994918 --0.138835 -0.143464 -0.147021 0.24147 0.965653 -0.095949 --0.0139995 -0.173792 -0.0638015 -0.0103969 0.979 -0.203595 -0.31553 0.384969 0.000665313 0.57377 0.117595 0.81053 -0.30088 0.399545 0.00182497 0.130263 0.0962847 0.986793 --0.210441 -0.00637382 -0.223494 0.0394875 0.54999 -0.834237 -0.232469 0.383515 0.00287331 0.230244 -0.0378587 0.972396 --0.0409224 -0.176478 -0.157747 0.430616 0.893329 -0.128578 -0.249026 0.373695 0.000906112 0.052653 0.0465741 0.997526 --0.296469 -0.216163 -0.17261 -0.978085 0.0108072 0.207926 --0.0458805 -0.167335 -0.0881686 0.356391 0.930163 -0.0882118 -0.112428 -0.234105 -0.0766454 0.586376 0.160008 -0.794079 --0.114475 -0.149734 -0.127338 0.205181 0.976889 -0.0599093 -0.309088 0.341734 0.0100213 0.450311 0.137501 0.882221 --0.103521 -0.152259 -0.143647 0.225395 0.972166 -0.0639613 --0.151727 -0.143251 -0.161348 0.094917 0.973589 -0.207644 -0.311075 0.283873 0.00419476 0.957478 -0.202026 0.205964 --0.173064 -0.1437 -0.159875 -0.125756 0.963676 -0.235616 -0.304995 0.260937 0.00709843 0.950975 -0.274844 0.141798 --0.190535 0.290013 0.004021 -0.777635 0.0433678 0.627219 -0.284853 0.183275 0.00797379 0.999962 -0.00733085 0.00475162 --0.00458385 -0.345254 -0.253489 0.617248 -0.191205 -0.763181 --0.240639 0.106437 0.00666474 -0.68832 -0.526548 0.498962 -0.0367675 -0.440502 -0.17498 0.703823 0.410153 -0.580007 -0.258897 0.0205974 0.0120134 0.865676 -0.500499 -0.0102695 -0.156114 -0.0868418 -0.00548078 0.811137 -0.551943 -0.193431 -0.077018 -0.492153 -0.124494 0.330256 -0.793518 -0.511136 -0.0290234 -0.406501 -0.165666 0.899459 -0.0485671 -0.434297 -0.152096 -0.124585 0.0135976 0.980483 0.0574947 -0.188008 --0.107703 -0.153056 -0.162135 0.221223 0.968108 -0.117592 --0.155057 -0.15951 -0.210047 0.0480366 0.939132 -0.340181 --0.037204 -0.164489 0.00203326 -0.563655 0.825467 0.029951 --0.0660207 -0.17936 0.00488206 -0.387998 0.890004 0.23948 --0.133179 -0.153476 -0.19087 0.108839 0.947353 -0.301124 --0.106672 -0.162688 -0.205031 0.209077 0.917207 -0.339143 --0.00926597 -0.478354 -0.0569518 -0.188355 -0.877513 0.441014 -0.0111618 -0.0655588 0.178369 -0.109513 -0.89755 0.427096 --0.176193 -0.205654 0.0141104 -0.12024 0.660482 0.741151 -0.125526 0.0568426 -0.227381 0.377258 -0.358106 -0.854071 --0.217625 -0.211255 0.00426493 -0.417474 0.619878 0.66443 --0.245864 -0.4278 -0.0405202 -0.847735 -0.496616 0.186328 --0.0987625 -0.152029 -0.122802 0.23623 0.969671 -0.0627212 --0.0799192 0.0720048 -0.224949 -0.407288 -0.365202 -0.837105 --0.12613 -0.145625 -0.111796 0.202447 0.979275 0.00589836 --0.0950804 -0.0104153 0.180172 -0.664114 -0.491679 0.56321 -0.0396235 -0.341793 -0.175058 0.984165 -0.0485379 -0.170477 --0.0355498 -0.489039 -0.0781098 -0.190333 -0.922719 0.335205 -0.00110816 -0.211496 -0.172164 0.737715 0.600316 -0.308865 -0.224641 0.215303 -0.161705 0.759064 0.20421 -0.618158 -0.118329 0.333689 -0.174943 0.344736 0.637664 -0.68887 --0.122023 0.28488 -0.177719 -0.535982 0.520928 -0.664347 -0.312869 0.447787 -0.00885366 0.775275 0.257045 0.576955 -0.311194 0.414972 -0.00157209 0.485524 0.0761743 0.870898 --0.191452 -0.145105 -0.148003 -0.248923 0.961142 -0.119349 --0.062794 0.389939 -0.00635697 -0.401904 0.915501 -0.0182225 -0.110715 -0.214557 -0.073069 0.527167 0.24698 -0.813078 -0.312625 0.362338 0.00489261 0.478611 0.117406 0.870142 --0.157161 0.338167 0.00291988 -0.458348 0.841451 0.286143 --0.170188 0.338399 -0.00948413 -0.232749 0.889829 0.39247 --0.185703 0.323666 0.00199611 -0.401321 0.495531 0.770319 --0.192601 -0.144343 -0.126423 -0.314695 0.947506 0.0565557 --0.0484407 -0.485676 -0.0189216 -0.164463 -0.978818 0.121927 --0.200499 0.304416 -0.00257534 -0.535034 -0.0221787 0.844539 --0.20244 0.232616 -0.00273344 -0.896063 0.220048 0.385551 --0.0420549 -0.48375 -0.0593508 -0.0285746 -0.996729 0.0755928 -0.293377 0.228064 -0.0109274 0.938963 -0.341337 -0.0428775 --0.219168 0.166209 0.00568739 -0.635519 0.381202 0.671417 --0.133437 0.205469 0.173316 -0.595912 -0.0281009 0.802558 --0.247446 0.183632 -0.0100675 -0.0207902 0.375751 0.926488 --0.119871 -0.148838 -0.091879 0.157919 0.973146 0.167476 --0.270247 0.15271 -0.000432452 -0.521278 -0.0376939 0.852554 --0.0858395 0.313993 0.164046 -0.482872 0.589991 0.647106 --0.0380547 0.332202 0.174105 -0.28192 0.664216 0.692343 --0.0825114 -0.482243 -0.00949307 0.324376 -0.944495 -0.0520431 -0.103057 0.351067 0.162295 0.234593 0.720001 0.653119 -0.0582495 -0.4692 -0.160015 0.830076 0.0503189 -0.555375 -0.169952 0.13112 -0.219903 0.557463 -0.0880271 -0.825522 -0.0139696 0.346657 0.173528 -0.0852303 0.721992 0.686632 -0.146136 0.191946 -0.231886 0.462141 0.142911 -0.875216 --0.176571 0.319853 -0.112186 0.0661186 0.827802 -0.55711 --0.0595385 -0.483333 -0.0528262 0.100686 -0.994613 -0.0246349 -0.0590887 -0.249529 0.174552 0.038969 -0.138001 0.989665 --0.0901911 -0.492754 0.00426083 0.368308 -0.887745 -0.276148 --0.0506999 -0.173547 0.014061 -0.497103 0.850202 0.173336 --0.13347 0.00811262 -0.151407 -0.0529666 -0.873887 -0.483234 --0.197088 -0.208844 0.0117634 -0.257917 0.651193 0.713741 -0.0244132 -0.467384 -0.195512 0.530441 -0.0141139 -0.847604 --0.263709 -0.25479 -0.0077619 -0.771839 0.32651 0.545578 --0.268958 -0.324134 0.000121706 -0.868142 -0.0208891 0.495876 -0.141752 -0.325736 0.00587119 0.85863 -0.510901 -0.0416481 --0.26389 -0.375657 -0.00997081 -0.861672 -0.335655 0.380602 -0.035413 -0.479625 -0.184861 0.631947 -0.339767 -0.696564 --0.11977 0.212077 0.183257 -0.568465 -0.00460497 0.822695 -0.20625 0.238595 0.167392 0.592787 0.13016 0.794771 --0.300179 0.245691 -0.10219 -0.830693 -0.0734848 -0.551859 --0.00435397 0.34519 0.171807 -0.153969 0.714955 0.682006 -0.108736 -0.485328 0.00403068 0.474387 -0.60987 0.634835 -0.0276179 0.127393 0.294955 0.0335026 0.0483813 0.998267 -0.0901983 -0.495384 -0.000161038 0.251961 -0.926998 0.277832 -0.0488131 0.097934 0.288047 0.0760689 -0.185484 0.979699 -0.113045 0.215482 -0.242526 0.363892 0.231216 -0.902287 -0.0258588 0.0967616 0.287737 -0.103447 -0.341416 0.934202 -0.00623884 0.145934 0.288072 -0.354383 0.38215 0.853449 -0.0809192 -0.224763 0.173543 0.194727 0.0129677 0.980772 -0.298621 0.480909 -0.011437 0.735137 0.603716 0.308384 -0.0812104 -0.206368 0.172306 0.205337 0.117294 0.971637 -0.306584 0.46421 -0.00863326 0.778614 0.357774 0.515517 -0.121154 -0.283019 -0.0721601 0.703358 -0.0974913 -0.704119 -0.161489 0.115291 -0.223445 0.53139 -0.126911 -0.837567 -0.030876 -0.0644508 0.184158 -0.045184 -0.910406 0.411242 -0.073652 0.0532831 0.27765 0.0239174 -0.39495 0.918391 --0.0307129 0.402145 -0.0129243 -0.30031 0.953473 -0.0265134 -0.323505 0.366349 -0.00809462 0.925214 0.0217587 0.378822 -0.041357 0.152749 0.285577 0.241612 0.549735 0.799634 --0.00216024 0.121106 0.286293 -0.475994 -0.0465764 0.878214 -0.0289011 0.254544 -0.249942 0.0392622 0.359335 -0.932382 -0.177127 -0.00459778 0.187821 0.586543 -0.625881 0.514043 -0.134528 0.153934 -0.240829 0.428617 0.00371885 -0.903479 -0.1257 0.0240427 -0.210368 0.364999 -0.484992 -0.794706 --0.204303 0.216746 0.00970041 -0.955007 0.222603 0.195986 -0.0456832 0.0639411 0.278637 -0.144294 -0.369694 0.917881 --0.213312 0.1845 0.00215864 -0.797626 0.29393 0.526686 -0.0540522 0.0479255 0.272874 -0.18444 -0.525307 0.830683 -0.160049 0.204021 -0.222174 0.512778 0.193428 -0.836448 --0.00880205 0.0459353 0.276114 -0.110727 -0.291127 0.950255 --0.257914 0.168868 -0.00334007 -0.0600869 0.345495 0.936495 --0.145968 -0.00782131 -0.0496809 -0.670747 -0.72704 -0.146668 -0.0386729 -0.360218 -0.169579 0.968024 -0.146687 -0.203503 -0.119617 0.275819 -0.216022 0.383161 0.435093 -0.81479 --0.0216191 -0.435536 -0.212166 0.529754 -0.397216 -0.749386 -0.0363742 0.0468181 0.266084 0.0647551 -0.474622 0.877805 -0.0496439 0.344907 0.176858 0.0194849 0.699483 0.714384 -0.0230073 0.0317664 0.264587 0.249025 -0.411592 0.876686 -0.206717 -0.0418324 0.00777585 0.673404 -0.738768 -0.0273483 --0.168382 -0.171894 -0.0245341 -0.102721 0.850544 0.515774 -0.00113951 0.0297256 0.2699 0.0799664 -0.468266 0.879961 -0.147841 -0.0915004 -0.0215278 0.794409 -0.503865 -0.339167 --0.0248901 0.137814 0.267648 -0.713964 0.299426 0.632929 -0.0116486 -0.0575933 0.194228 -0.145166 -0.860355 0.488586 -0.139711 -0.124108 -0.0192113 0.861065 -0.0449404 -0.506504 -0.254454 0.213889 -0.115606 0.876742 0.127127 -0.463857 -0.127541 -0.0410204 0.184477 0.403339 -0.789421 0.462745 -0.157108 -0.173885 -0.00646125 0.879583 0.263402 -0.396172 -0.258416 0.172306 -0.11822 0.89627 0.0670973 -0.438404 --0.164975 -0.191162 0.00141382 -0.088689 0.726681 0.681226 -0.00985293 0.0158373 0.258746 0.114187 -0.531017 0.839632 -0.163918 -0.212391 -0.0143949 0.890502 0.176392 -0.419395 -0.0874649 0.0288999 0.262208 0.0522174 -0.604174 0.795139 --0.263286 -0.273437 0.00141925 -0.785375 0.210448 0.582149 -0.103996 0.13114 0.254021 0.534877 0.616272 0.578028 -0.122448 -0.363842 0.0107614 0.936378 -0.305903 0.172106 -0.122008 -0.378543 -0.00546169 0.985338 -0.0777071 0.151888 -0.105233 0.116611 0.265904 0.473602 0.455381 0.753877 -0.129361 -0.411252 -0.0182952 0.906389 0.290528 0.306679 --0.0560464 0.088287 0.244539 -0.808542 0.219779 0.545854 -0.119447 0.0560777 0.267301 0.404131 -0.234158 0.884222 --0.154985 0.0909047 -0.192241 -0.185278 -0.0596391 -0.980875 -0.0545125 0.0347673 0.260632 -0.125599 -0.526825 0.840643 -0.0473751 0.171763 0.256062 0.291017 0.81593 0.499567 --0.111523 -0.496951 0.00231683 0.112292 -0.991951 -0.0585181 -0.0377647 0.165295 0.273817 0.188006 0.80503 0.562655 -0.0289906 0.172917 0.260599 0.0333146 0.867687 0.495994 --0.0152708 0.153859 0.266656 -0.597078 0.602782 0.529293 -0.109485 0.414945 -0.0121747 -0.0960589 0.995347 0.00758761 --0.0389276 0.112911 0.258651 -0.755879 0.214606 0.618539 -0.12307 0.0864671 0.26691 0.487118 0.14586 0.86107 --0.105071 0.368647 0.00163088 -0.493337 0.86949 0.024608 -0.130339 0.101896 0.257171 0.533008 0.386696 0.752574 --0.186084 0.335902 -0.00966328 -0.146003 0.775004 0.614859 --0.201233 0.340584 -0.0170468 0.00339142 0.777957 0.628308 -0.201832 0.00328792 0.165669 0.675065 -0.59026 0.442585 --0.20212 0.322873 -0.00450872 -0.304024 0.341473 0.889362 --0.204239 0.284105 -0.00938548 -0.59677 -0.107431 0.795188 -0.0139194 0.227944 -0.258145 -0.0550919 0.241303 -0.968885 --0.10843 0.0216801 0.18134 -0.779634 -0.0996474 0.618257 --0.250643 -0.301428 -0.237761 -0.716682 -0.340575 -0.608585 -0.287358 0.209449 -0.0129997 0.972523 -0.225935 -0.0561418 --0.208845 0.203637 0.000532431 -0.876326 0.243927 0.415393 --0.00386915 0.164714 0.261231 -0.441986 0.786875 0.43067 --0.286522 0.184625 -0.0100051 -0.429837 0.0711299 0.9001 --0.251087 -0.148566 -0.171289 -0.0482658 0.537536 0.841858 --0.0588993 -0.0781179 -0.0201142 -0.519106 -0.844509 -0.131654 -0.0645046 0.164669 0.254557 0.472766 0.723446 0.503109 --0.0449544 0.046562 0.259989 -0.608756 -0.157959 0.777473 -0.0343722 -0.357924 -0.188427 0.942953 -0.179684 -0.280273 --0.082441 -0.181974 -0.00266465 -0.144541 0.920508 0.363005 --0.249861 -0.235665 -0.00337516 -0.668711 0.454741 0.588248 -0.214548 0.104402 0.192907 0.602642 0.26451 0.752899 -0.150702 -0.308149 -0.00758471 0.872623 -0.44852 -0.193283 -0.145438 0.0955517 0.249444 0.575371 0.347257 0.740514 --0.275655 -0.334262 -0.014411 -0.913536 -0.0961251 0.395236 -0.0566155 0.237377 -0.252697 0.162595 0.307761 -0.937468 -0.127624 -0.447745 -0.00283405 0.689318 0.0329957 0.723707 --0.141266 0.155084 -0.206182 -0.546055 0.0059224 -0.837729 -0.102481 0.0327548 0.262512 0.198603 -0.527846 0.825794 -0.134066 0.305227 0.188028 0.371608 0.457022 0.808108 -0.102174 -0.495607 -0.011069 0.175589 -0.943298 0.281705 -0.00519471 -0.491575 -0.0145081 -0.250365 -0.909428 -0.332051 -0.0578924 0.0151936 0.25319 0.05944 -0.267497 0.961723 --0.232611 -0.387409 -0.204703 -0.742819 -0.423237 -0.51874 -0.0186525 -0.271785 -0.214473 0.87702 0.310577 -0.366577 -0.152961 0.0752985 0.248854 0.596371 0.0734619 0.79934 -0.025531 -0.274608 -0.195521 0.927125 0.321856 -0.191961 -0.0723259 -0.0637082 0.178206 0.182309 -0.899372 0.397358 --0.0182099 -0.000459777 0.247603 -0.152326 -0.630777 0.760866 -0.31329 0.457235 -0.0262922 0.909288 0.411801 -0.0601233 --0.241974 0.34187 -0.0906769 0.00699688 0.82393 -0.566648 -0.0855196 0.195201 -0.256286 0.277386 0.141553 -0.950274 -0.0514574 0.414544 0.00302113 -0.0192021 0.998858 0.04374 --0.047879 0.395762 -0.0189187 -0.360456 0.931192 -0.0543359 --0.0929768 0.374472 -0.0280211 -0.459294 0.884038 -0.0867531 -0.0321875 -0.0119235 0.245649 -0.190814 -0.467187 0.863323 -0.229631 0.0481832 0.166532 0.803602 -0.335269 0.49175 --0.00081306 0.173708 0.246823 -0.353664 0.692344 0.628952 -0.059623 0.190228 0.233383 0.294382 0.28792 0.911286 --0.218091 0.297598 -0.0149483 -0.438162 -0.197814 0.87686 -0.310184 0.274937 -0.00885202 0.962427 -0.270604 0.0225424 -0.0402112 0.182462 0.242985 0.168265 0.648253 0.7426 --0.0553877 0.106586 0.235931 -0.842789 0.2955 0.449873 --0.0666095 0.0771132 0.232402 -0.850271 0.227459 0.47466 -0.193728 0.22681 -0.189334 0.636148 0.272139 -0.721981 --0.0835892 0.289429 0.184002 -0.470721 0.459541 0.753156 --0.29846 0.19774 -0.016388 -0.586373 -0.0540085 0.808239 --0.278071 0.201231 -0.0139108 -0.0144076 0.266167 0.963819 --0.238102 0.200782 -0.0159252 -0.136573 0.298861 0.944473 -0.00222667 0.187801 0.239061 -0.200362 0.391152 0.898251 --0.0185441 0.177805 0.236042 -0.418216 0.328787 0.846755 --0.26317 0.125268 -0.0120096 -0.788847 -0.582175 0.196959 --0.219448 0.0826445 0.00328644 -0.704557 -0.650487 0.283665 --0.0277922 0.162201 0.235786 -0.640618 0.421472 0.641849 -0.183057 0.0921622 0.220973 0.573589 0.312972 0.756997 -0.0985119 0.207372 -0.249908 0.32427 0.196997 -0.925225 -0.143102 -0.10623 -0.0175171 0.873573 -0.233323 -0.427119 --0.0411022 -0.0935026 -0.00152427 -0.669412 -0.727387 -0.150986 --0.267032 -0.125195 -0.179032 -0.128238 0.102604 0.986422 --0.0155464 -0.119525 -0.0208886 -0.780343 -0.387044 -0.491185 --0.0151723 -0.137128 -0.014704 -0.864288 0.022397 -0.502498 -0.147926 0.0445308 0.24738 0.529579 -0.302613 0.792446 --0.0636672 -0.0303651 0.191135 -0.48492 -0.679207 0.550937 --0.0235059 -0.15524 -0.00825123 -0.748754 0.582768 -0.31583 --0.234763 0.303202 -0.129751 -0.16393 0.56737 -0.806981 --0.0694677 -0.176572 -0.0157032 -0.219369 0.937101 0.271513 --0.136457 -0.182406 -0.00625967 -0.0335461 0.798582 0.600951 -0.037723 -0.028138 0.23509 -0.131101 -0.613912 0.778411 --0.184527 -0.194552 0.00141385 -0.190082 0.720147 0.667276 --0.273113 -0.288385 -0.00974686 -0.873061 0.0945426 0.478358 --0.276745 -0.313055 -0.0147551 -0.908465 -0.00340583 0.417948 --0.270077 -0.354712 -0.00907051 -0.891492 -0.207123 0.402917 --0.268084 -0.381548 -0.029133 -0.894359 -0.379984 0.236081 --0.29365 -0.229058 -0.213241 -0.925552 -0.306297 -0.222566 -0.140478 -0.442628 -0.0162356 0.756223 0.231206 0.612103 -0.0295167 0.233324 0.232163 0.028726 0.133051 0.990693 -0.00824108 0.228754 0.232452 -0.0594443 0.131512 0.989531 -0.0208194 0.246192 0.230118 -0.0203527 0.204437 0.978668 -0.0576339 0.211279 0.231237 0.192005 0.0831854 0.977862 -0.0400239 0.218786 0.233223 0.0863137 0.0960333 0.991629 --0.0279215 0.22476 0.227762 -0.23345 0.101249 0.967083 --0.255549 0.346721 -0.0829393 -0.0426053 0.843925 -0.534767 -0.173733 0.246725 0.185906 0.464957 0.0348564 0.884647 -0.095305 0.18016 0.217156 0.514171 0.162436 0.842166 --0.041218 0.153833 0.227097 -0.704416 0.253003 0.663164 -0.159746 0.0882326 0.240986 0.600681 0.267923 0.753259 -0.217284 0.481749 -0.00915814 -0.500492 0.862803 0.0712693 --0.0782342 0.0458152 0.222619 -0.821273 0.0282437 0.569837 -0.320159 0.438637 -0.024964 0.957409 0.288366 0.0145736 --0.00194374 0.319545 0.195489 -0.144303 0.591799 0.793064 -0.127855 0.417951 -0.0096776 -0.304159 0.951984 0.0348325 --0.0351231 -0.0145747 0.228071 -0.315966 -0.67708 0.664626 -0.324208 0.417952 -0.0197647 0.971375 0.138716 0.192843 --0.0629558 0.389167 -0.0248792 -0.39873 0.91368 -0.0787559 --0.134991 0.351782 -0.0120872 -0.45524 0.889749 0.033218 --0.153283 0.34371 -0.0138498 -0.341143 0.931082 0.129257 --0.239323 0.345539 -0.0217005 -0.0704661 0.617546 0.783372 --0.180433 0.342417 -0.0248469 0.0321285 0.97298 0.228643 -0.0628509 -0.0408539 0.22334 0.121821 -0.769001 0.627532 -0.0245133 0.285697 0.217543 -0.0233704 0.400686 0.915917 --0.0215206 0.270685 0.21812 -0.201475 0.340787 0.918298 --0.238721 0.308647 -0.0206621 -0.280641 -0.185924 0.941633 --0.209782 0.260992 -0.0150838 -0.564238 0.00536325 0.825594 --0.315882 0.24243 -0.0259916 -0.69268 -0.0732521 0.717515 --0.216311 0.239592 -0.0172459 -0.509187 0.124946 0.851538 --0.00500587 0.264369 0.223387 -0.128624 0.303365 0.944153 --0.0181405 0.252199 0.22462 -0.188656 0.246919 0.950495 --0.227345 0.220856 -0.0186311 -0.288316 0.213022 0.933539 --0.0226483 0.207105 0.229984 -0.235188 0.0656493 0.96973 --0.0530019 0.208433 0.220289 -0.39027 -0.00673088 0.920676 --0.216374 -0.137024 -0.220585 0.939673 0.339177 0.044422 --0.0290655 0.188614 0.229319 -0.340983 0.0841011 0.9363 -0.163519 -0.165688 0.02552 0.953579 0.279294 -0.112618 -0.00857035 -0.0260015 0.229382 -0.157402 -0.612399 0.77472 --0.0460211 0.189451 0.22264 -0.41088 -0.0280537 0.911258 -0.285911 0.140672 -0.0135165 0.99734 0.014486 -0.0714294 --0.224157 0.0820098 -0.0168873 -0.722792 -0.680642 0.119576 --0.069575 0.0896291 0.217015 -0.865088 0.263637 0.426753 --0.00796255 -0.0263704 0.225328 -0.184083 -0.684375 0.70551 -0.0557685 0.287508 0.216062 0.0774834 0.393419 0.916088 -0.225634 -0.0194505 -0.0246108 0.728105 -0.673796 -0.125942 -0.0996443 -0.0503879 -0.142436 0.243957 -0.83941 -0.48567 -0.0406204 0.278605 0.22062 0.0286166 0.35695 0.933685 --0.00617896 0.29523 0.210034 -0.15288 0.463051 0.873047 -0.011576 0.275215 0.221376 -0.0692439 0.349808 0.934259 --0.292987 -0.0936906 -0.203897 -0.906838 0.32249 0.271377 --0.0567736 0.178341 0.215914 -0.509296 -0.106689 0.853953 --0.27327 -0.268381 -0.0160193 -0.860182 0.205602 0.466706 -0.155476 -0.289362 -0.0186778 0.885996 -0.325614 -0.330131 -0.126124 -0.356817 -0.00551262 0.95666 -0.291021 0.0104024 -0.123408 -0.371866 -0.0203383 0.998598 -0.0486322 -0.0209073 --0.272414 -0.364852 -0.0223455 -0.913896 -0.283447 0.290606 -0.125172 -0.392641 -0.0198485 0.980774 0.153786 0.120134 --0.0526944 0.140367 0.21761 -0.762959 0.163871 0.625331 --0.206448 -0.476807 -0.15975 -0.721532 -0.588765 -0.364345 -0.133093 -0.476772 -0.00971502 0.587234 -0.294955 0.753762 --0.106647 0.00308332 0.176257 -0.733788 -0.353836 0.579961 -0.0101973 0.293007 0.213569 -0.0838398 0.442105 0.893037 -0.118602 -0.496621 -0.0233321 0.145718 -0.957628 0.248424 --0.131297 -0.495754 -0.000402802 -0.0363721 -0.999237 -0.0142572 -0.286843 0.493176 -0.0185566 0.510512 0.859481 -0.0258745 --0.0545357 0.283722 0.202219 -0.345115 0.421417 0.838632 -0.235021 0.49005 -0.0239105 -0.375483 0.908789 -0.181972 -0.0968391 0.250812 0.218643 0.290957 0.103693 0.9511 -0.0993785 0.269495 0.214627 0.266153 0.231263 0.935778 --0.0803413 0.202511 0.206491 -0.478761 -0.088011 0.873523 -0.325142 0.350044 -0.0225808 0.99806 -0.0620838 0.00477569 --0.06588 0.216004 0.214535 -0.428906 0.00891286 0.903305 --0.0651598 0.195165 0.213695 -0.459647 -0.0933784 0.883179 --0.257066 0.344188 -0.0232745 -0.112282 0.469244 0.875901 --0.277227 0.346224 -0.0272202 -0.146185 0.487723 0.860672 -0.115083 0.174939 0.2082 0.397814 0.165038 0.9025 --0.259001 0.30852 -0.0246436 -0.0896672 -0.104177 0.990508 --0.081452 0.00313258 0.205238 -0.667037 -0.408701 0.622917 -0.199903 0.108028 0.201229 0.486331 0.417731 0.767452 -0.187245 0.0569986 0.219438 0.652428 -0.161309 0.740484 --0.250865 0.291494 -0.0259674 -0.0973472 -0.0942528 0.990777 --0.0891199 0.038654 0.207252 -0.825732 0.0439867 0.562345 --0.0241989 -0.0274116 0.219475 -0.262063 -0.704693 0.659341 --0.22019 0.275763 -0.0203497 -0.401487 -0.0988595 0.910514 -0.064074 0.305391 0.206385 0.0887283 0.492315 0.865883 --0.104125 -0.0149348 0.164847 -0.680067 -0.520685 0.516135 --0.226919 0.25445 -0.0237809 -0.30649 0.0377658 0.951124 --0.0647646 0.251375 0.210122 -0.395465 0.232354 0.888605 --0.235989 0.236648 -0.0241834 -0.171645 0.153746 0.973088 -0.15039 0.13851 0.202713 0.423162 0.443953 0.789835 --0.21537 -0.293865 -0.270122 -0.464 -0.286729 -0.838147 -0.194366 0.0936946 0.212116 0.564202 0.290177 0.772964 --0.0758574 0.0706785 0.217804 -0.867899 0.26651 0.419195 -0.101093 0.143238 -0.254703 0.331821 -0.0186283 -0.943158 -0.00640628 0.307448 0.204964 -0.108277 0.523638 0.845032 -0.113861 0.258394 0.211895 0.342349 0.124857 0.93124 -0.11747 0.225318 0.210526 0.420288 -0.117882 0.899701 -0.123582 0.209873 0.203885 0.435933 -0.125311 0.891212 -0.0898237 0.108862 -0.255567 0.278474 -0.165499 -0.946077 --0.0849371 0.0672588 0.199462 -0.873817 0.287947 0.391829 --0.2121 -0.0998785 -0.212562 0.93562 -0.331733 0.120698 -0.277334 0.0786376 -0.0387779 0.966044 -0.212384 -0.147144 --0.0878234 0.0196559 0.206511 -0.757448 -0.201576 0.620999 -0.163611 -0.0685834 -0.039078 0.588524 -0.766623 -0.256766 --0.0293722 -0.103067 -0.0147984 -0.750889 -0.610666 -0.251501 -0.140017 -0.155261 -0.0255186 0.781671 0.233342 -0.578396 --0.0304676 -0.0384738 0.203891 -0.303435 -0.74714 0.591362 --0.00966769 -0.163239 -0.0355755 -0.495567 0.70501 -0.507321 -0.151933 -0.185967 -0.0229419 0.815551 0.25297 -0.520463 --0.0015052 -0.0484203 0.203781 -0.219482 -0.782143 0.583164 -0.157025 -0.218513 -0.0290646 0.835273 0.159489 -0.526195 --0.271854 -0.248368 -0.0248625 -0.832861 0.339312 0.437275 -0.0812628 0.304587 0.204509 0.153221 0.475404 0.866322 --0.219275 0.131556 -0.171217 -0.495327 0.589307 -0.638254 --0.0810419 0.242214 0.204295 -0.469814 0.171649 0.865917 -0.138903 -0.426486 -0.0254897 0.828526 0.414458 0.376523 --0.0506793 0.310031 -0.203861 -0.338894 0.602908 -0.722256 -0.19058 0.121013 0.196596 0.323956 0.571657 0.75383 --0.0729727 -0.16182 -0.145692 0.347849 0.935145 -0.067118 -0.197274 0.0203046 0.190611 0.674309 -0.479058 0.56197 -0.294146 0.481747 -0.0316058 0.616211 0.700288 -0.360389 -0.0543083 0.31894 0.198413 0.0531826 0.576976 0.815028 -0.323217 0.411924 -0.0380121 0.96749 0.11783 -0.223785 -0.0422666 0.332077 0.188824 0.0099858 0.650688 0.75928 --0.0319106 0.30381 0.199018 -0.251495 0.52455 0.813386 -0.114318 0.411397 -0.0454839 -0.135735 0.969846 -0.202422 --0.0734267 0.279891 0.19542 -0.431446 0.407949 0.804632 --0.0495569 0.300897 0.19426 -0.328435 0.51247 0.793413 --0.0312322 0.400839 -0.031117 -0.309995 0.945454 -0.100101 --0.229504 -0.109176 -0.187006 0.611789 -0.261683 0.746483 -0.136022 0.195613 0.198237 0.402083 0.0229791 0.915315 --0.142387 0.348314 -0.0288729 -0.363915 0.931339 -0.013185 --0.0934398 0.191306 0.197151 -0.505231 -0.187129 0.842451 -0.0925249 0.129796 -0.256965 0.302405 -0.0665618 -0.950853 --0.0944123 0.17288 0.19043 -0.52383 -0.33969 0.781161 --0.067058 0.133129 0.204258 -0.75003 0.137897 0.646869 --0.0838081 0.0883785 0.19115 -0.837921 0.135388 0.528733 --0.0230548 0.288792 0.209903 -0.204952 0.438999 0.8748 --0.00563039 -0.0578948 0.187541 -0.20055 -0.846765 0.492715 --0.0950624 0.252157 0.193386 -0.523446 0.238516 0.817994 --0.0954442 0.233714 0.197322 -0.515731 0.122518 0.847945 -0.134113 0.227569 0.202423 0.427602 -0.140771 0.892939 --0.240412 0.271358 -0.0262836 -0.147378 -0.0470333 0.987961 -0.166409 0.166705 0.190765 0.397827 0.192416 0.897056 --0.310762 0.258155 -0.0236364 -0.420986 0.0353301 0.906379 -0.305935 0.264805 -0.0289161 0.939486 -0.317039 -0.129817 --0.107101 0.0409229 0.181243 -0.770016 0.213803 0.601136 --0.246503 -0.424465 -0.128433 -0.867311 -0.461016 -0.18771 --0.0803862 -0.0230166 0.183978 -0.573224 -0.60786 0.549473 --0.0721569 -0.0147797 0.200486 -0.570093 -0.563497 0.597884 --0.309682 0.210839 -0.0248014 -0.785512 -0.157077 0.59858 --0.265931 0.128623 -0.031273 -0.789023 -0.611444 -0.0598294 -0.272341 0.0585193 -0.0347163 0.936704 -0.321661 -0.138275 --0.018859 -0.048572 0.195749 -0.265965 -0.789143 0.553639 -0.164214 0.233667 0.190877 0.427808 -0.126976 0.894906 --0.0428989 -0.0890278 -0.0171313 -0.607093 -0.781318 -0.144845 --0.120322 0.193089 0.180645 -0.53933 -0.167439 0.82528 --0.15452 -0.178646 -0.0124041 -0.0553218 0.807596 0.587136 --0.211894 -0.183114 -0.0257077 -0.378841 0.76777 0.516728 --0.106929 0.201299 0.190671 -0.527981 -0.109522 0.842164 -0.19269 0.160139 0.177007 0.383731 0.239946 0.891727 --0.0638793 0.151076 0.206353 -0.66691 -0.07327 0.741528 -0.0245669 -0.498504 0.05006 0.0470886 -0.99889 0.00130142 --0.224783 -0.457012 -0.0276624 -0.801636 -0.533629 0.269479 --0.177146 -0.0208556 -0.164749 0.701218 -0.594571 0.39342 -0.193535 0.00719141 0.182172 0.647439 -0.571869 0.503775 -0.209127 0.018678 0.173206 0.712921 -0.510147 0.481139 -0.0782791 -0.0546427 0.194882 0.229996 -0.866887 0.442277 -0.0105838 -0.48598 -0.0308141 -0.563995 -0.816252 -0.125069 -0.0433325 -0.0603735 0.194063 0.0148322 -0.895218 0.445381 --0.0974132 -0.493422 -0.0330539 0.354888 -0.920607 0.1629 --0.126597 0.241025 0.174215 -0.614467 0.20117 0.762863 --0.118732 0.230623 0.182335 -0.58073 0.125034 0.804437 -0.055684 -0.498797 -0.0315822 0.00406057 -0.999937 0.010426 -0.0218396 -0.498008 -0.0236355 -0.308553 -0.949682 -0.0538432 -0.160052 0.214808 0.187843 0.397916 -0.165859 0.902305 --0.108468 0.162017 0.174606 -0.473819 -0.418127 0.775027 -0.265229 0.486173 -0.0436774 0.115061 0.815443 -0.567286 -0.302177 0.465966 -0.041381 0.69723 0.530629 -0.481979 --0.0925371 0.156593 0.182679 -0.59522 -0.329313 0.732985 --0.232703 -0.414943 -0.179283 -0.787527 -0.441082 -0.430404 -0.228374 0.0944793 0.182019 0.734573 0.0789768 0.673918 --0.122741 0.358227 -0.0218747 -0.475916 0.87878 -0.03536 -0.0688367 0.387527 -0.124951 0.102434 0.893354 -0.437522 --0.226754 0.352278 -0.0396106 0.155142 0.973134 0.170123 --0.243593 -0.386682 -0.187821 -0.795845 -0.419164 -0.436959 -0.0268373 -0.0565644 0.200183 -0.0924711 -0.867083 0.489505 --0.312913 0.334157 -0.0359745 -0.716958 0.419504 0.556766 -0.00659569 0.33346 0.185342 -0.109814 0.663572 0.740009 -0.12599 0.321956 0.180467 0.329157 0.584979 0.741252 -0.160274 0.281415 0.185786 0.453375 0.327513 0.828967 -0.181832 0.258674 0.180127 0.491651 0.195626 0.848534 --0.11947 0.25648 0.174655 -0.595566 0.294632 0.747324 --0.0450284 0.19426 -0.252069 -0.305666 0.110242 -0.945735 --0.0848789 0.107104 0.185805 -0.753307 0.0977348 0.650366 -0.147586 -0.0802691 -0.0418698 0.62393 -0.694533 -0.358241 -0.133712 -0.0453376 0.17136 0.412746 -0.795548 0.443558 --0.0335564 -0.0942153 -0.030638 -0.586483 -0.764646 -0.267123 -0.0643244 0.348679 0.172273 0.0579475 0.713493 0.698262 -0.197261 0.178003 0.171684 0.341519 0.12547 0.931462 --0.163957 0.300961 0.0598665 -0.818128 0.511175 0.263376 --0.00223001 -0.13371 -0.0319821 -0.716086 -0.0699874 -0.694495 --0.0128234 -0.0386295 0.211371 -0.236912 -0.73284 0.637822 --0.011911 -0.149717 -0.0242628 -0.719361 0.361638 -0.593074 --0.224385 -0.382627 -0.218986 -0.683393 -0.416576 -0.599532 --0.163192 0.332713 -0.0871511 -0.0285074 0.922626 -0.384642 --0.174628 -0.182026 -0.0108249 -0.14165 0.784169 0.604164 -0.147411 -0.0289343 0.185403 0.46682 -0.740987 0.482719 -0.148273 -0.244685 -0.0473805 0.778265 0.0159028 -0.627734 --0.0362411 -0.0473788 0.188016 -0.330842 -0.78574 0.522643 -0.152113 -0.0131511 0.202341 0.494957 -0.653263 0.572944 --0.281457 -0.303321 -0.0261371 -0.939094 0.0113796 0.343471 --0.282694 -0.326871 -0.0323898 -0.958044 -0.0867914 0.273166 -0.061516 -0.231458 0.17562 0.0357394 -0.0214663 0.999131 --0.1324 0.224805 0.172907 -0.619304 0.112117 0.777105 --0.198421 0.30684 -0.129809 0.01015 0.677881 -0.735102 -0.135823 -0.218219 -0.0545929 0.678398 0.182061 -0.71178 --0.0364726 0.0177338 -0.209663 -0.282027 -0.586787 -0.75904 -0.232189 0.122442 0.172069 0.66377 0.208372 0.718325 --0.0953279 0.0738423 -0.217995 -0.441581 -0.356445 -0.823379 --0.196439 -0.492983 -0.061522 -0.348126 -0.934337 0.0763098 -0.226629 0.0609962 0.178338 0.788101 -0.249071 0.562904 -0.312675 0.447416 -0.0410894 0.841911 0.369417 -0.39334 -0.164046 0.439604 -0.0307296 -0.601359 0.789996 -0.119473 -0.148954 0.427763 -0.0346494 -0.556338 0.820561 -0.131025 -0.112031 0.193975 0.207592 0.430558 -0.0128249 0.902472 --0.287887 0.356205 -0.0426455 -0.259541 0.925588 0.275545 --0.161107 0.343631 -0.0299899 -0.150669 0.987313 0.0501139 --0.325311 0.27633 -0.0491707 -0.999189 -0.0374324 0.0148334 -0.221533 0.030203 0.165163 0.769328 -0.440056 0.463125 -0.287661 0.218158 -0.0307565 0.94536 -0.284133 -0.159884 --0.0531331 -0.0435023 0.181776 -0.408229 -0.761653 0.503224 --0.0994392 0.0573671 -0.207752 -0.436242 -0.426068 -0.792565 -0.0330122 -0.274089 0.168916 -0.119984 -0.229018 0.965999 -0.167962 0.0818837 -0.2119 0.554081 -0.230182 -0.800007 -0.136549 -0.0957219 -0.0373846 0.718419 -0.463992 -0.518252 --0.0360612 -0.086335 -0.0480252 -0.44005 -0.843216 -0.308776 -0.115457 0.337147 0.171282 0.287877 0.661816 0.692189 -0.0385941 0.0865858 -0.258308 0.0207874 -0.282917 -0.958919 -0.129891 -0.131342 -0.0329125 0.755318 -0.008573 -0.655303 -0.00294963 -0.150309 -0.0392033 -0.635384 0.361715 -0.682239 --0.183247 -0.16675 -0.0372685 -0.175731 0.881134 0.439 --0.189636 -0.176661 -0.022867 -0.220071 0.813943 0.537648 -0.0146739 0.0641159 -0.249576 -0.0891497 -0.373779 -0.923224 --0.0774065 -0.169662 -0.0355448 -0.00880983 0.943795 0.330413 -0.203555 0.222619 0.170028 0.487689 -0.0111876 0.872946 -0.208722 0.162056 0.171114 0.321007 0.228497 0.919099 --0.286317 -0.276295 -0.0465213 -0.961359 0.104299 0.254775 -0.217355 0.18114 0.16534 0.380975 0.100173 0.919143 --0.127102 0.16001 0.164331 -0.375058 -0.374308 0.848072 --0.0973701 0.369032 -0.0485973 -0.454458 0.875037 -0.166667 -0.135628 -0.414345 -0.0367709 0.849921 0.511895 0.124893 --0.110004 0.125493 0.16374 -0.580286 0.0154274 0.814266 -0.239374 0.0877179 0.167637 0.82282 -0.0653997 0.564526 -0.259875 0.191841 -0.111037 0.901852 0.104699 -0.419167 --0.0946973 0.0920122 0.178864 -0.694929 0.0239596 0.718679 --0.136545 -0.494592 -0.0442528 -0.0425566 -0.999087 0.00382002 -0.0857557 -0.498435 -0.0358235 0.015428 -0.999309 0.0338151 -0.28516 0.478085 -0.0448777 0.421117 0.686321 -0.592979 --0.119622 0.0327279 0.16737 -0.772012 0.0491103 0.633708 -0.319665 0.429361 -0.0391817 0.924705 0.242449 -0.293494 -0.17588 -0.0163265 0.173388 0.570785 -0.688337 0.447657 --0.2448 0.355058 -0.0366727 0.0950232 0.94174 0.322639 --0.273522 0.357547 -0.0563745 -0.0547265 0.986196 -0.156277 --0.14353 0.346864 -0.0462872 -0.307167 0.943639 -0.123259 --0.210999 0.349591 -0.0480739 0.204108 0.978725 -0.0209314 --0.267299 -0.0930153 -0.17857 -0.317165 -0.0713509 0.945683 --0.321558 0.317162 -0.0428383 -0.935921 0.220264 0.274838 -0.312278 0.284031 -0.0267097 0.956373 -0.272151 -0.106226 --0.316844 0.22467 -0.0356333 -0.928552 -0.224109 0.295917 -0.283648 0.199466 -0.0299906 0.983232 -0.121208 -0.136248 -0.280932 0.18785 -0.0432882 0.983891 -0.0224438 -0.177355 -0.237354 -0.00523532 0.0632638 0.762294 -0.629139 0.151964 -0.279079 0.11145 -0.055667 0.974899 -0.0883509 -0.204366 -0.0620028 -0.161926 0.163337 -0.0061155 0.359345 0.933185 -0.255471 0.0223195 -0.035251 0.852183 -0.502464 -0.145991 -0.080066 -0.189007 0.169759 0.206293 0.21162 0.955333 --0.047018 -0.0838014 -0.0338939 -0.532382 -0.82989 -0.16689 -0.132934 -0.0857846 -0.0532761 0.549432 -0.669625 -0.499727 -0.0329949 -0.190151 0.167408 -0.308512 0.229004 0.923243 -0.123842 -0.114292 -0.0409738 0.672176 -0.21456 -0.708621 -0.0304333 -0.20716 0.169901 -0.313193 0.144279 0.938666 -0.128526 -0.146111 -0.0364791 0.703932 0.162235 -0.691491 -0.0143636 -0.136973 -0.0454631 -0.548364 0.0277415 -0.83578 -0.116324 -0.15759 -0.0489423 0.545886 0.22491 -0.807109 -0.0403753 -0.238487 0.17459 -0.158638 -0.0276327 0.98695 --0.205061 -0.0686834 -0.18214 0.686159 -0.559369 0.465072 --0.102423 0.107878 0.172456 -0.661667 0.0171007 0.749603 -0.146616 -0.208452 -0.0400016 0.755169 0.218425 -0.61807 --0.255992 -0.202232 -0.0505221 -0.7005 0.617431 0.357879 --0.117459 0.0512298 0.163833 -0.671197 0.213822 0.70977 -0.110555 -0.0636075 0.155077 0.321517 -0.839175 0.438647 -0.113597 -0.0535756 0.172596 0.33997 -0.83502 0.432623 -0.130965 -0.334748 -0.0312405 0.898766 -0.350629 -0.26321 -0.00872761 -0.0720532 0.163209 -0.106959 -0.906678 0.408037 -0.173872 0.101178 -0.21243 0.573751 -0.166235 -0.801982 -0.0789142 -0.159648 0.160461 0.214835 0.367551 0.904849 -0.16135 -0.473022 -0.0356527 0.852767 -0.0954278 0.513501 --0.0886283 0.254851 -0.218003 -0.46558 0.335066 -0.819125 --0.19271 -0.492802 -0.0426732 -0.350958 -0.931333 0.0971925 -0.182021 0.0731374 0.225987 0.640289 0.0382588 0.76718 --0.00126249 -0.211766 0.15345 -0.601146 0.192356 0.775643 --0.0399815 0.344815 0.160227 -0.290444 0.714966 0.635977 -0.192795 0.268019 0.170318 0.584135 0.318316 0.746633 -0.206731 0.276306 0.15246 0.668054 0.413213 0.618836 --0.10076 -0.498805 -0.0491581 0.162062 -0.973013 0.164261 -0.273701 0.472234 -0.0576314 0.29035 0.687534 -0.665578 --0.117194 0.144995 0.160052 -0.388637 -0.245057 0.888205 --0.101926 0.0760152 0.171822 -0.683714 0.0717993 0.72621 -0.173822 0.442665 -0.0505987 -0.573614 0.778668 -0.25425 -0.243483 0.048955 0.141539 0.841194 -0.357195 0.405961 --0.11571 -0.00252489 0.16007 -0.742356 -0.414508 0.526395 -0.0906515 0.411101 -0.0416738 -0.000594038 0.985418 -0.170152 --0.201056 -0.0482499 -0.16468 0.474943 -0.559714 0.67908 --0.000398747 -0.23106 0.157844 -0.542922 0.107118 0.832923 -0.00476161 -0.285369 0.158501 -0.375341 -0.207775 0.903299 --0.126923 0.354365 -0.0421676 -0.439931 0.890707 -0.114461 --0.173967 0.343179 -0.0415713 0.0500893 0.998327 -0.0288747 --0.305883 0.348325 -0.0482729 -0.642276 0.763101 0.071815 --0.00682678 0.281146 0.216559 -0.147176 0.391514 0.908326 --0.321201 0.311168 -0.0599596 -0.950192 0.183227 -0.252118 -0.312207 0.304381 -0.0513032 0.925316 -0.229574 -0.301804 -0.002479 0.356546 0.160465 -0.12512 0.767361 0.62889 -0.304704 0.270862 -0.0441978 0.91875 -0.307411 -0.247784 -0.049748 0.324434 -0.207225 0.13061 0.622271 -0.771829 --0.28924 0.165218 -0.0501804 -0.83885 -0.524904 -0.144246 --0.260015 0.125154 -0.0509454 -0.780653 -0.608262 -0.143519 --0.0291774 -0.0575996 -0.120669 -0.284682 -0.844364 -0.453879 -0.216659 0.267404 0.146918 0.711268 0.376879 0.593346 --0.149913 0.16428 0.155444 -0.541112 -0.274425 0.794914 -0.234064 0.155497 0.161104 0.577151 0.181887 0.796124 -0.233749 0.17899 0.157181 0.581931 0.138917 0.801285 -0.240689 0.0585674 0.154417 0.838769 -0.297023 0.456338 -0.246395 0.076921 0.153092 0.862822 -0.178141 0.473079 --0.0970975 -0.165856 -0.0400102 0.0863262 0.927572 0.363536 -0.215365 0.0153204 0.158845 0.731788 -0.531533 0.426566 -0.0152845 0.327238 -0.207219 -0.0291143 0.645373 -0.763313 --0.0907214 -0.0360502 0.153985 -0.565745 -0.70388 0.429518 -0.139735 -0.271954 -0.0539359 0.764036 -0.115056 -0.634831 --0.0578794 -0.0654771 0.13612 -0.40082 -0.852315 0.33601 --0.283132 -0.345146 -0.0466749 -0.9662 -0.20223 0.159878 --0.0248803 -0.0209591 -0.177715 -0.290278 -0.721138 -0.629046 --0.279862 -0.363277 -0.0595648 -0.949713 -0.30417 0.0743339 --0.272191 -0.38102 -0.0492779 -0.913827 -0.386978 0.123157 -0.152178 0.00805908 -0.183276 0.465771 -0.582626 -0.666036 --0.234452 -0.447558 -0.0420512 -0.837432 -0.506313 0.205802 -0.00937635 -0.102222 -0.0583027 -0.375047 -0.662643 -0.648262 --0.113407 0.359932 -0.0517238 -0.464305 0.868996 -0.171074 -0.0556678 -0.300959 0.157097 0.17096 -0.48404 0.858183 -0.0758841 0.369713 0.145725 0.099356 0.813288 0.573316 -0.0370305 0.366765 0.151432 -0.0303294 0.804969 0.592541 -0.089692 0.361433 0.153839 0.161308 0.777212 0.608211 -0.10919 0.361263 0.147056 0.270077 0.771344 0.57627 --0.0852171 0.335778 0.140615 -0.495707 0.697084 0.518024 -0.158116 0.336487 0.144409 0.512556 0.676409 0.528921 -0.0690219 0.00334053 -0.214117 0.120548 -0.590121 -0.798264 -0.0503154 0.411489 -0.0458328 -0.0161751 0.986643 -0.162092 -0.101573 0.408221 -0.0569972 -0.0238486 0.975192 -0.220073 --0.0386451 0.391944 -0.0663759 -0.331233 0.920286 -0.208227 -0.320684 0.395828 -0.0492918 0.93912 0.0553525 -0.339103 --0.0487767 0.393562 -0.0375826 -0.364167 0.922182 -0.13024 --0.113088 -0.496762 0.0377083 -0.00435614 -0.999926 -0.0113336 --0.254747 0.357312 -0.0510108 0.0856845 0.995572 -0.0386472 --0.290751 -0.0854661 -0.222722 -0.896206 0.435791 -0.0830752 -0.170553 0.321986 0.149884 0.554595 0.615491 0.559996 --0.0394215 0.291026 0.204338 -0.284883 0.457477 0.842352 -0.319241 0.354627 -0.053648 0.940464 -0.0574584 -0.335 -0.243499 0.106569 0.162217 0.811459 0.052068 0.582085 --0.0241143 -0.065006 0.16455 -0.251923 -0.874087 0.415339 --0.190852 0.344499 -0.0552914 0.180408 0.977863 -0.106004 --0.191661 0.345092 -0.0388348 0.16027 0.986256 0.0401716 --0.31723 0.331607 -0.0542858 -0.895521 0.422843 -0.13873 -0.244599 0.218833 -0.131393 0.843435 0.168012 -0.510284 -0.0249037 0.305467 0.207493 -0.0362649 0.498967 0.865862 --0.0867345 -0.0666458 0.0592781 -0.541969 -0.837632 0.0681293 -0.129105 -0.249637 0.147549 0.662107 -0.182941 0.726738 --0.0771943 -0.0631632 -0.0428391 -0.553116 -0.81933 -0.150869 -0.114634 -0.283124 0.144178 0.511965 -0.462142 0.724097 -0.116746 -0.136876 -0.044853 0.58501 0.0340814 -0.81031 -0.0299775 -0.130539 -0.0536744 -0.376045 -0.0810233 -0.923052 -0.0431611 -0.0404509 0.224716 -0.0428354 -0.738566 0.672819 --0.0369535 -0.471864 0.150955 -0.402264 -0.172954 0.899039 -0.164901 0.130767 0.199816 0.419982 0.508748 0.751526 --0.199709 -0.16494 -0.0506211 -0.269331 0.886728 0.375733 -0.140971 -0.190845 -0.0396804 0.723555 0.267763 -0.636216 -0.174158 0.331169 0.133429 0.594016 0.667237 0.449377 -0.136295 -0.235974 -0.0573385 0.676981 0.105392 -0.728415 -0.18739 0.306793 0.147891 0.620164 0.55751 0.551887 -0.126663 -0.351325 -0.023607 0.956354 -0.252574 -0.146948 --0.141244 0.260576 0.152807 -0.696844 0.349907 0.626079 --0.303413 -0.13527 -0.205045 -0.935617 0.130611 0.327966 --0.165706 0.216082 0.141647 -0.77893 0.155627 0.607493 -0.251579 0.188957 0.134944 0.837172 0.14382 0.527692 -0.17379 0.118619 0.20658 0.379737 0.642434 0.665641 -0.224349 0.00759339 0.131358 0.747278 -0.563837 0.351658 --0.00846581 0.00247137 -0.207005 -0.226483 -0.629809 -0.742998 -0.00589148 -0.486922 -0.0505419 -0.592509 -0.760642 0.265249 --0.0805907 -0.486869 -0.0480277 0.333731 -0.918717 0.211145 -0.155362 0.0679003 -0.215861 0.501894 -0.297005 -0.812337 -0.255259 0.478251 -0.0554775 0.036273 0.778953 -0.626032 -0.051085 -0.136221 0.150881 -0.139072 0.416299 0.898529 -0.141336 -0.237281 0.137318 0.761956 -0.0612994 0.644721 --0.00684042 -0.298495 0.150137 -0.420721 -0.229346 0.877721 -0.138633 0.41361 -0.0647132 -0.410214 0.854359 -0.319053 -0.033095 0.319399 -0.213141 0.0541901 0.608315 -0.791844 --0.268721 -0.0513125 -0.221145 -0.7599 0.612691 -0.217167 -0.288326 0.230331 -0.0456187 0.90516 -0.324618 -0.274425 --0.316697 0.239147 -0.0661619 -0.936915 -0.190372 -0.293171 --0.303619 0.19268 -0.0549533 -0.892961 -0.424603 -0.149444 -0.277325 0.194395 -0.0599538 0.967855 -0.0128146 -0.251181 --0.294532 0.178134 -0.0620104 -0.855586 -0.481307 -0.190569 -0.274091 0.0799286 -0.0578364 0.953762 -0.206308 -0.218576 --0.252762 -0.405608 -0.143064 -0.865211 -0.436033 -0.247559 --0.105931 -0.0372986 -0.0667763 -0.584353 -0.789441 -0.187923 -0.160145 -0.0655691 -0.0541119 0.539596 -0.785427 -0.303217 --0.0865912 -0.054136 -0.0556744 -0.575013 -0.799602 -0.173196 -0.0179923 0.365991 0.150807 -0.0804436 0.804026 0.589128 --0.124028 0.285821 0.154227 -0.628749 0.473053 0.617167 -0.00118448 -0.0416307 -0.161951 -0.195724 -0.81791 -0.541032 -0.174299 0.0547464 0.230241 0.633729 -0.170909 0.754439 -0.182724 -0.0598552 0.0512945 0.671206 -0.730191 0.127686 -0.103928 -0.131067 -0.0523783 0.418414 -0.0423492 -0.907269 --0.0828862 -0.0476424 0.14407 -0.524215 -0.762737 0.378722 -0.0141688 -0.0358085 -0.174426 -0.145601 -0.781952 -0.606095 --0.254801 -0.410186 -0.124207 -0.882142 -0.442256 -0.161973 -0.0541634 -0.0866948 0.145616 0.0389008 -0.587178 0.808522 --0.0981775 -0.157204 -0.0667503 0.0777965 0.963859 0.254803 -0.0367706 -0.0878265 0.143578 -0.149016 -0.642973 0.751252 --0.273801 -0.216183 -0.0724207 -0.85129 0.468159 0.236924 -0.114732 -0.167721 0.145638 0.583415 0.329183 0.742473 -0.0510449 0.265254 0.22436 0.0843555 0.277658 0.956969 -0.00685042 -0.150536 0.13651 -0.637177 0.355405 0.683881 --0.00238575 -0.178139 0.140565 -0.687222 0.299399 0.661881 --0.0284296 -0.22432 0.130347 -0.754456 0.233932 0.613247 -0.0740464 -0.322506 0.135355 0.336357 -0.624364 0.705006 -0.0535842 -0.31593 0.148242 0.213971 -0.556424 0.802876 -0.0402803 -0.326545 0.143977 0.160963 -0.558178 0.813958 --0.117798 -0.497423 -0.0369943 -0.031748 -0.998342 0.0480194 -0.0167955 -0.45287 0.145378 0.574701 0.238626 0.7828 -0.212355 0.458034 -0.0690102 -0.345726 0.769898 -0.536406 --0.0151736 -0.228131 0.145458 -0.667839 0.166359 0.725477 -0.254837 0.152708 -0.126441 0.880906 0.00705941 -0.473238 --0.237409 0.354507 -0.0562615 0.163427 0.9813 -0.101697 --0.0540719 -0.440634 0.13444 -0.573608 0.48128 0.66283 --0.270625 -0.270679 -0.228773 -0.808888 -0.330599 -0.486214 --0.225498 0.00996826 -0.192179 -0.731573 0.593192 -0.336041 -0.302501 0.301257 -0.0711591 0.844496 -0.217662 -0.489336 --0.322568 0.291606 -0.0630448 -0.952108 0.0476723 -0.302022 --0.0183451 -0.359672 -0.259502 0.532847 -0.271379 -0.801515 --0.144883 0.0726929 0.141287 -0.681595 -0.0808685 0.727247 --0.322607 0.257363 -0.0564269 -0.9737 -0.123656 -0.191358 -0.0703897 -0.0949096 0.138225 0.206235 -0.247966 0.946562 -0.281788 0.210018 -0.0475928 0.954132 -0.168682 -0.247342 --0.184321 0.00833791 -0.208965 0.431394 0.209553 -0.877489 -0.0266441 -0.10396 -0.0649545 -0.253241 -0.632651 -0.731862 --0.0900368 0.0402526 -0.202013 -0.395824 -0.514135 -0.760913 --0.0268788 -0.206612 0.12393 -0.786506 0.291242 0.544598 -0.0581574 -0.123873 -0.0607885 -0.0549532 -0.15422 -0.986507 --0.0157816 -0.193713 0.132813 -0.747949 0.291487 0.596329 --0.0334653 -0.260343 0.132879 -0.715368 0.0584122 0.696302 --0.0871749 -0.16244 -0.0527544 0.0788076 0.942943 0.323494 -0.101559 -0.162657 -0.0586544 0.387765 0.275252 -0.879702 -0.0985096 -0.178674 -0.0661666 0.353595 0.342545 -0.870421 --0.287814 -0.209043 -0.246971 -0.817629 -0.331675 -0.47061 -0.129566 -0.279612 0.133706 0.641082 -0.429771 0.635855 -0.134703 -0.284291 -0.0571265 0.764432 -0.162334 -0.623932 --0.292594 -0.295685 -0.0764261 -0.995366 -0.0287491 0.0917653 -0.123249 -0.333251 -0.0525512 0.860991 -0.237434 -0.4498 -0.122167 -0.349648 -0.0443626 0.939043 -0.170239 -0.298692 --0.0154504 -0.28291 0.147885 -0.55542 -0.104109 0.825027 --0.225428 -0.469342 -0.0720837 -0.794564 -0.605349 0.0471208 --0.018242 -0.496989 -0.107885 -0.0418389 -0.999119 0.00328565 --0.00130402 -0.492034 -0.0651239 -0.32571 -0.815286 0.478771 --0.0750865 0.0461565 -0.21313 -0.377265 -0.492452 -0.784323 -0.057873 -0.329431 0.136659 0.291602 -0.606629 0.739574 --0.057829 -0.429939 0.117728 -0.578523 0.655937 0.484827 -0.27751 0.456359 -0.0697876 0.390872 0.575255 -0.71854 -0.119061 0.401739 -0.0823095 -0.0845195 0.930758 -0.355733 -0.0804242 0.408671 -0.0575609 0.0338682 0.979397 -0.199084 --0.0145784 0.404143 -0.0436067 -0.246229 0.957222 -0.151978 --0.0425603 -0.426759 0.127965 -0.405741 0.705568 0.580989 --0.06656 -0.443398 0.122915 -0.749951 0.394456 0.531016 --0.124932 0.351406 -0.0623185 -0.427045 0.878032 -0.216082 -0.0980628 0.379167 0.124701 0.201548 0.851103 0.48477 --0.291499 0.353533 -0.0615545 -0.336844 0.881256 -0.331547 --0.175035 0.341058 -0.0614548 0.0959829 0.977971 -0.185364 --0.222831 0.350796 -0.0619428 0.196197 0.967555 -0.159197 --0.305964 0.341382 -0.0658697 -0.644596 0.612585 -0.457423 -0.187569 0.317177 0.135339 0.6395 0.620408 0.454019 -0.256027 0.211196 0.118616 0.884369 0.195 0.424107 -0.0635481 0.249305 0.226471 0.158739 0.17187 0.972246 --0.14744 0.0928705 0.142636 -0.656293 -0.080856 0.750161 --0.0119796 0.405071 0.0326758 -0.214133 0.971829 0.0984703 -0.256548 0.039122 -0.0699916 0.865918 -0.425842 -0.262384 --0.149234 0.0212329 0.123439 -0.835826 -0.332256 0.437038 --0.105091 -0.0402545 0.122924 -0.608576 -0.74087 0.28416 -0.173075 -0.0536744 -0.0645725 0.528725 -0.797918 -0.289443 -0.167272 0.0171485 -0.180161 0.514416 -0.54215 -0.664417 -0.105698 -0.126033 0.132217 0.543794 0.335289 0.769331 -0.146395 -0.251865 0.127655 0.78538 -0.172697 0.594435 --0.0142015 -0.311529 0.142419 -0.444253 -0.274727 0.852739 --0.124553 -0.258154 -0.291845 0.0229396 0.209956 -0.977442 -0.0419321 -0.115987 -0.061622 -0.195662 -0.368445 -0.908826 --0.127094 0.198744 -0.210902 -0.530962 0.159997 -0.832154 -0.0306541 -0.364081 0.120319 0.234291 -0.513218 0.82566 -0.0720544 -0.138114 -0.0607645 0.0587009 0.0838552 -0.994747 -0.0570525 -0.144661 -0.0609293 -0.0717692 0.176826 -0.981622 -0.0863837 -0.151362 -0.0610329 0.235359 0.21915 -0.946879 -0.00992239 -0.436777 0.14095 0.387855 0.533998 0.751275 -0.0142711 -0.157526 -0.0523281 -0.42957 0.538555 -0.724864 -0.12394 -0.189926 -0.0555422 0.591467 0.291067 -0.751962 -0.0275561 -0.438867 0.128602 0.652737 0.37803 0.656527 -0.161985 0.0237826 0.226417 0.539535 -0.451537 0.710645 -0.0445758 0.376696 0.137066 -0.0086198 0.843955 0.536344 -0.144577 0.351703 0.136614 0.458356 0.735472 0.498991 --0.291033 -0.278811 -0.0677837 -0.984729 0.0735749 0.157784 -0.126266 -0.299544 -0.0627642 0.75615 -0.203955 -0.621804 -0.122229 -0.365094 -0.0367248 0.984232 -0.0510224 -0.169363 --0.0995039 0.332463 0.130045 -0.548472 0.689365 0.473238 -0.261141 0.175928 0.120016 0.90521 0.114605 0.409219 --0.175765 0.168528 0.13132 -0.78707 -0.0794632 0.611724 -0.16938 -0.475723 -0.0660928 0.982104 -0.1844 -0.038329 -0.163148 0.0403521 0.234633 0.580033 -0.31989 0.749155 -0.190502 0.313052 -0.149322 0.399564 0.354925 -0.845208 -0.164485 -0.485972 -0.0493208 0.831334 -0.494978 0.252745 --0.270845 0.159182 -0.102431 -0.813558 -0.470604 -0.341548 -0.134962 -0.0687702 0.123404 0.500314 -0.750536 0.43172 -0.0741287 -0.498866 -0.0552448 0.00289077 -0.999979 0.00584196 --0.0864057 -0.497708 -0.0611178 0.341444 -0.918181 0.200897 -0.167551 0.108021 0.221752 0.491198 0.575867 0.65353 -0.203167 0.445201 -0.0805759 -0.353099 0.730393 -0.584677 -0.279342 0.440118 -0.0799869 0.463504 0.469047 -0.75177 -0.103698 -0.109882 0.127635 0.515992 0.181496 0.837145 -0.0412595 0.407492 -0.0659587 -0.0330434 0.97859 -0.203148 -0.313883 0.385762 -0.0656048 0.86104 0.0681263 -0.503953 -0.155128 0.25896 -0.20502 0.497847 0.381329 -0.778933 -0.309911 0.330608 -0.0689044 0.866521 -0.121837 -0.484042 -0.312298 0.316399 -0.0596015 0.902184 -0.186989 -0.388715 -0.00188633 -0.423327 0.132233 0.181774 0.66279 0.726407 --0.316363 0.255489 -0.0738673 -0.91559 -0.109038 -0.387048 --0.0316516 -0.414689 0.11918 -0.313909 0.657973 0.684495 -0.27964 0.157432 -0.0560624 0.979516 0.0415579 -0.197031 --0.237968 0.199079 -0.158424 -0.507439 -0.0487754 -0.860306 -0.274905 0.098586 -0.0673809 0.959764 -0.133009 -0.247308 -0.130263 0.123961 0.235795 0.518751 0.680556 0.517437 --0.0214911 -0.0863676 -0.0630294 -0.326931 -0.861603 -0.388275 --0.00232151 -0.0888945 -0.0701547 -0.280399 -0.840134 -0.464275 --0.00777715 0.218202 0.232034 -0.146437 0.100378 0.984114 -0.0743287 -0.119248 -0.0620333 0.106479 -0.235703 -0.965974 -0.0620518 -0.108033 -0.0671954 0.0241251 -0.521437 -0.852949 --0.148181 0.278634 0.129848 -0.744643 0.474681 0.469238 --0.169324 0.232464 0.130355 -0.82017 0.255037 0.51213 -0.0812999 -0.166181 -0.0667481 0.212314 0.335717 -0.917724 -0.0659582 -0.157048 -0.0654793 0.0270767 0.313637 -0.949157 --0.262711 -0.383907 -0.144174 -0.886278 -0.39242 -0.246005 --0.175429 0.184172 0.132727 -0.825257 0.00663549 0.564718 -0.254428 0.148928 0.139074 0.850794 0.103301 0.515246 -0.256554 0.0803094 0.1345 0.895155 -0.165988 0.413697 -0.265492 0.106078 0.119984 0.925886 -0.0431816 0.375328 -0.111148 -0.333346 -0.0703824 0.78584 -0.129848 -0.604644 -0.103877 -0.349544 -0.078154 0.772597 0.0249941 -0.634404 --0.0248905 -0.0730208 0.145212 -0.246542 -0.899102 0.361708 -0.115992 -0.381806 -0.0667806 0.889257 0.235544 -0.392098 -0.151567 -0.193418 0.113413 0.837949 0.232698 0.493653 --0.0303438 -0.335692 0.124036 -0.527006 -0.304571 0.793411 --0.0149084 -0.418728 0.127918 -0.075002 0.691671 0.718308 -0.139431 -0.498681 -0.0708964 0.131584 -0.991231 -0.0120849 --0.195167 0.0498436 -0.0932554 -0.76921 -0.633493 0.083685 -0.164567 0.00297433 -0.169156 0.500117 -0.610343 -0.6143 -0.120736 0.384299 0.0991408 0.359625 0.847996 0.389322 -0.165872 0.432013 -0.0632629 -0.540012 0.770911 -0.337763 -0.0174769 0.386084 0.118248 -0.0928776 0.882066 0.46188 --0.161372 0.263873 0.121697 -0.797941 0.407919 0.443726 --0.183188 0.168365 -0.182071 -0.419526 0.00787978 -0.907709 --0.0121008 -0.466039 -0.205498 0.0279312 -0.0550673 -0.998092 --0.187123 0.159988 0.113843 -0.862556 -0.0373238 0.504583 --0.155993 0.0403903 0.122618 -0.821179 -0.203247 0.53325 --0.158978 0.342824 -0.050424 -0.106951 0.984653 -0.137912 --0.30105 0.329679 -0.0812045 -0.589171 0.489171 -0.643109 --0.314716 0.287558 -0.0801469 -0.865981 0.0461545 -0.497942 -0.219678 -0.00706404 0.114499 0.713943 -0.633246 0.298806 -0.281526 0.227844 -0.0618225 0.888663 -0.25375 -0.381956 -0.274091 0.115778 -0.0775017 0.954704 -0.0776468 -0.287249 --0.225688 0.0835084 -0.0573335 -0.771052 -0.632 -0.0778115 --0.202404 0.0558057 -0.0578286 -0.777548 -0.627897 -0.0341132 -0.0941075 -0.441865 0.0299204 0.723073 -0.16257 0.671369 -0.247566 0.0237566 -0.070874 0.81925 -0.507145 -0.267645 -0.0956453 -0.0926568 -0.0724673 0.2848 -0.681599 -0.674027 -0.0762923 -0.094774 -0.0763411 0.159213 -0.708236 -0.687789 -0.108596 -0.006076 0.235057 0.276285 -0.497219 0.82246 -0.00660611 -0.105088 0.120605 -0.542845 -0.304754 0.782588 -0.0605014 -0.172369 -0.0721483 0.0885063 0.462426 -0.882229 -0.0134662 -0.118271 0.125352 -0.601173 0.184444 0.777542 -0.00750995 -0.170158 -0.0656379 -0.147926 0.864553 -0.480276 --0.00328084 -0.148108 0.123966 -0.747531 0.34937 0.564923 -0.160427 -0.235917 0.107467 0.892354 -0.0240093 0.450698 -0.109095 -0.194624 -0.0671001 0.468464 0.312642 -0.826315 --0.27402 -0.379826 -0.0679366 -0.922226 -0.385996 0.0225077 --0.275451 0.157779 -0.0859395 -0.814358 -0.524928 -0.247533 --0.0399473 -0.295898 0.126008 -0.690319 -0.0689761 0.720209 --0.200402 -0.431214 -0.210036 -0.647002 -0.450876 -0.614897 -0.13947 -0.418351 -0.0567135 0.755422 0.653849 -0.0426513 --0.250103 -0.427279 -0.078966 -0.88127 -0.472564 0.00682423 --0.0193953 -0.352892 0.122959 -0.362111 -0.383072 0.849783 -0.0221584 -0.379287 0.113974 0.219555 -0.323117 0.920539 --0.0713745 -0.48952 -0.0673949 0.406395 -0.876012 0.259706 --0.21097 -0.485067 -0.0648553 -0.635605 -0.766948 0.0882966 --0.219741 -0.400757 -0.210833 -0.69309 -0.435564 -0.574378 -0.145317 0.0124595 0.230296 0.45816 -0.520502 0.720532 --0.0135407 0.382496 0.116325 -0.190944 0.874274 0.446302 -0.275229 0.160719 -0.0750012 0.966235 0.0361304 -0.255117 -0.268707 0.12304 0.112161 0.935468 0.0120314 0.353206 --0.262338 -0.330012 -0.202103 -0.835055 -0.332447 -0.438364 --0.17018 0.0934213 0.118802 -0.677132 -0.192035 0.710363 -0.207363 0.43675 -0.0922065 -0.258404 0.663279 -0.702345 --0.136283 -0.00963234 0.115296 -0.78058 -0.54019 0.314468 -0.313332 0.367448 -0.0678993 0.868194 0.000140158 -0.496226 -0.145026 -0.292561 0.101245 0.752907 -0.5221 0.400678 -0.0332458 -0.330579 -0.201544 0.945878 -0.0231107 -0.323699 --0.214787 0.343943 -0.0805595 0.168455 0.918231 -0.358433 --0.127711 0.0800253 -0.201606 -0.449636 -0.288465 -0.845349 --0.178639 0.336768 -0.0793051 0.128943 0.937136 -0.324268 -0.0404747 -0.446916 0.115947 0.835854 0.159434 0.525289 --0.287279 -0.260911 -0.198407 -0.928523 -0.271498 -0.253245 -0.0384602 -0.467897 0.120964 0.860823 -0.0950429 0.49995 --0.309086 0.222996 -0.0767245 -0.905975 -0.242707 -0.346847 --0.112406 -0.460055 0.114022 0.0489366 -0.109742 0.992755 --0.139871 -0.469144 0.110524 -0.285117 -0.291228 0.913178 --0.136834 -0.009551 -0.0802446 -0.636718 -0.753745 -0.162661 -0.103362 -0.103 -0.0607173 0.393222 -0.473446 -0.788179 -0.159695 0.0570571 0.242522 0.599863 -0.14936 0.786038 -0.0813167 0.38871 0.112185 0.121433 0.888992 0.441528 -0.217639 0.187848 -0.177391 0.738566 0.128416 -0.661838 --0.197486 -0.157735 -0.0686604 -0.242558 0.931253 0.271906 --0.225978 -0.167506 -0.0737109 -0.465205 0.844607 0.264998 -0.0245066 -0.175785 -0.0762523 0.0262152 0.805278 -0.592318 -0.164892 0.351622 0.111483 0.577787 0.72741 0.370186 --0.18913 0.197381 -0.178198 -0.324165 0.106058 -0.940036 -0.0788438 -0.178663 -0.0722818 0.224249 0.398278 -0.889431 --0.266644 -0.200466 -0.0821241 -0.781009 0.586872 0.213558 -0.0977935 -0.225619 -0.0847177 0.518169 0.262443 -0.814018 -0.157295 0.121826 0.214248 0.447184 0.654177 0.609983 --0.291486 -0.313031 -0.0840672 -0.992028 -0.12361 0.0245251 -0.264458 0.0862333 0.118023 0.924167 -0.139377 0.355654 --0.226824 -0.46717 -0.091766 -0.811258 -0.583282 -0.0405304 -0.240755 0.0181884 0.108895 0.811106 -0.509482 0.287289 --0.117167 -0.0336781 0.112066 -0.664793 -0.702739 0.253392 --0.218731 0.313323 -0.123572 -0.0422448 0.677589 -0.734227 -0.0171787 -0.498432 -0.0621371 -0.248524 -0.960999 0.121312 -0.123911 -0.112601 0.110546 0.748224 0.137683 0.649003 --0.0130256 -0.154885 0.113203 -0.825605 0.330506 0.45732 -0.270381 0.425004 -0.0935039 0.424141 0.395192 -0.814817 -0.239959 0.261081 -0.126871 0.697415 0.0736629 -0.712871 -0.155647 0.421056 -0.071786 -0.496916 0.77409 -0.392249 --0.00836768 0.398602 -0.0774394 -0.226384 0.948197 -0.222873 --0.183062 0.0317736 -0.0662339 -0.767035 -0.640325 -0.0405113 -0.0221701 -0.413164 0.115005 0.432654 0.346674 0.832243 -0.261775 0.139849 -0.112283 0.908271 -0.0248613 -0.417643 -0.303527 0.393831 -0.0785301 0.740795 0.139486 -0.657089 -0.138105 0.0825176 0.258664 0.542768 0.133477 0.829209 -0.155904 -0.0190395 -0.151567 0.467304 -0.699081 -0.541214 --0.00221618 -0.281727 -0.250055 0.699893 0.217416 -0.680353 -0.114039 0.0240491 0.253169 0.249833 -0.553814 0.794275 --0.275571 -0.0579841 -0.207892 -0.837151 0.546971 -0.000993888 -0.23508 -0.00170709 -0.0508988 0.76271 -0.614935 -0.200321 -0.133768 0.381816 0.0909142 0.432344 0.826008 0.361647 --0.137491 0.306902 0.112645 -0.710254 0.582775 0.394858 -0.206055 -0.0321821 -0.0526352 0.657377 -0.722755 -0.213263 --0.0874657 -0.0434554 -0.0930541 -0.515128 -0.80791 -0.286224 -0.108958 -0.0812897 -0.0803144 0.323601 -0.784321 -0.529267 --0.181818 -0.0336348 -0.202097 0.864936 -0.308367 -0.395974 -0.153122 -0.0581636 0.121997 0.510036 -0.789475 0.341457 --0.21401 -0.165278 -0.062132 -0.375372 0.871224 0.31633 -0.0430862 -0.173812 -0.0737348 0.0206469 0.630112 -0.77623 -0.146199 -0.0686638 0.108791 0.560306 -0.732359 0.386921 --0.260419 -0.189319 -0.094596 -0.73165 0.65998 0.17063 -0.11271 -0.269887 -0.0804513 0.650652 0.0103691 -0.759305 -0.0957125 -0.333006 -0.0877017 0.699183 -0.0851113 -0.709859 --0.288578 -0.330784 -0.0755582 -0.983761 -0.174942 0.0401175 -0.100105 -0.369545 -0.085838 0.697921 0.160212 -0.698024 -0.148445 -0.0766617 0.0911277 0.678715 -0.601584 0.421239 --0.0492045 -0.0791046 0.102481 -0.389201 -0.886986 0.248553 -0.188833 0.105599 -0.201932 0.625443 -0.155807 -0.764556 -0.167069 -0.233093 0.0930809 0.932971 -0.0120582 0.359749 -0.264911 0.451701 -0.078755 0.25684 0.600781 -0.757031 -0.194974 0.448638 -0.0694724 -0.455953 0.757127 -0.467831 -0.163713 -0.21725 0.0992415 0.911917 0.0945565 0.399332 -0.174844 0.428906 -0.0796751 -0.466963 0.734423 -0.492512 -0.149274 0.409527 -0.0851153 -0.399059 0.782634 -0.47774 --0.053834 -0.262237 0.109784 -0.761299 0.125069 0.636225 --0.018894 0.391096 -0.0955529 -0.273824 0.919783 -0.281105 --0.0528097 0.383197 -0.0784334 -0.383419 0.891337 -0.241882 --0.049782 -0.304132 0.114983 -0.71474 -0.0807435 0.694713 --0.145471 0.337373 -0.081727 -0.236141 0.913966 -0.330004 --0.197036 0.336952 -0.0887442 0.170276 0.891387 -0.420042 -0.301831 0.318428 -0.0784946 0.808162 -0.156086 -0.567901 -0.106227 -0.323558 0.112758 0.515771 -0.669463 0.534601 -0.271656 0.229658 -0.0826734 0.875077 -0.137892 -0.463925 -0.276211 0.211682 -0.06667 0.938272 -0.0882517 -0.33445 --0.300725 0.208276 -0.086111 -0.877839 -0.296372 -0.376248 --0.299068 0.192347 -0.0737414 -0.871271 -0.408527 -0.272015 --0.28831 0.175334 -0.0790517 -0.840213 -0.472544 -0.265977 -0.219154 -0.0295229 0.00402322 0.712542 -0.700971 -0.0303854 -0.269754 0.0836299 -0.0773885 0.937137 -0.193784 -0.29021 -0.0537311 -0.382424 0.0985028 0.538195 -0.366119 0.759146 -0.127401 -0.0778784 -0.0713164 0.428818 -0.775271 -0.463757 -0.0361445 -0.411388 0.105663 0.572871 0.127291 0.809701 -0.024719 -0.396424 0.109616 0.369831 0.0096617 0.929049 --0.153532 -0.14281 -0.0910509 0.0168219 0.970355 0.241099 -0.0781521 0.162432 0.242323 0.552332 0.628374 0.547791 -0.0915398 -0.192247 -0.0742731 0.337561 0.388039 -0.8576 --0.151794 0.292491 0.106279 -0.757767 0.533334 0.375958 --0.193515 0.172399 0.101399 -0.916382 0.0384614 0.398452 -0.25051 0.0304539 0.100701 0.849864 -0.450734 0.273074 -0.256683 0.0500823 0.110392 0.88024 -0.367306 0.30044 -0.157537 -0.440683 -0.0752523 0.804758 0.573107 -0.154637 --0.129537 -0.0241657 0.102651 -0.7306 -0.642169 0.232038 --0.0534331 -0.482487 -0.0736865 0.0937424 -0.955344 0.280231 --0.146939 0.260236 -0.175856 -0.459844 0.450918 -0.764995 -0.158566 -0.494013 -0.0673881 0.615277 -0.786605 -0.0518319 --0.0145416 -0.495439 -0.0785983 -0.18707 -0.93484 0.301792 -0.21071 -0.0200405 0.105656 0.665776 -0.695607 0.26995 -0.0724129 -0.0127072 -0.200813 0.133245 -0.667713 -0.732396 --0.0842293 -0.498447 -0.0794214 0.132985 -0.99096 0.0176978 --0.104202 -0.495594 -0.0872806 -0.0508805 -0.994483 -0.0917274 -0.200026 -0.0333159 0.0957373 0.635563 -0.731182 0.247854 -0.262658 0.437129 -0.0902027 0.298245 0.519809 -0.80053 -0.0866401 0.144781 0.255801 0.562948 0.605855 0.562164 -0.110977 0.393636 -0.101326 0.0407578 0.904949 -0.423565 --0.0941859 -0.0515914 0.113123 -0.564515 -0.790694 0.236908 -0.291649 0.347603 -0.0950538 0.703227 -0.0298058 -0.710341 -0.291908 0.309153 -0.088538 0.744819 -0.166073 -0.64627 --0.104989 -0.499053 -0.0689836 -0.0475955 -0.997502 -0.0521937 -0.285936 0.273822 -0.0837343 0.763977 -0.267404 -0.587226 -0.274334 0.257988 -0.0905717 0.754014 -0.257417 -0.604318 --0.0142674 -0.111655 0.0971542 -0.81633 -0.287704 0.50083 -0.150983 -0.159176 0.0930601 0.86914 0.296589 0.395766 --0.0680848 0.329113 -0.175149 -0.398422 0.703578 -0.58842 --0.0633163 0.0357991 -0.212168 -0.347062 -0.529217 -0.774259 -0.119412 -0.310433 0.115719 0.582846 -0.621852 0.523059 -0.0608464 -0.0940636 -0.0795298 0.0382096 -0.750522 -0.659739 --0.0227334 -0.370779 0.113519 -0.352172 -0.324215 0.877986 -0.0786911 -0.359722 0.0948824 0.547018 -0.578365 0.605198 -0.0183831 -0.186371 -0.0944399 0.249434 0.843588 -0.475544 -0.0540411 -0.187619 -0.0827735 0.20276 0.587194 -0.78364 --0.276676 -0.212583 -0.0925061 -0.861324 0.479145 0.16894 --0.184644 -0.438594 -0.220034 -0.57883 -0.454541 -0.677014 -0.0987507 -0.243356 -0.0889109 0.588587 0.164684 -0.791483 --0.176699 -0.426583 -0.233655 -0.504051 -0.444368 -0.740587 --0.0727928 -0.0463083 -0.105763 -0.4336 -0.820798 -0.371864 --0.0679151 -0.0299849 -0.140871 -0.365432 -0.789077 -0.493778 --0.21996 -0.33985 -0.247723 -0.584817 -0.35394 -0.729874 -0.120053 -0.396674 -0.0701423 0.828825 0.433302 -0.353976 --0.0424946 -0.171128 -0.107071 0.348789 0.932624 -0.0925177 -0.143307 -0.42511 -0.0759562 0.682312 0.699405 -0.212798 -0.187593 0.327687 0.118586 0.663365 0.657543 0.35719 --0.264136 -0.370385 -0.157878 -0.881144 -0.37248 -0.291281 -0.240126 0.269199 0.104127 0.817627 0.463977 0.340898 --0.159775 -0.49612 -0.0714193 0.0164764 -0.999445 0.0289616 -0.26445 0.0627502 0.101014 0.913584 -0.301317 0.273079 --0.0647272 -0.495593 -0.0872676 0.185811 -0.960381 0.207708 -0.00480607 -0.0376975 0.21797 -0.210777 -0.695185 0.687234 -0.0986215 -0.498975 -0.0765008 -0.00658905 -0.999968 -0.00464094 --0.1052 -0.0496552 0.0872903 -0.605544 -0.780403 0.155846 --0.190497 0.061734 -0.199144 0.192259 -0.159921 -0.968226 --0.0621434 -0.30876 0.101522 -0.716699 -0.0788346 0.692912 --0.0384682 -0.376105 0.103625 -0.520683 -0.17182 0.836282 -0.0999157 0.399934 -0.0865574 0.0364532 0.944452 -0.326621 --0.0804154 -0.424558 0.100652 -0.00594613 0.5914 0.806356 --0.15109 0.302525 0.0925443 -0.756589 0.561369 0.335318 --0.144601 0.204151 -0.198468 -0.529661 0.187647 -0.827193 --0.288553 0.306197 -0.104617 -0.557122 0.355968 -0.750268 --0.0558684 -0.1666 -0.116613 0.360762 0.930027 -0.0700078 -0.0477056 -0.458027 0.102353 0.904887 -0.0162411 0.425342 -0.278744 0.298897 -0.0994712 0.670093 -0.168521 -0.722894 --0.253749 0.128831 -0.090128 -0.788124 -0.579342 -0.207902 --0.0217346 -0.18191 -0.134042 0.42336 0.894084 -0.146221 -0.147603 0.372921 0.0930828 0.50742 0.791455 0.34077 -0.264714 0.0910013 -0.0957537 0.915669 -0.167311 -0.365456 --0.173774 0.02363 -0.0933503 -0.712555 -0.696953 -0.0807615 -0.262733 0.237185 0.0853024 0.879293 0.30973 0.361816 -0.277687 0.243678 -0.0786915 0.818606 -0.276623 -0.503353 --0.19187 0.116755 0.0964816 -0.880419 -0.165809 0.444263 --0.178427 0.0679305 0.0974112 -0.856298 -0.281066 0.433309 --0.236433 -0.36925 -0.213251 -0.735509 -0.398128 -0.548198 --0.019057 -0.17552 -0.0819854 0.178732 0.974325 -0.136917 -0.0374461 -0.186174 -0.0866248 0.22045 0.718168 -0.660028 --0.0925388 -0.0572421 0.096474 -0.560521 -0.806917 0.18628 -0.164838 -0.249639 0.0956524 0.92087 -0.130643 0.36733 --0.0650744 -0.275297 0.0987604 -0.735603 0.0872763 0.671767 --0.0484415 -0.357341 0.102759 -0.610999 -0.237763 0.755082 --0.270158 -0.383815 -0.105536 -0.912206 -0.392797 -0.116577 --0.14888 -0.422484 0.084511 -0.370962 0.644966 0.668136 --0.148367 -0.434801 0.100198 -0.424515 0.601874 0.676413 -0.144899 -0.432997 -0.0913314 0.632415 0.662611 -0.401246 --0.163487 -0.478971 0.0919725 -0.631737 -0.502564 0.590202 --0.148223 -0.492922 0.08571 -0.29863 -0.887657 0.350549 -0.037577 0.112924 0.292936 0.115914 -0.160822 0.980153 --0.00204195 0.396915 0.0860238 -0.169798 0.938772 0.299792 -0.00472583 0.391625 0.103395 -0.133283 0.911032 0.390201 -0.271509 0.23237 0.0687746 0.876867 0.236646 0.418452 --0.122099 -0.495483 -0.0937029 0.0284718 -0.99959 0.00287899 -0.149935 -0.495647 -0.0857824 0.462874 -0.858124 -0.222194 --0.19261 0.220568 0.0809041 -0.941388 0.232036 0.244843 --0.0281451 -0.496149 -0.0948088 -0.115451 -0.983006 0.142727 --0.206667 0.0606657 -0.201274 -0.0964117 -0.459811 -0.882768 -0.274012 0.135179 0.0959412 0.953079 0.0427549 0.299687 -0.276894 0.410835 -0.0955787 0.509066 0.291107 -0.810005 --0.117627 -0.041983 0.00206804 -0.626519 -0.771975 -0.107369 -0.15632 -0.281307 0.090239 0.840788 -0.433803 0.323867 --0.0568539 -0.339339 0.100768 -0.673736 -0.196346 0.71241 --0.135174 -0.424263 0.0945365 -0.249147 0.749877 0.61287 --0.113868 -0.432658 -0.251082 -0.0245573 -0.518527 -0.854708 --0.274158 0.338163 -0.0901782 -0.253425 0.700578 -0.667058 --0.179729 0.330238 -0.0955255 0.107664 0.884039 -0.454844 --0.177294 -0.467703 0.0770411 -0.867035 -0.266524 0.420969 -0.1981 0.149326 -0.200077 0.662832 -0.0251782 -0.748345 --0.129532 0.21741 -0.205118 -0.534541 0.222573 -0.815308 -0.275892 0.278497 -0.0967975 0.698155 -0.212913 -0.683555 --0.29342 0.21512 -0.104808 -0.841913 -0.207294 -0.498209 -0.263989 0.202521 -0.0988815 0.91338 0.0832595 -0.398503 -0.270161 0.164571 -0.0914286 0.944738 0.047489 -0.324367 -0.270499 0.100469 -0.0830457 0.942557 -0.125106 -0.309734 -0.25579 0.0615014 -0.098379 0.871639 -0.311095 -0.378769 --0.13561 -0.00589014 -0.101264 -0.583609 -0.797754 -0.151623 -0.0421853 0.393774 0.105637 -0.0172882 0.912163 0.409462 --0.190624 -0.151993 -0.0870727 -0.253159 0.939826 0.22943 -0.0446018 0.404241 0.0778753 -0.0232397 0.961964 0.272186 -0.0643468 -0.205845 -0.0929106 0.349237 0.52463 -0.7764 --0.289179 -0.247722 -0.0868566 -0.963522 0.226386 0.142737 -0.21845 0.244132 0.156447 0.667227 0.25816 0.698686 --0.288707 -0.329004 -0.0967565 -0.979141 -0.19819 -0.0447647 -0.0802603 -0.334146 -0.101114 0.633146 -0.0914258 -0.768614 -0.0899222 -0.349817 -0.0918856 0.647263 0.0300178 -0.761675 -0.177384 0.198135 -0.211577 0.583284 0.176848 -0.792783 -0.101317 -0.402443 -0.0966185 0.493561 0.407869 -0.768141 -0.116354 -0.405085 -0.0857745 0.644332 0.547336 -0.534097 --0.258097 -0.412309 -0.0854308 -0.884691 -0.465393 -0.0270528 --0.242282 -0.441368 -0.0920972 -0.878779 -0.474912 -0.0469619 -0.243266 0.282561 0.071802 0.782496 0.55924 0.273769 --0.178564 0.256006 0.0905363 -0.882762 0.369486 0.290192 --0.0857655 -0.496505 -0.0971977 -0.0182823 -0.998877 -0.0437033 --0.151663 -0.496961 -0.10232 0.020381 -0.999499 0.0242011 --0.186557 0.226624 0.0965246 -0.917098 0.249878 0.310632 -0.253478 0.420798 -0.102666 0.266494 0.4231 -0.866006 -0.179601 0.41908 -0.0953129 -0.364784 0.667767 -0.648861 --0.186959 0.239599 0.0824822 -0.920931 0.298912 0.250075 --0.192027 0.207463 0.0934218 -0.933593 0.187011 0.305665 -0.0925881 0.394806 -0.101932 0.0834309 0.92406 -0.373032 -0.137214 0.414507 0.0252838 -0.23176 0.859926 0.454769 -0.0704777 0.355252 -0.172714 0.189687 0.743756 -0.640972 --0.174221 0.0421439 0.0824143 -0.881724 -0.388625 0.267459 --0.161873 0.0136853 0.0777213 -0.860631 -0.467342 0.202249 -0.279356 0.337669 -0.105007 0.611408 -0.0473638 -0.789897 --0.0760394 -0.304982 0.0876509 -0.700389 -0.0719865 0.710122 --0.28165 0.17265 -0.0940832 -0.834625 -0.438629 -0.333177 -0.140617 -0.309095 0.0831945 0.743013 -0.594669 0.307084 --0.262841 0.143875 -0.0969271 -0.798098 -0.546518 -0.253689 --0.234189 0.10154 -0.0881376 -0.789582 -0.586922 -0.179116 --0.0492834 -0.388396 0.0941271 -0.657902 -0.0172127 0.752907 --0.164786 -0.434552 0.085312 -0.606892 0.540786 0.582437 --0.13509 -0.160131 -0.209 0.0727013 0.924149 -0.37505 -0.0348839 -0.496701 0.0825737 0.294091 -0.949595 0.108532 -0.0161841 0.399165 0.0875003 -0.108843 0.942159 0.317001 -0.000436721 -0.18401 -0.102666 0.273507 0.912837 -0.303187 --0.283579 -0.222607 -0.104052 -0.915494 0.383144 0.122762 -0.0334033 0.400059 0.0893707 -0.0533637 0.94144 0.332932 -0.103799 0.398107 0.0789822 0.222824 0.919136 0.324865 --0.29262 -0.299405 -0.114865 -0.990541 -0.125239 -0.0560631 -0.074413 -0.381963 -0.10521 0.524765 0.167704 -0.834564 --0.0356326 0.387414 0.0898084 -0.296992 0.901449 0.314938 -0.157897 -0.44784 -0.0904056 0.801174 0.450871 -0.393491 --0.0195129 0.236747 -0.251282 -0.207545 0.262622 -0.942314 -0.1627 -0.465035 -0.0928076 0.884337 0.0753758 -0.460725 --0.12837 0.330811 0.0885302 -0.661557 0.67211 0.332582 -0.137925 0.266964 -0.211185 0.442502 0.408237 -0.798458 --0.0460146 -0.493543 -0.0926786 -0.000329131 -0.957314 0.289049 --0.103377 -0.495243 -0.106658 -0.00591944 -0.999929 0.0103603 -0.0634344 0.220432 -0.256407 0.178941 0.243529 -0.953244 -0.0659949 -0.498677 -0.0856049 -0.000750508 -0.999882 -0.0153698 -0.278762 0.113464 0.0791977 0.969634 -0.0438055 0.240607 --0.0134715 0.313815 -0.214246 -0.178719 0.605618 -0.775427 -0.283523 0.388377 0.00173461 -0.0838105 0.098054 0.991646 --0.149951 0.329371 -0.0976935 -0.194819 0.884925 -0.423029 --0.167032 -0.413296 -0.247138 -0.42297 -0.444781 -0.789472 -0.264366 0.285189 -0.108565 0.626235 -0.149361 -0.765194 --0.0177379 0.268335 -0.240559 -0.195719 0.390395 -0.899603 --0.196425 -0.325496 -0.268569 -0.435198 -0.299893 -0.848921 --0.0481005 -0.19788 0.0786883 -0.777106 0.480942 0.405957 --0.222456 0.0889192 -0.0983912 -0.864412 -0.484917 0.132841 -0.0364765 0.358853 -0.17442 0.039397 0.777754 -0.627333 -0.257629 0.0801592 -0.106364 0.880309 -0.221359 -0.419591 --0.218797 0.0726272 -0.108689 -0.73872 -0.45732 0.495128 --0.0717343 -0.338144 0.0860885 -0.719653 -0.176533 0.671517 --0.194776 0.270388 -0.00165462 -0.831067 0.0715674 0.551548 --0.10495 -0.498004 -0.171321 -0.000924719 -0.999903 -0.0138898 --0.114098 -0.496848 0.0756655 -0.00458157 -0.997319 0.0730364 -0.2027 -0.0197553 -0.0920904 0.634542 -0.693157 -0.341891 -0.19402 -0.0170912 -0.111596 0.607307 -0.680202 -0.410492 -0.0716284 -0.0830071 -0.0926914 0.125209 -0.833916 -0.5375 --0.109605 -0.493872 0.0960679 -0.0354798 -0.875685 0.481578 --0.186719 -0.146255 -0.103385 -0.270752 0.939313 0.210676 -0.162542 0.366112 0.0848856 0.582531 0.748173 0.317638 --0.071488 0.376239 0.0769741 -0.446723 0.859286 0.249131 --0.13303 0.334651 0.0696786 -0.669779 0.684935 0.286812 --0.20501 0.160905 0.0666876 -0.975263 0.0453715 0.216341 -0.270679 0.0692541 0.0848554 0.9377 -0.260319 0.230114 --0.265277 -0.240604 -0.255801 -0.674948 -0.381517 -0.631578 -0.229213 0.462641 -0.0709109 -0.181145 0.75976 -0.624461 --0.019656 -0.137 0.0801512 -0.951015 0.157486 0.266023 -0.153922 -0.13777 0.0650202 0.953249 0.229023 0.197143 --0.0672158 -0.382425 0.0782142 -0.52084 0.00447983 0.853642 --0.0907406 -0.153224 -0.103099 0.249296 0.968376 -0.00998041 --0.146697 -0.403786 0.0735172 -0.20069 0.310314 0.929209 -0.113711 -0.417042 -0.0997399 0.408495 0.590682 -0.695864 --0.078559 -0.497217 -0.152436 0.00510229 -0.999328 0.0363091 -0.142097 -0.442945 -0.106944 0.554492 0.491995 -0.671178 -0.105424 0.210326 0.213868 0.439017 -0.116434 0.890903 --0.10508 -0.412845 0.0858386 -0.19758 0.648862 0.734806 --0.213267 -0.483927 -0.0972475 -0.68301 -0.729689 -0.0324409 --0.0274403 0.183455 -0.258155 -0.250019 0.0810899 -0.964839 --0.00614714 -0.499537 0.0820798 0.0073281 -0.999918 -0.0104558 -0.0307763 -0.498009 0.067973 0.157025 -0.98671 0.0418005 -0.130099 -0.498766 -0.0895769 0.109168 -0.984903 -0.134342 -0.103466 -0.496862 -0.107268 0.0470748 -0.911401 -0.408818 --0.0416476 0.175682 -0.254872 -0.289758 0.0702101 -0.954521 -0.246954 0.403872 -0.111254 0.240639 0.336796 -0.910308 -0.175598 0.400962 -0.10963 -0.247516 0.598968 -0.76156 -0.162788 0.404168 -0.101472 -0.336152 0.689948 -0.641073 -0.0295094 0.394015 -0.112735 -0.0587914 0.93336 -0.354095 -0.146856 0.397247 -0.101885 -0.238395 0.776742 -0.582957 -0.277859 0.379525 -0.103567 0.556984 0.161945 -0.814581 --0.0953201 0.356868 -0.097354 -0.449665 0.841375 -0.299815 -0.185864 0.347135 0.0778689 0.697339 0.666921 0.262555 --0.177257 0.273424 0.0671584 -0.873281 0.428756 0.231405 --0.14857 0.321456 -0.113694 -0.257768 0.836703 -0.483201 --0.188691 0.247322 0.062785 -0.93235 0.312706 0.18149 --0.272091 0.307789 -0.113987 -0.404302 0.464899 -0.787661 --0.264841 0.293187 -0.125403 -0.413026 0.400985 -0.817692 -0.26971 0.218582 0.0806128 0.917563 0.182269 0.353349 --0.291474 0.201041 -0.100901 -0.845991 -0.303403 -0.438458 --0.282733 0.187456 -0.10692 -0.824776 -0.353357 -0.441456 --0.251599 0.142287 -0.122098 -0.798863 -0.431488 -0.41909 --0.0785025 0.382433 -0.0151483 -0.433732 0.900316 -0.0361541 -0.27544 0.0699946 0.0640207 0.955558 -0.245197 0.163671 -0.262395 0.0379754 0.0725655 0.890385 -0.403882 0.209988 --0.209921 0.0431212 -0.118699 -0.614298 -0.401457 0.679316 --0.202544 0.0297143 -0.121544 -0.461986 -0.455046 0.76125 -0.247436 0.0341694 -0.0881298 0.825012 -0.45719 -0.332164 -0.226618 -0.0144466 0.074472 0.718911 -0.669959 0.185262 -0.175042 -0.246832 0.0600807 0.980646 -0.120482 0.154328 -0.175429 -0.228365 0.0630494 0.983571 0.0231144 0.179036 --0.163781 0.0117808 -0.114149 -0.475029 -0.795939 0.375271 -0.22765 0.0124696 -0.100459 0.744016 -0.561061 -0.362837 --0.139131 -0.00175368 -0.119014 -0.373113 -0.918225 -0.132849 --0.0894815 -0.310621 0.0739329 -0.705342 -0.153329 0.692086 --0.0745518 -0.36661 0.0754101 -0.625844 -0.0673996 0.777031 --0.150573 -0.368377 0.0695191 -0.0197781 0.0474715 0.998677 --0.169093 -0.366087 0.0680403 -0.172241 -0.00673364 0.985032 -0.204103 0.345805 -0.13633 0.180548 0.229196 -0.956489 -0.00929454 -0.192081 -0.114039 0.427079 0.816327 -0.388863 --0.265976 -0.354381 -0.171626 -0.876558 -0.352486 -0.327717 -0.0687135 -0.225289 -0.102624 0.507444 0.413963 -0.755735 -0.0859921 -0.255247 -0.101025 0.619178 0.146745 -0.771417 -0.0852749 0.401129 0.0809666 0.133025 0.942243 0.30738 --0.201686 0.180676 0.073732 -0.968026 0.11136 0.224777 -0.0585775 -0.371875 -0.114221 0.60143 0.0516246 -0.797256 --0.207058 0.143072 0.0573942 -0.97899 -0.0134113 0.203465 -0.253328 0.0248 0.0814379 0.849413 -0.471709 0.236617 --0.155668 0.000650497 0.0708191 -0.83004 -0.534248 0.160037 -0.114893 0.195954 -0.245861 0.368567 0.160865 -0.915577 --0.225684 -0.466641 -0.108923 -0.819665 -0.566517 -0.0848981 -0.140413 -0.4922 -0.104711 0.398605 -0.746836 -0.532306 --0.11216 -0.295703 0.0583155 -0.168331 0.063573 0.983678 -0.12733 0.243843 0.207681 0.408404 -0.00998319 0.912747 -0.098156 0.387644 -0.116467 0.123697 0.878791 -0.460897 -0.242353 0.384598 -0.118563 0.265467 0.259313 -0.928592 -0.135045 -0.323141 0.065623 0.736465 -0.629951 0.246539 --0.0442851 -0.461374 -0.210073 0.384593 -0.473912 -0.792146 --0.074464 -0.162725 -0.163123 0.343032 0.933515 -0.1043 --0.204945 0.320734 -0.11583 0.0509442 0.764882 -0.642153 --0.143503 -0.497558 -0.135917 0.0115456 -0.999644 0.024045 --0.133321 -0.33175 0.0643749 0.0370135 0.0994024 0.994359 -0.056853 0.264752 -0.242203 0.174115 0.405171 -0.897508 --0.122914 -0.350014 0.0655664 0.0614931 0.0826987 0.994676 --0.172879 -0.336307 0.0661476 -0.137848 0.0833401 0.986941 --0.139933 -0.3515 0.0675031 0.0841687 0.0984798 0.991573 --0.274842 0.173831 -0.110195 -0.81482 -0.387611 -0.431076 -0.263661 0.158304 -0.108597 0.916081 0.0251358 -0.400205 -0.260057 0.119406 -0.113687 0.899377 -0.0737723 -0.430905 --0.123811 0.181143 -0.215765 -0.531162 0.0983195 -0.841547 -0.258485 0.099872 -0.112391 0.887977 -0.137726 -0.43878 --0.13133 -0.391006 0.071497 -0.00224645 0.257521 0.96627 --0.0917766 -0.381521 0.0685876 -0.183418 0.289341 0.939489 --0.188652 0.0263489 -0.115604 -0.447429 -0.541827 0.711499 --0.21032 -0.389848 -0.228598 -0.623908 -0.418292 -0.660129 --0.155353 0.0027578 -0.123862 -0.263058 -0.956002 0.12985 -0.139744 -0.058502 0.138617 0.441863 -0.81018 0.385183 --0.124396 -0.00926945 -0.119514 -0.499022 -0.815472 -0.293228 -0.184432 -0.0147832 -0.1278 0.577243 -0.674975 -0.459564 -0.269177 0.171843 0.10061 0.938565 0.104542 0.328888 -0.0818726 -0.497647 -0.0160536 0.0543483 -0.99612 0.0692245 --0.0244892 -0.178397 -0.115819 0.350138 0.929079 -0.119229 -0.117257 0.399365 0.065219 0.275575 0.908209 0.314984 -0.0914321 0.174363 -0.256755 0.289844 0.0770568 -0.953967 -0.0464697 -0.219184 0.175049 -0.131286 0.0683435 0.988986 -0.133941 0.390287 0.0711835 0.432566 0.831927 0.34754 -0.175321 0.358563 0.0757115 0.65825 0.698356 0.28108 -0.220816 0.307512 0.0796133 0.736015 0.633538 0.238563 -0.266463 0.160492 0.111182 0.928006 0.0966548 0.35981 --0.0417711 0.140275 -0.255431 -0.27768 -0.0541674 -0.959145 --0.203618 0.130158 0.0697405 -0.961698 -0.0777342 0.262857 -0.110563 -0.431974 -0.112229 0.222627 0.519954 -0.824673 --0.0942186 -0.0599024 0.0764753 -0.566523 -0.814761 0.123354 -0.154011 -0.105323 0.0436942 0.986268 -0.152126 0.0642823 -0.148108 -0.474544 -0.110815 0.639226 -0.157068 -0.752808 -0.150989 -0.10556 0.0631474 0.951112 -0.0867272 0.296419 --0.0982246 -0.292396 0.0685479 -0.641411 -0.0616703 0.764715 --0.101426 -0.313055 0.0604766 -0.325028 -5.04975e-005 0.945704 --0.19381 -0.306811 0.0584142 -0.27179 0.147504 0.950985 -0.0875871 -0.498756 -0.0907367 0.00203674 -0.998518 -0.0543833 --0.192188 -0.336422 0.0613932 -0.302522 0.0300045 0.95267 -0.00250625 -0.49766 -0.112104 -0.0306148 -0.999507 -0.00691523 -0.194119 0.398626 -0.115905 -0.149401 0.49843 -0.85396 -0.122122 -0.331475 0.0792191 0.665757 -0.661067 0.34606 -0.160013 0.388523 -0.114987 -0.169457 0.647207 -0.743241 -0.247623 0.0457794 -0.101578 0.834005 -0.394074 -0.386188 -0.00869869 -0.456925 -0.201678 0.321422 0.131889 -0.937706 -0.267845 0.373048 -0.111181 0.478426 0.147627 -0.86563 -0.251122 0.313011 -0.121732 0.500119 -0.0630427 -0.863659 -0.251624 0.272317 -0.116838 0.644952 -0.0732214 -0.760708 --0.296561 0.266399 -0.107819 -0.769903 0.0538637 -0.635884 -0.251644 0.250424 -0.11501 0.756597 -0.0196026 -0.653587 --0.29268 0.233554 -0.111395 -0.810459 -0.0948945 -0.578058 --0.206159 -0.388792 0.0502849 -0.541645 -0.202905 0.815752 --0.265605 0.16812 -0.12179 -0.792545 -0.373451 -0.482086 -0.0631938 -0.457474 0.0689206 0.874678 -0.0944436 0.475415 --0.231059 0.104549 -0.109419 -0.902268 -0.378852 0.205874 --0.0591742 -0.497948 0.0714805 -0.041842 -0.999091 -0.0081858 -0.241679 0.0671349 -0.128634 0.822011 -0.270685 -0.501026 --0.245357 0.11383 -0.0789103 -0.787634 -0.589696 -0.178582 --0.0584867 0.388468 0.0474181 -0.390154 0.911365 0.131124 --0.0362529 0.392933 0.0694149 -0.300138 0.929495 0.214373 -0.231962 0.299167 0.0671593 0.747667 0.61881 0.240974 -0.241763 0.292012 0.055216 0.732318 0.613379 0.295764 -0.245708 0.00131618 0.0364999 0.804075 -0.592881 0.0442242 --0.118078 -0.0439056 0.0542472 -0.644849 -0.762646 0.0504052 --0.109212 -0.0183874 -0.121046 -0.504423 -0.789997 -0.348514 -0.224408 -0.0209197 0.0545304 0.709661 -0.694329 0.119532 -0.0284556 -0.0752942 -0.108355 -0.0756452 -0.882376 -0.464425 --0.0703323 -0.161697 -0.127169 0.351272 0.934108 -0.0636411 --0.00763992 -0.18661 -0.12243 0.417169 0.879465 -0.229154 --0.270171 -0.199305 -0.103346 -0.804802 0.575822 0.143951 --0.102115 -0.0561714 0.0574154 -0.594606 -0.801711 0.0608538 -0.129774 -0.0359303 -0.14811 0.357115 -0.78516 -0.505957 -0.0664226 -0.350617 -0.110063 0.574696 -0.0815271 -0.814296 -0.0212693 0.398768 -0.0964498 -0.102925 0.95349 -0.283308 --0.0904435 -0.156627 -0.155002 0.283209 0.955184 -0.0861227 -0.153237 -0.121947 0.0527232 0.988043 0.090299 0.12497 --0.106333 -0.276479 0.0617507 -0.508938 0.109491 0.853812 --0.137207 -0.408539 -0.261157 -0.212116 -0.453023 -0.865897 -0.0493522 -0.335396 -0.126796 0.779468 -0.0785877 -0.621493 --0.202904 -0.283279 -0.279079 -0.34729 -0.233071 -0.908332 --0.153882 -0.278093 0.0557359 -0.0163669 0.266893 0.963587 -0.0461274 -0.385822 -0.123393 0.772692 -0.00750699 -0.634736 --0.031724 -0.337126 -0.272944 0.46811 -0.153338 -0.870264 --0.210388 -0.0405962 -0.154488 0.215417 -0.494223 0.842223 --0.167606 -0.290767 0.059196 -0.033375 0.234925 0.97144 --0.185593 -0.42048 0.0578769 -0.643993 -0.0193438 0.764787 -0.0694026 -0.407793 -0.117187 0.346745 0.288962 -0.892339 -0.0813453 -0.420269 -0.116513 0.387033 0.329785 -0.861073 -0.0930156 -0.43575 -0.117918 0.2258 0.381347 -0.896431 --0.185007 -0.455234 0.0638472 -0.913163 -0.0647427 0.402419 --0.0139015 -0.0739454 -0.0967041 -0.231806 -0.881565 -0.411228 --0.0817116 -0.497096 0.0663501 -0.0247073 -0.999682 0.00507634 -0.0649438 0.409863 0.0517107 0.0297153 0.983608 0.177854 --0.0254964 -0.195253 -0.192547 0.578933 0.743615 -0.334475 -0.235433 0.166382 -0.157736 0.825007 0.049193 -0.562977 --0.205832 0.175558 0.0559225 -0.979183 0.1123 0.169086 -0.131467 -0.480507 -0.119313 0.327346 -0.351195 -0.877215 -0.285521 0.123797 0.0439341 0.994823 -0.0214194 0.0993445 -0.114516 -0.252607 -0.0778471 0.628507 0.0776493 -0.773918 -0.213152 0.398964 -0.117711 -0.00414057 0.421229 -0.906945 -0.0486213 0.392748 -0.11656 0.0306792 0.923296 -0.382863 -0.132141 0.0330826 0.251534 0.41165 -0.440075 0.798047 -0.222959 0.372771 -0.126511 0.161468 0.270442 -0.949099 --0.119679 0.337437 -0.110956 -0.467152 0.804727 -0.366311 --0.184001 -0.292073 0.0580158 -0.167611 0.219802 0.961038 -0.0881632 -0.385635 0.0625081 0.726373 -0.395609 0.562028 --0.283889 0.22086 -0.120645 -0.775385 -0.130601 -0.617836 -0.0828034 -0.4163 0.0523242 0.763326 -0.266361 0.588545 -0.246022 0.141121 -0.141486 0.849665 -0.0350545 -0.526157 -0.0694497 -0.405995 0.0742291 0.727858 -0.266381 0.631873 -0.283054 0.207487 0.0439474 0.971768 -0.061192 0.227865 -0.176938 0.285197 -0.175052 0.547318 0.427141 -0.719718 -0.250964 0.0862733 -0.121566 0.855516 -0.199472 -0.477811 --0.26997 -0.290768 -0.216327 -0.83719 -0.317493 -0.44532 --0.215045 0.0226701 -0.132752 -0.661519 -0.247461 0.707924 -0.240111 0.0473496 -0.118113 0.809803 -0.377168 -0.449404 -0.230373 0.0362618 -0.124774 0.765571 -0.441953 -0.467524 --0.19828 0.0149294 -0.127873 -0.357359 -0.450328 0.818229 --0.196603 0.0743538 0.0480047 -0.895785 -0.372179 0.243008 -0.21324 -0.00553954 -0.0993084 0.683478 -0.634356 -0.361179 --0.144172 0.00308992 -0.137222 -0.0431605 -0.981656 -0.185714 --0.0957223 -0.0266675 -0.121279 -0.473904 -0.796408 -0.375698 --0.200193 0.0911192 0.057279 -0.922429 -0.269816 0.276267 -0.259825 0.0243883 0.0469954 0.8762 -0.476318 0.0734462 --0.0374566 -0.186109 -0.189943 0.508718 0.808181 -0.296732 --0.203625 -0.149968 -0.116002 -0.341976 0.929515 0.138038 -0.0223962 -0.20422 -0.120355 0.530941 0.697323 -0.4815 --0.137501 -0.0238214 0.0687394 -0.738611 -0.664789 0.111846 -0.039603 -0.22106 -0.122072 0.580109 0.539844 -0.609953 --0.284765 -0.220501 -0.125683 -0.922801 0.362419 0.13073 --0.0280009 0.113879 -0.256298 -0.242262 -0.161443 -0.956684 --0.118811 -0.264519 0.0513298 -0.2892 0.281134 0.915056 --0.124813 -0.278694 0.056442 -0.0679582 0.234876 0.969647 --0.172152 -0.275527 0.0547689 -0.067366 0.299032 0.951862 -0.0649094 -0.332989 -0.114017 0.630689 -0.159352 -0.759499 --0.0217981 0.316626 0.193 -0.216225 0.583413 0.782864 -0.0516109 -0.353056 -0.119008 0.736622 -0.0799531 -0.671562 --0.256815 0.160915 -0.130251 -0.76161 -0.373179 -0.5298 -0.0510117 -0.409152 -0.120363 0.539554 0.281107 -0.793638 -0.0623519 -0.425109 -0.125184 0.47909 0.395633 -0.783548 --0.212055 -0.356411 0.0522757 -0.476248 -0.091938 0.874492 -0.0739836 -0.440348 -0.123431 0.433793 0.359442 -0.826211 --0.227653 -0.356871 0.0425484 -0.592017 -0.138038 0.794016 -0.206254 -0.00206251 0.150912 0.684286 -0.610476 0.398837 -0.106028 -0.449681 -0.121523 0.137303 0.266984 -0.95387 -0.099696 -0.380594 0.0508115 0.766233 -0.398938 0.503722 -0.118855 -0.464611 -0.123044 0.148253 0.0574664 -0.987278 -0.044658 -0.496504 0.0564885 0.260609 -0.95815 0.118456 -0.281009 0.226548 0.0523395 0.894191 0.03886 0.445995 --0.198209 0.212661 0.064468 -0.961599 0.214387 0.171366 -0.028333 -0.498461 -0.131938 0.0102915 -0.999716 -0.021477 -0.283043 0.139201 0.0592084 0.983369 0.0390494 0.177372 -0.283628 0.153946 0.0499069 0.988271 0.0645289 0.138407 -0.140796 0.385572 -0.114571 -0.0621479 0.766479 -0.639256 -0.17978 0.387282 -0.120172 -0.128123 0.51562 -0.847184 --0.0496499 -0.183726 -0.202655 0.468262 0.811513 -0.349539 -0.2535 0.372308 -0.117651 0.372511 0.172511 -0.911853 --0.0892029 0.347979 -0.126314 -0.445306 0.805528 -0.39093 -0.23553 0.343694 -0.128566 0.333871 0.0974011 -0.937573 -0.0412602 0.104202 -0.262726 0.0337094 -0.19839 -0.979543 -0.235406 0.322971 -0.129946 0.400699 0.0256787 -0.91585 --0.0913266 0.006085 -0.172555 -0.387502 -0.663666 -0.639835 -0.2371 0.284088 -0.128614 0.579286 0.0171217 -0.814945 --0.283215 0.272322 -0.120574 -0.648858 0.16174 -0.743521 --0.130997 -0.251846 0.0460662 -0.126366 0.381515 0.915684 -0.250107 0.173769 -0.133597 0.866973 0.0683024 -0.493652 -0.244701 0.121896 -0.141246 0.840704 -0.0849195 -0.534796 --0.0443607 -0.0135353 -0.176683 -0.31317 -0.71095 -0.629662 --0.158677 -0.262854 0.0506021 -0.0403802 0.369569 0.928326 --0.220087 0.0403254 -0.133832 -0.81294 -0.330965 0.479157 -0.126819 0.00336688 0.234074 0.354111 -0.538646 0.764504 --0.220958 -0.341287 0.048643 -0.512608 -0.0463013 0.857373 --0.127132 -0.000382544 -0.135419 -0.336201 -0.866537 -0.368893 -0.158547 -0.0353568 -0.12484 0.450952 -0.776605 -0.439917 --0.0149061 -0.0652002 -0.114479 -0.228279 -0.865269 -0.446316 --0.199052 -0.420117 0.0454806 -0.680188 -0.197835 0.705837 --0.0648129 -0.179331 -0.210484 0.393471 0.830064 -0.395189 --0.246572 -0.317995 -0.233199 -0.719555 -0.342562 -0.604063 -0.0454688 -0.282788 -0.138401 0.700777 0.00186686 -0.713378 --0.289752 -0.307573 -0.130553 -0.975033 -0.183797 -0.124614 -0.0604003 -0.29566 -0.122547 0.671173 -0.0528199 -0.739417 --0.203532 -0.450554 0.029289 -0.840348 -0.313113 0.442466 -0.0437898 -0.319142 -0.131312 0.799867 -0.0890943 -0.593527 --0.0111016 0.104625 -0.258189 -0.183967 -0.206539 -0.960988 -0.0448191 -0.369006 -0.129892 0.915297 -0.044592 -0.400304 --0.0240401 0.399879 0.0519529 -0.256487 0.955213 0.147593 -0.1573 0.393954 0.043478 0.406808 0.552745 0.72731 -0.038806 -0.0191762 -0.196767 -0.0456123 -0.702027 -0.710688 --0.194119 0.236117 0.051663 -0.952398 0.269362 0.142764 -0.212691 -0.0058031 0.132482 0.69701 -0.628943 0.344395 --0.0660099 -0.495979 -0.12201 -0.0109835 -0.999939 0.00140012 --0.162644 -0.497629 -0.141108 -0.0383152 -0.999262 -0.0028095 -0.283443 0.2583 0.0429333 0.634931 0.251645 0.730436 -0.11938 0.385033 -0.115261 0.0687278 0.839537 -0.538938 --0.207054 0.107671 0.0471398 -0.933124 -0.164721 0.319604 -0.1501 0.37496 -0.125753 0.0285834 0.65246 -0.757284 -0.196403 -0.0486085 0.0442213 0.661394 -0.742984 0.102627 --0.165644 0.311196 -0.123712 -0.078442 0.784427 -0.61524 -0.170691 -0.0726147 0.0434902 0.753518 -0.652858 0.0773715 -0.170024 -0.0737113 0.0265377 0.756616 -0.653599 -0.0184542 --0.0281577 0.370438 0.131155 -0.249264 0.829396 0.499969 --0.280649 0.240448 -0.126648 -0.715152 0.00192994 -0.698966 --0.036085 -0.166145 0.0449862 -0.796856 0.598979 0.0790206 --0.186274 -0.246535 0.0406748 -0.169708 0.470508 0.865922 --0.238786 0.117501 -0.120867 -0.959553 -0.275145 0.0596036 --0.195509 -0.261149 0.0456781 -0.264148 0.373636 0.889169 -0.170855 -0.271996 0.0360775 0.94592 -0.324206 0.0112082 -0.0256032 -0.0272086 -0.186496 -0.104203 -0.738165 -0.666524 -0.111624 -0.364194 0.0450492 0.809386 -0.44792 0.379819 -0.0194114 -0.0124139 -0.20096 -0.130886 -0.680607 -0.720862 -0.105371 -0.384522 0.0384996 0.822616 -0.319256 0.470509 --0.19019 -0.000715692 -0.134823 0.0248498 -0.595927 0.802654 --0.238442 -0.368666 0.0301874 -0.691166 -0.228255 0.685703 --0.188734 0.0389441 -0.017394 -0.818485 -0.573296 0.0376026 --0.218298 -0.153888 -0.124535 -0.380573 0.918239 0.109551 -0.0398339 -0.497922 0.0400825 0.0822876 -0.996181 0.0291936 -0.107289 0.40926 0.0355377 0.0773704 0.976301 0.202115 -0.0591587 -0.315256 -0.123564 0.63132 -0.134595 -0.763753 -0.0905534 -0.49895 -0.0597696 -0.00361647 -0.999947 0.0096024 -0.101459 0.412135 0.0185797 0.0142204 0.992957 0.117617 --0.0308198 0.400156 0.0346319 -0.282182 0.954141 0.0999404 --0.0632583 0.388832 0.0279703 -0.404973 0.910497 0.0836124 --0.0750527 0.381926 0.0394793 -0.441783 0.890344 0.110068 --0.0904484 0.372544 0.0486156 -0.490793 0.859038 0.145523 --0.026752 0.00411513 -0.202109 -0.269772 -0.632002 -0.726496 -0.222875 0.3168 0.0472699 0.723671 0.63563 0.268839 -0.209064 0.328543 0.0583751 0.729539 0.640402 0.240121 --0.083632 0.342517 -0.142657 -0.433098 0.787179 -0.439062 -0.234239 0.304457 0.0455114 0.699824 0.644199 0.308633 --0.100319 0.337182 -0.135025 -0.465215 0.77858 -0.421174 --0.175225 0.283976 0.0544066 -0.865438 0.444408 0.231341 --0.145559 0.313215 -0.128058 -0.349866 0.758976 -0.549135 -0.260241 0.297972 0.0260324 0.183135 0.560882 0.807387 --0.0273007 0.334728 -0.19094 -0.263171 0.696446 -0.66761 --0.250605 0.28867 -0.134001 -0.32004 0.431212 -0.843582 -0.223645 0.276269 -0.139579 0.642858 0.170415 -0.746788 --0.273704 0.258765 -0.130835 -0.618983 0.134134 -0.773866 --0.265869 0.194547 -0.134819 -0.726974 -0.199672 -0.656993 --0.205299 0.189962 0.0459266 -0.977623 0.164366 0.131294 --0.243358 0.100784 -0.127024 -0.891441 0.0320991 0.451999 -0.20284 -0.0365916 0.0764133 0.652031 -0.732823 0.194489 -0.282636 0.0903645 0.0380962 0.983406 -0.168258 0.0678331 -0.219796 0.0409607 -0.14419 0.733394 -0.403643 -0.546997 --0.0348457 -0.103632 0.0372044 -0.799364 -0.600533 0.0194013 --0.0462806 -0.180521 0.0544534 -0.742374 0.623995 0.243949 --0.167751 -0.247916 0.0433891 -0.0614285 0.460089 0.885745 --0.0517005 -0.0403725 -0.136111 -0.337754 -0.806925 -0.484556 -0.203332 0.300051 0.134474 0.683074 0.564399 0.463534 --0.120668 -0.176144 -0.0153831 0.0102553 0.860631 0.509127 -0.0338031 -0.0664051 -0.126374 -0.048967 -0.885862 -0.461358 --0.207118 -0.277278 0.0471245 -0.368229 0.269107 0.889938 --0.260105 -0.180867 -0.129521 -0.688573 0.692851 0.214067 --0.00810858 -0.191297 -0.142679 0.543577 0.804394 -0.23974 --0.271481 -0.188399 -0.141507 -0.729924 0.577104 0.366281 -0.0192113 -0.21137 -0.135119 0.644688 0.617243 -0.450987 -0.163619 -0.288356 0.0398825 0.892586 -0.4463 0.0640854 -0.0428094 -0.262215 -0.140104 0.71756 0.112111 -0.687415 --0.293952 -0.258555 -0.138873 -0.999729 0.0232785 -0.000985604 -0.144194 -0.322124 0.027573 0.818521 -0.570476 0.0676784 --0.211393 -0.404719 0.0407037 -0.630315 -0.291214 0.719651 --0.292927 -0.288592 -0.129177 -0.990615 -0.109891 -0.0812726 --0.184341 0.0828472 -0.198515 0.439918 0.0762345 -0.894796 -0.078639 -0.498815 -0.0739445 -0.00510987 -0.999971 -0.00564766 --0.175156 -0.488829 0.0422464 -0.607614 -0.782596 0.13546 -0.1894 -0.0459633 0.0839991 0.62222 -0.74756 0.232371 --0.15461 -0.00446454 -0.0209909 -0.723798 -0.684294 -0.0886425 -0.0209566 0.410048 0.0374857 -0.110107 0.987395 0.113698 --0.00977547 0.354148 -0.174977 -0.193913 0.773312 -0.603644 --0.102549 0.367576 0.0337982 -0.516922 0.848223 0.115369 --0.0883126 0.376151 0.0292266 -0.473217 0.876161 0.091687 -0.0710941 -0.455887 -0.135638 0.658879 0.313412 -0.683851 --0.199799 -0.48912 -0.146251 -0.537489 -0.81849 -0.202927 -0.285465 0.107793 0.0304012 0.994702 -0.0935933 0.0425255 --0.0322139 -0.496688 -0.135147 -0.0210457 -0.999544 0.0216618 -0.0196552 0.384941 -0.132332 -0.0868276 0.903942 -0.418749 -0.104538 0.378034 -0.130179 0.175059 0.817483 -0.548704 --0.0603471 0.359987 -0.132272 -0.402567 0.825478 -0.395633 --0.206451 0.0910581 0.0376327 -0.878205 -0.299657 0.372775 -0.153473 -0.106911 0.0228947 0.984174 -0.156529 -0.0830642 -0.173603 0.344637 -0.141987 0.221746 0.425977 -0.877138 -0.190488 0.33679 -0.141324 0.231344 0.304609 -0.923955 --0.132017 0.325936 -0.119402 -0.439207 0.788804 -0.429983 --0.19574 -0.233309 0.0305631 -0.246683 0.519414 0.818142 -0.193027 0.127902 -0.20252 0.632252 -0.105453 -0.767552 --0.220473 -0.391213 0.0384067 -0.623388 -0.279108 0.730401 --0.227538 -0.375351 0.0380954 -0.62885 -0.233361 0.741681 --0.246518 0.272096 -0.142958 -0.350757 0.340957 -0.872191 -0.104538 -0.403476 0.0301987 0.811335 -0.226965 0.538722 -0.108235 -0.437368 0.0166916 0.708343 -0.113348 0.696708 -0.175898 0.386755 0.0328673 0.598324 0.24314 0.763474 --0.0071043 0.340188 -0.191583 -0.17229 0.715294 -0.677252 -0.23727 0.00798011 -0.0697395 0.769219 -0.580839 -0.266323 --0.194596 0.246983 0.0271852 -0.954278 0.26831 0.131767 --0.2262 0.00908388 -0.14688 -0.831939 0.0960523 0.546491 --0.224458 -0.00735638 -0.143703 -0.510551 -0.112327 0.852479 --0.162427 0.00320268 -0.143691 0.227818 -0.952379 0.202664 --0.217586 0.146925 0.0176597 -0.688554 0.322278 0.649639 --0.085652 0.371196 -0.0658153 -0.433537 0.873948 -0.219682 --0.0758648 -0.0743407 0.0429281 -0.519395 -0.854359 0.0173173 --0.0347047 -0.35628 0.113126 -0.51154 -0.303963 0.8037 --0.204768 -0.00914882 -0.139794 -0.065888 -0.421793 0.904295 --0.0846187 -0.0171186 -0.148605 -0.389159 -0.761041 -0.51901 --0.0240584 -0.138016 0.0226334 -0.996927 0.0688312 -0.0373965 --0.0840004 -0.156141 -0.118736 0.31355 0.947761 -0.0586179 -0.162009 -0.15846 0.0391702 0.959301 0.282365 0.00344647 -0.17331 -0.204999 0.0218824 0.971205 0.191008 -0.142396 --0.280107 -0.205333 -0.136936 -0.854232 0.439648 0.277484 --0.0969425 -0.218539 0.0432566 -0.425622 0.58488 0.690479 -0.0472032 -0.302055 -0.136627 0.733241 -0.0831873 -0.674861 --0.132158 -0.221565 0.0299595 -0.172332 0.548792 0.818003 --0.226576 -0.241392 0.021098 -0.488162 0.473695 0.733015 --0.161405 0.00733689 -0.0538023 -0.697556 -0.708412 -0.107555 -0.163214 -0.290378 0.0215335 0.904915 -0.42432 -0.0328801 --0.245517 -0.334394 0.0296005 -0.694902 -0.0452465 0.71768 -0.0199194 -0.486271 -0.193743 0.420003 -0.570246 -0.705986 -0.0221219 0.214062 0.2343 0.0126469 0.131055 0.991294 -0.0490004 -0.497215 -0.136687 0.20124 -0.967879 -0.150705 -0.253755 0.315815 0.0159392 0.0772693 0.481669 0.87294 -0.12176 0.356023 -0.1509 0.280567 0.696375 -0.660564 --0.214657 -0.444958 -0.180269 -0.758216 -0.451687 -0.470198 -0.178216 0.32665 -0.148777 0.347958 0.406771 -0.844668 --0.0935164 0.33066 -0.153084 -0.454809 0.741243 -0.493668 --0.203405 -0.450579 -0.191739 -0.70215 -0.457596 -0.54552 --0.207 0.198493 0.0164391 -0.967451 0.198524 0.15693 -0.231027 0.254802 -0.13806 0.734803 0.204611 -0.646683 -0.233872 0.225882 -0.145611 0.796768 0.209985 -0.566628 --0.273381 0.209194 -0.130494 -0.732021 -0.148119 -0.664986 -0.107142 -0.0753505 0.137001 0.386993 -0.702917 0.596778 --0.202548 0.213786 0.0292783 -0.969781 0.213942 0.117275 -0.241123 0.102805 -0.142923 0.820911 -0.144612 -0.552443 --0.206092 0.194862 0.0307296 -0.977275 0.180852 0.11057 --0.208865 0.175282 0.0358163 -0.983871 0.125644 0.127323 -0.178667 0.00356043 -0.157652 0.54628 -0.61379 -0.569948 --0.115846 0.00223713 -0.151608 -0.368004 -0.782666 -0.502004 -0.286441 0.125163 0.0235062 0.999413 -0.0218772 0.0263525 -0.166379 -0.0100296 -0.153391 0.504345 -0.659927 -0.556895 -0.262438 0.0276901 0.028997 0.886296 -0.461848 0.0342902 --0.16156 0.000670529 0.0126438 -0.786049 -0.618145 -0.00484527 -0.215463 -0.0332802 0.0233138 0.702518 -0.711153 0.027011 --0.0929137 -0.0637692 0.0404563 -0.564482 -0.825424 0.00588943 --0.15787 0.278852 0.112354 -0.781268 0.483007 0.39538 --0.0339005 -0.0382172 -0.150601 -0.293612 -0.795926 -0.529427 -0.264088 0.0541817 -0.0665032 0.902637 -0.349617 -0.251028 -0.168638 -0.274655 0.013027 0.945086 -0.301381 -0.126416 --0.250129 -0.362459 0.0193943 -0.751171 -0.224061 0.620917 --0.233708 -0.387936 0.027282 -0.692652 -0.304428 0.653878 -0.115363 -0.404062 0.0118581 0.888533 -0.084658 0.450935 -0.0321767 -0.228273 -0.135758 0.687131 0.458563 -0.563535 --0.299099 -0.168698 -0.248325 -0.905596 -0.140341 -0.40025 --0.223 -0.421313 0.0186501 -0.729485 -0.425614 0.535447 -0.257112 0.195209 0.122793 0.889289 0.153014 0.43099 -0.0227345 -0.390059 -0.192043 0.846006 -0.36297 -0.390546 -0.210578 0.457119 0.0209029 -0.0196127 0.326596 0.944961 -0.18962 0.457166 0.0125523 -0.467041 0.714471 0.520964 -0.0366153 -0.385768 -0.15832 0.940164 -0.17894 -0.289953 -0.213142 0.435676 0.019577 0.36941 -0.128611 0.920323 -0.0191458 -0.258955 -0.198573 0.901931 0.37245 -0.218635 -0.148728 0.424592 0.0153004 -0.46409 0.802864 0.374206 -0.000320593 0.409216 0.0118622 -0.175881 0.982985 0.052976 -0.200788 0.418861 0.0220936 0.415968 -0.136269 0.899112 --0.140665 0.343686 0.0199434 -0.567508 0.79678 0.207549 --0.127363 0.319229 -0.135938 -0.486053 0.729427 -0.481341 --0.144817 0.33575 0.0360718 -0.656629 0.709457 0.255947 --0.138418 0.305414 -0.14371 -0.458909 0.676202 -0.576328 --0.0756185 -0.192956 -0.239081 0.356993 0.717573 -0.598034 -0.225594 -0.00770391 -0.0661505 0.727878 -0.637033 -0.253737 --0.229625 -0.449882 -0.141533 -0.848288 -0.465106 -0.253149 -0.278398 0.0681778 0.0152996 0.964603 -0.263699 0.00180567 --0.103683 -0.207407 0.0291809 -0.314341 0.681813 0.660546 --0.255255 0.226179 -0.147806 -0.566676 0.027152 -0.823493 -0.239367 0.182908 -0.149897 0.830002 0.0947034 -0.549662 -0.122868 -0.354468 0.0279236 0.862971 -0.454121 0.221481 --0.235155 0.131094 -0.146681 -0.884124 0.163112 -0.437859 -0.232036 0.0850332 -0.150646 0.792373 -0.198146 -0.57696 -0.219817 0.0766436 -0.163328 0.745647 -0.236626 -0.622912 -0.0380455 -0.322886 -0.182897 0.982341 0.0673289 -0.174568 -0.0110407 -0.242705 -0.199149 0.85222 0.445262 -0.274705 --0.296641 -0.22868 -0.193093 -0.979967 -0.196189 -0.0342726 -0.110067 -0.419035 0.0171781 0.791284 -0.107865 0.601859 -0.0826598 -0.480867 0.0300315 0.664478 -0.497449 0.557686 --0.119541 -0.0375358 0.0899625 -0.658766 -0.734039 0.164967 --0.0581909 -0.4898 0.0206083 0.0197556 -0.879217 -0.476012 --0.212817 -0.477305 -0.143537 -0.766865 -0.601674 -0.223399 --0.281934 -0.193636 -0.153372 -0.773272 0.418274 0.476546 -0.0723339 0.0858134 -0.254435 0.191842 -0.277792 -0.941291 -0.159991 0.436018 0.00604662 -0.585445 0.774531 0.23949 --0.293417 -0.241561 -0.147972 -0.993112 0.0786905 0.0868146 -0.0316793 -0.275332 -0.151669 0.893847 0.0646235 -0.443691 --0.0191391 0.404802 0.0172425 -0.24551 0.9674 0.0621461 --0.156768 0.332523 0.0180062 -0.591437 0.734546 0.332632 -0.0568445 -0.48934 -0.15511 0.656291 -0.595055 -0.463887 --0.0712308 -0.496539 -0.136413 -0.00105395 -0.999113 0.042093 -0.157577 0.00502102 0.216028 0.508854 -0.556589 0.656717 -0.0543057 0.37397 -0.151633 0.0979498 0.832822 -0.544806 -0.130949 0.338355 -0.164077 0.344451 0.637732 -0.688949 -0.269466 0.311966 0.0198933 -0.0953249 0.412482 0.905964 -0.188142 0.29603 -0.159801 0.529629 0.411384 -0.741793 -0.203112 0.238272 -0.176348 0.662404 0.293436 -0.689286 --0.242286 0.217663 -0.156161 -0.492905 0.0277149 -0.869642 -0.268181 0.341448 0.007888 -0.140971 0.300505 0.943305 --0.252003 0.196964 -0.148814 -0.62291 -0.119408 -0.773127 -0.0366499 0.387472 -0.129209 -0.0102754 0.907223 -0.420525 --0.17943 0.292235 0.0213019 -0.873292 0.300356 0.383598 --0.243126 0.115362 -0.143084 -0.947979 0.317569 0.0220388 --0.0290279 -0.0729979 -0.0893287 -0.29726 -0.874028 -0.384333 --0.239118 0.0544181 -0.163583 -0.781304 -0.620255 -0.0696283 --0.108237 -0.0522591 0.0380275 -0.617076 -0.786864 -0.00786182 -0.179854 -0.0642282 0.0129505 0.659519 -0.750806 -0.0363955 --0.142931 0.0185253 -0.164919 0.320896 -0.707381 -0.629792 --0.214763 0.2847 -0.145197 -0.125547 0.50826 -0.852004 --0.0406209 -0.0975544 0.0176185 -0.70847 -0.703655 -0.0542228 --0.177108 -0.00794331 -0.14844 0.462385 -0.70596 0.536489 --0.0695311 -0.0195123 -0.156162 -0.358177 -0.74839 -0.558231 -0.266524 0.0397197 0.0551379 0.909151 -0.399191 0.118703 -0.00125149 -0.223179 -0.193254 0.770992 0.552725 -0.316333 --0.0305367 -0.109674 0.0201598 -0.864315 -0.50189 -0.0326581 --0.0245221 -0.123371 0.0111242 -0.966404 -0.241632 -0.0876223 --0.250292 -0.267522 0.014765 -0.687629 0.262496 0.676951 -0.240909 0.238767 -0.1303 0.796822 0.157036 -0.58345 --0.241815 -0.161643 -0.14921 -0.382792 0.891501 0.242272 --0.229862 -0.425421 0.00483869 -0.756292 -0.477137 0.447619 --0.21272 -0.434821 0.0227156 -0.792695 -0.352534 0.497347 -0.0454307 -0.497892 0.0216826 0.0592476 -0.997804 0.0296172 -0.0332557 -0.245332 -0.146013 0.762076 0.30001 -0.57379 -0.0325973 -0.49834 0.0074443 0.00580487 -0.999942 0.00903488 --0.060822 -0.0621077 -0.0831665 -0.416817 -0.848144 -0.32698 -0.258286 0.47548 0.00953412 0.199794 0.139374 0.969875 -0.0321797 -0.295698 -0.151232 0.927898 0.127469 -0.350366 --0.00333912 -0.324387 -0.256038 0.628362 -0.0624924 -0.775407 --0.284629 -0.304645 -0.163416 -0.945816 -0.238308 -0.220547 -0.0409943 -0.334572 -0.145693 0.976291 0.101856 -0.190998 -0.232396 0.429013 0.00934273 0.334803 -0.202217 0.920334 -0.204186 0.398252 0.0160715 0.468741 -0.140053 0.872162 --0.0858801 0.0216913 -0.19022 -0.387046 -0.592079 -0.706851 -0.23182 0.337802 0.008973 0.346252 0.42013 0.838809 --0.00513071 -0.302716 -0.256641 0.65309 0.0786508 -0.753185 --0.299971 -0.205532 -0.186711 -0.979061 -0.0747255 0.189354 --0.0345734 0.284198 -0.22785 -0.277244 0.473088 -0.836256 --0.101463 0.0328441 -0.190485 -0.393241 -0.553595 -0.734094 --0.111506 -0.248219 0.0519659 -0.453051 0.315881 0.833645 --0.110535 0.325098 -0.144641 -0.48937 0.731928 -0.474129 -0.174797 0.311363 -0.159467 0.461013 0.475772 -0.749071 --0.286721 -0.330105 -0.0539674 -0.980238 -0.137978 0.141756 --0.148449 -0.0140466 0.00504672 -0.724548 -0.686661 -0.0593875 --0.0278262 -0.153048 0.0115291 -0.888718 0.451586 -0.0790628 --0.219344 0.254141 -0.158228 -0.231123 0.309743 -0.922302 --0.258904 -0.309644 0.0149765 -0.788669 0.060574 0.611827 -0.0505055 -0.490981 0.074455 0.633156 -0.73159 0.252764 -0.107851 -0.469549 0.0117046 0.632883 -0.227081 0.740198 -0.22356 0.112127 -0.168939 0.763056 -0.134928 -0.632091 -0.0710927 -0.497435 -0.00173499 0.0773156 -0.994073 0.0764337 --0.223673 0.027444 -0.148208 -0.954771 -0.063394 0.290504 --0.228341 0.0145852 -0.162255 -0.954656 0.291757 0.0592445 -0.0622112 -0.496852 0.0169328 0.130223 -0.986808 0.0961885 --0.125348 0.0154365 -0.164866 -0.21655 -0.726721 -0.651907 --0.00511686 -0.105179 -0.0458039 -0.489975 -0.635777 -0.596416 -0.244344 0.443522 0.00857799 0.270919 -0.188256 0.944014 --0.24171 -0.0409029 -0.157821 -0.468965 -0.135246 0.8728 -0.0368491 -0.0565357 -0.145001 -0.036774 -0.87446 -0.483701 --0.000244974 -0.0522202 -0.144098 -0.190413 -0.848568 -0.493635 -0.0566439 -0.0560406 -0.145614 0.0510685 -0.873494 -0.48415 --0.245874 -0.168023 -0.133081 -0.550201 0.813554 0.188171 --0.272571 -0.176349 -0.157201 -0.591393 0.548729 0.59089 --0.293817 -0.226924 -0.158272 -0.980031 0.0733897 0.184806 -0.0283089 -0.258892 -0.157219 0.87687 0.161562 -0.452766 --0.28029 -0.321763 -0.161982 -0.932676 -0.270132 -0.23905 -0.236855 0.261206 0.120823 0.810566 0.408755 0.419408 -0.0429849 -0.352435 -0.138283 0.965172 -0.0298414 -0.259909 -0.206147 0.367402 0.0125632 0.530326 0.172699 0.830018 -0.246823 0.014338 -0.0524833 0.810726 -0.549518 -0.201873 --0.183967 0.307603 0.00978322 -0.685554 0.245969 0.685212 -0.304304 0.272609 0.019585 0.873231 -0.0945508 0.478046 --0.0695113 0.371129 0.0957997 -0.438795 0.834505 0.333258 --0.20019 0.228719 0.019012 -0.963258 0.235805 0.128572 --0.277919 -0.230482 -0.0624988 -0.888172 0.38905 0.244523 -0.258399 0.0209848 -0.0051702 0.866494 -0.495115 -0.0636344 --0.171514 0.0142585 9.90155e-005 -0.807034 -0.590493 -0.00391892 --0.305265 -0.172794 -0.20523 -0.986642 -0.0203755 0.161624 -0.0357134 0.0210872 -0.228326 -0.0260695 -0.532305 -0.846151 --0.0538201 -0.0869169 0.0142793 -0.565344 -0.820732 -0.0823752 --0.229471 0.234416 -0.160095 -0.34218 0.175477 -0.923104 --0.0220553 -0.120574 -0.00641241 -0.90284 -0.302837 -0.305239 --0.0311762 -0.10713 0.00167109 -0.834022 -0.533819 -0.139444 --0.0965082 -0.188947 0.00752711 -0.155022 0.845103 0.511633 --0.250562 0.0958519 -0.14425 -0.966832 0.135238 0.216671 --0.157968 -0.204926 0.0151664 -0.0610069 0.647019 0.760029 --0.231187 -0.208237 -0.00973266 -0.528917 0.6283 0.570513 --0.222487 -0.226 0.0126591 -0.462587 0.533849 0.707827 -0.191959 0.0135068 -0.154318 0.609315 -0.563991 -0.557359 --0.184186 -0.487879 0.00850075 -0.525107 -0.833969 0.169584 --0.233742 0.00381602 -0.176368 -0.852698 0.516627 -0.0774757 -0.291491 0.469187 0.000734432 0.441603 0.227549 0.867875 --0.0826028 -0.00642091 -0.163734 -0.372907 -0.710985 -0.596188 -0.188378 0.460694 -0.00573836 -0.618751 0.782725 0.0669967 -0.139544 -0.0236114 -0.15918 0.404462 -0.723849 -0.558975 -0.279767 0.453812 0.00426004 0.172047 -0.0550488 0.983549 -0.271522 0.423068 0.000944958 0.0399134 -0.087688 0.995348 -0.264251 0.441318 0.00408297 0.140691 -0.158101 0.977349 -0.0947687 0.413499 0.00139587 0.00499678 0.998357 0.0570779 -0.1133 0.413909 0.00538924 -0.113599 0.98755 0.108815 -0.263406 0.390493 -1.87793e-005 -0.0144777 0.0320571 0.999381 -0.245566 0.394523 0.000934289 0.142928 -0.0428092 0.988807 --0.0905778 -0.158395 -0.171187 0.276443 0.949785 -0.146587 -0.210884 0.383132 0.0104803 0.412206 -0.0619997 0.908979 -0.223913 0.398915 0.00655908 0.337025 -0.114779 0.934473 -0.119531 -0.0469023 -0.137096 0.317014 -0.823509 -0.470462 -0.00440424 -0.204731 -0.150555 0.677272 0.659543 -0.326045 --0.288535 -0.221869 -0.141673 -0.937594 0.265602 0.224439 -0.0375514 -0.309652 -0.167489 0.979438 0.201363 0.0123903 -0.0466583 -0.159152 -0.0648697 -0.118306 0.396286 -0.910473 --0.253082 0.121292 0.00469699 -0.679972 -0.382421 0.625613 -0.0586059 -0.451924 -0.151037 0.794878 0.334115 -0.506494 --0.196275 0.0583346 0.0185521 -0.844129 -0.495018 0.205922 --0.214498 -0.458779 -0.166467 -0.776559 -0.470792 -0.418701 --0.0432821 -0.382815 -0.263937 0.395407 -0.386322 -0.833311 --0.0155682 -0.0444014 -0.150031 -0.243076 -0.823556 -0.512514 --0.130222 -0.0235261 -0.0429013 -0.639994 -0.751638 -0.159527 --0.0583551 0.0490936 -0.222736 -0.329602 -0.485288 -0.809851 --0.0499983 -0.497194 -0.172388 0.0187089 -0.996409 -0.0825747 -0.0144037 0.375423 -0.149765 -0.0926474 0.860136 -0.501579 -0.0582684 -0.498831 -0.0684146 0.000117923 -0.999986 -0.00537133 -0.211755 0.172309 -0.185909 0.718429 0.0750505 -0.691539 --0.238262 -0.236977 0.0092505 -0.578598 0.473152 0.664343 --0.226072 0.213938 -0.164104 -0.382702 0.0720616 -0.921057 -0.115372 -0.452449 0.00781318 0.665469 -0.0854985 0.741513 --0.224888 0.14109 -0.156951 -0.707155 0.147255 -0.691555 -0.121841 -0.468386 0.000967375 0.604205 -0.182044 0.775756 -0.296451 0.450863 0.00110559 0.357416 0.0709153 0.931249 -0.22633 0.0953868 -0.161235 0.775163 -0.172716 -0.607693 -0.208271 0.0435064 -0.160086 0.696676 -0.381456 -0.607564 --0.0624717 0.0206644 0.23526 -0.668857 -0.314247 0.673706 -0.301948 0.432439 1.60979e-005 0.313262 0.0651294 0.947431 -0.28103 0.100818 -0.0392712 0.981907 -0.118142 -0.14799 -0.209461 0.221042 -0.176761 0.6958 0.237965 -0.677669 --0.197896 0.243199 0.0097773 -0.957003 0.242674 0.158917 --0.156813 0.00645018 -0.171413 0.792659 -0.515731 -0.325137 -0.284672 0.19049 -0.0111057 0.99661 -0.0652886 -0.0500636 --0.246666 -0.0216368 -0.167273 -0.833338 0.337329 0.437901 -0.109961 -0.0398772 -0.154358 0.288176 -0.802961 -0.521736 --0.234435 -0.0206919 -0.150775 -0.555582 -0.0267328 0.831032 --0.189338 -0.0177713 -0.147292 0.361853 -0.588399 0.723083 -0.226573 0.279287 0.12101 0.776703 0.487116 0.399312 --0.251843 -0.080161 -0.172806 -0.13505 -0.294327 0.946115 --0.211921 -0.0627507 -0.168573 0.423616 -0.535291 0.730762 --0.237884 0.167626 -0.00188663 -0.16531 0.449449 0.877877 -0.186215 -0.0238844 0.145245 0.589476 -0.718441 0.369271 --0.234204 -0.0692532 -0.1669 0.0622445 -0.424402 0.903332 --0.222729 -0.15456 -0.15405 -0.280341 0.957992 0.060499 --0.256151 -0.162293 -0.158886 -0.309868 0.74702 0.588169 --0.269306 -0.159185 -0.168772 -0.372781 0.504306 0.778916 -0.0211369 -0.240748 -0.162761 0.853555 0.335874 -0.398287 --0.263447 0.137173 0.00212572 -0.633873 -0.201825 0.74664 -0.0320776 -0.289216 -0.167832 0.973866 0.225885 -0.02368 -0.272743 0.050965 0.0044307 0.938556 -0.344129 -0.0262361 -0.248988 0.00591868 -0.00146676 0.819435 -0.57105 -0.0492823 -0.170373 -0.0707735 -0.00787179 0.676508 -0.726549 -0.120263 -0.150496 -0.104643 0.00127055 0.939629 -0.233674 -0.249988 -0.147028 -0.123182 -0.00372 0.931102 0.00120394 -0.364757 --0.192662 -0.489134 -0.160885 -0.498819 -0.819371 -0.282508 --0.101018 -0.180668 -0.00782689 -0.0226853 0.881225 0.472153 -0.168204 -0.193886 0.00871605 0.941709 0.22976 -0.245752 -0.170922 -0.227162 -0.00239791 0.948937 0.0705633 -0.307472 --0.0951034 0.309557 -0.177343 -0.470787 0.619899 -0.627762 --0.129784 0.295991 -0.161147 -0.518557 0.592002 -0.616954 --0.154926 0.275217 -0.161128 -0.354726 0.550711 -0.75557 --0.185648 0.2648 -0.159804 -0.143097 0.459934 -0.876347 -0.219574 0.231444 -0.161958 0.731465 0.252236 -0.633511 -0.122296 -0.399393 -0.00524146 0.945626 0.0644945 0.318797 --0.280861 -0.0830077 -0.187346 -0.762651 0.196108 0.616364 --0.201635 -0.476622 -0.00638179 -0.704194 -0.667264 0.242632 --0.0148898 -0.494101 -0.0090424 -0.0778712 -0.950737 -0.300057 --0.223489 0.19452 -0.165831 -0.426076 -0.0171564 -0.904525 --0.142882 -0.436529 -0.244061 -0.247764 -0.487477 -0.837245 --0.200693 0.140659 -0.175522 -0.380248 0.304468 -0.873333 -0.319255 0.326249 -0.00071322 0.904291 -0.0617262 0.422431 --0.21032 0.220441 -0.011128 -0.712422 0.222353 0.665593 -0.136342 0.323395 -0.17426 0.395419 0.58635 -0.706992 --0.276461 0.168888 -0.00468748 -0.387535 0.0539873 0.920273 -0.266598 0.0366631 -0.00192354 0.904824 -0.422782 -0.0504954 -0.192871 0.0307978 -0.168187 0.626877 -0.45534 -0.632211 --0.131394 -0.0261878 -0.0248939 -0.648691 -0.749508 -0.132055 --0.152642 0.0242131 -0.179633 0.651509 -0.405119 -0.641416 -0.192565 -0.0538707 0.0128254 0.637078 -0.770503 -0.0213777 -0.0678311 -0.0468272 -0.160108 0.109055 -0.841916 -0.528474 --0.255172 -0.0406945 -0.16881 -0.766093 0.194498 0.612594 --0.219522 -0.0776259 -0.175867 0.432634 -0.520543 0.736113 -0.112808 -0.176295 -0.0577934 0.492596 0.307917 -0.813964 --0.0564571 -0.0825015 -0.00363067 -0.5339 -0.834181 -0.138177 --0.236657 -0.156352 -0.166353 -0.0626711 0.848206 0.525946 -0.16956 -0.209242 0.00179819 0.940772 0.17925 -0.287782 -0.16511 -0.232075 -0.0177223 0.9022 0.055001 -0.427797 --0.268321 -0.143314 -0.175919 -0.200562 0.290586 0.935593 --0.285703 -0.315081 -0.146151 -0.954045 -0.23579 -0.184933 -0.283332 0.0907965 0.020078 0.985221 -0.17089 0.0116493 --0.0731262 -0.165657 -0.179765 0.348674 0.916601 -0.195623 --0.288347 -0.18213 -0.169589 -0.741546 0.313233 0.593292 --0.294337 -0.245299 -0.166987 -0.996794 -0.0796366 0.00774655 --0.253167 -0.254781 0.00585955 -0.699611 0.348824 0.623592 --0.248283 -0.399737 -0.0012144 -0.802136 -0.418317 0.426132 -0.251866 0.0517627 0.125134 0.866046 -0.353875 0.353181 --0.233677 -0.42663 -0.164639 -0.816336 -0.448212 -0.364282 --0.150949 -0.4956 -0.0298605 0.0349634 -0.999319 -0.0117891 -0.16738 0.060225 -0.204775 0.543163 -0.313209 -0.779022 --0.0993138 -0.497504 -0.154487 0.00635529 -0.999308 0.0366476 -0.0541212 0.363656 -0.166264 0.10955 0.789293 -0.604166 --0.0376444 0.34242 -0.177777 -0.314792 0.733705 -0.602149 --0.166138 -0.495979 -0.0163366 -0.0963392 -0.99425 0.0467529 --0.164452 -0.495395 0.00377229 -0.173742 -0.983712 0.0460976 -0.269285 0.4989 -0.0153435 0.142359 0.988122 0.0578662 -0.200084 0.207391 -0.190539 0.666866 0.208602 -0.715384 --0.0268107 0.354556 -0.167524 -0.280694 0.781652 -0.556984 -0.227353 0.178322 -0.167328 0.782083 0.0964 -0.615673 -0.232607 0.488863 -0.00275388 -0.351176 0.8752 0.332716 --0.211902 0.148084 -0.167344 -0.551682 0.134675 -0.82311 -0.0352559 -0.303844 -0.184716 0.972818 0.19055 -0.131591 --0.249066 0.0924798 -0.176861 -0.915853 0.168993 -0.364218 --0.24861 0.0696213 -0.171888 -0.900045 -0.341896 -0.270233 -0.20688 0.0783054 -0.178013 0.690954 -0.240036 -0.681884 --0.225046 0.0443993 -0.176679 -0.780964 -0.407465 -0.473357 --0.222217 0.0236363 -0.178493 -0.888663 0.291401 -0.354066 -0.145272 0.426256 -0.00477225 -0.523169 0.847879 0.0860009 -0.140168 0.42338 -0.0239676 -0.476226 0.877347 -0.0589195 -0.149406 -0.00866502 -0.16907 0.45375 -0.652192 -0.607252 --0.099538 0.0189722 -0.180078 -0.387643 -0.619283 -0.682804 -0.0177342 -0.498155 -0.145674 0.0106723 -0.999719 -0.021163 --0.165943 -0.0102313 -0.177925 0.882946 -0.45886 -0.0992707 -0.0793646 0.414614 -0.0107937 0.0262606 0.999653 0.00192103 -0.0919767 0.41419 -0.0206444 -0.00594656 0.998473 -0.0549251 --0.244814 -0.0134611 -0.183602 -0.830532 0.556944 -0.00538381 --0.00692974 -0.0276863 -0.177815 -0.233678 -0.739778 -0.63097 -0.325312 0.386123 -0.0158537 0.976565 0.0265209 0.213583 -0.321009 0.401484 -0.00693997 0.787187 0.111711 0.606513 --0.113425 0.326829 0.120791 -0.605463 0.671061 0.427891 -0.322922 0.330995 -0.0204959 0.989439 -0.143285 0.0219084 --0.048703 -0.348053 -0.278471 0.357865 -0.224364 -0.906418 -0.305616 0.259745 -0.00953838 0.948568 -0.316269 -0.0138515 --0.236672 -0.0849515 -0.174999 0.153253 -0.420187 0.894403 -0.300484 0.245509 -0.00697983 0.934193 -0.356584 -0.0114331 --0.221224 0.201225 -0.0108951 -0.479706 0.301818 0.823886 --0.229934 -0.128366 -0.191474 0.770553 0.151452 0.61912 -0.277762 0.0927428 -0.0509277 0.97002 -0.14856 -0.192332 --0.266845 0.185217 -0.00917026 0.011008 0.317875 0.948069 -0.106124 -0.312065 0.125727 0.48134 -0.626575 0.612956 --0.170918 -0.00482203 -0.195077 0.821267 -0.186132 -0.539328 -0.142662 -0.139625 -0.0163147 0.851105 0.129667 -0.50873 -0.123687 0.00785791 -0.200521 0.35989 -0.572374 -0.736795 -0.137134 -0.460871 -0.0102946 0.659347 -0.0152546 0.751684 --0.0917639 0.238573 -0.221997 -0.473011 0.268985 -0.838992 -0.275477 0.165443 0.0826578 0.956768 0.0913365 0.276137 --0.282526 -0.167913 -0.17188 -0.5859 0.374898 0.718452 -0.121119 -0.487917 -0.00668261 0.42487 -0.650646 0.629401 -0.0254593 -0.269562 -0.174208 0.946984 0.286381 -0.145629 --0.233977 -0.436779 -0.149746 -0.841319 -0.455006 -0.291808 -0.0596283 -0.498479 -0.0149892 0.0225735 -0.999341 0.0284243 -0.0410414 -0.498746 -0.0271626 -0.0126833 -0.99989 0.00774003 -0.188299 0.46 -0.0233338 -0.618874 0.779894 -0.0936017 --0.21727 0.330853 -0.0110384 -0.210246 0.338384 0.91722 -0.0383055 -0.460016 -0.183392 0.707897 0.142768 -0.691737 --0.0670009 -0.497618 -0.170883 0.0254883 -0.998732 -0.0434204 --0.0228042 -0.185321 -0.154122 0.496287 0.846824 -0.191281 --0.257657 0.201237 -0.015826 0.0552397 0.309076 0.949432 -0.00188757 0.36593 -0.162039 -0.146385 0.819283 -0.554389 -0.276615 0.0630728 -0.00606262 0.958471 -0.281178 -0.0476696 --0.0496076 0.330555 -0.184824 -0.34573 0.690342 -0.635531 -0.198997 -0.0473221 -0.00757761 0.645241 -0.759662 -0.0810972 -0.160129 0.290195 -0.184192 0.493463 0.467189 -0.733641 -0.150473 -0.154491 -0.00787134 0.87121 0.243916 -0.426027 --0.130369 0.265239 -0.18447 -0.532999 0.438313 -0.723736 --0.203973 -0.199824 -0.000314282 -0.307938 0.701076 0.64317 --0.171167 0.227789 -0.17799 -0.347465 0.265845 -0.899219 --0.194698 0.180143 -0.177247 -0.365434 0.0116778 -0.930764 -0.0350772 0.205037 -0.263054 0.0465483 0.164604 -0.985261 --0.215958 -0.196688 -0.0109164 -0.405017 0.704276 0.583058 --0.186148 0.149404 -0.180468 -0.397857 0.0598052 -0.915496 --0.18666 0.129286 -0.18387 -0.169088 0.317035 -0.933219 --0.205279 0.124781 -0.185475 -0.131945 0.666655 -0.733595 --0.260369 -0.235889 -0.0164346 -0.739113 0.435615 0.513762 --0.224317 0.121211 -0.182768 -0.419767 0.738037 -0.528297 --0.0670761 -0.322286 0.0945961 -0.71331 -0.131298 0.68844 -0.163574 -0.254593 -0.0200984 0.901943 -0.0898072 -0.422413 --0.135443 0.0453935 -0.18482 -0.108326 -0.421775 -0.900206 -0.181589 0.0177888 -0.168769 0.56434 -0.539276 -0.625062 -0.169485 -0.248898 -0.00655404 0.946894 -0.0784354 -0.311832 --0.278678 -0.345828 -0.0277967 -0.942401 -0.187015 0.277319 --0.258779 -0.393553 -0.0174777 -0.850962 -0.421266 0.313687 -0.138152 0.000329399 -0.185796 0.419438 -0.616488 -0.666344 --0.161726 0.0100633 -0.18716 0.825665 -0.261728 -0.499776 --0.156882 0.0223561 0.108298 -0.854772 -0.378696 0.354899 -0.0466697 -0.0476824 -0.161051 0.00982396 -0.849935 -0.526796 -0.157059 0.435535 -0.0145143 -0.600906 0.799297 -0.00598713 -0.0186418 0.412486 -0.0203801 -0.117349 0.991954 -0.0474971 --0.265589 -0.0508396 -0.179618 -0.816921 0.293946 0.496221 --0.0919431 0.375947 -0.00744563 -0.46438 0.885573 -0.0105124 --0.239877 0.330469 -0.104833 -0.0464242 0.741483 -0.669363 -0.0522626 0.204442 -0.261764 0.120769 0.171633 -0.977731 -0.0862318 0.382321 -0.129718 0.152054 0.85671 -0.492877 --0.197379 0.293097 -0.141232 -0.0330425 0.587782 -0.808344 --0.24139 -0.119784 -0.182032 0.367145 0.0573076 0.928397 --0.199766 0.249659 -0.0063999 -0.837068 0.169974 0.520024 --0.224489 0.0810458 -0.0383477 -0.752073 -0.659075 -0.00230068 --0.204366 0.273441 -0.153077 -0.122279 0.45893 -0.880017 --0.301666 0.230832 -0.0197228 -0.322411 0.036014 0.945915 -0.00217172 0.193979 -0.263119 -0.134149 0.123762 -0.983202 -0.205143 0.285576 -0.151958 0.60067 0.298553 -0.741661 --0.174952 -0.364861 -0.265962 -0.427454 -0.326747 -0.842923 --0.234033 -0.140138 -0.177867 0.387607 0.511831 0.766674 --0.23672 -0.00441334 -0.161768 -0.876861 0.34659 0.333152 --0.161616 0.0102805 -0.0719941 -0.666318 -0.739257 -0.0975703 --0.0371041 -0.18065 -0.17079 0.477156 0.855665 -0.200397 --0.295826 -0.232711 -0.176733 -0.99411 -0.0964069 0.0494993 -0.010951 -0.231788 -0.180113 0.848926 0.441409 -0.29066 --0.293502 -0.259957 -0.154628 -0.996416 -0.0712833 -0.0455312 --0.290038 0.216484 -0.0173544 -0.106797 0.154145 0.982259 --0.269062 0.218065 -0.0198265 0.08579 0.237022 0.967709 -0.00240592 0.410099 -0.0102842 -0.173105 0.98486 -0.00923643 --0.26905 -0.335575 -0.182767 -0.876754 -0.323481 -0.355898 -0.285231 0.125913 -0.0196739 0.994929 -0.0387188 -0.0928261 --0.188431 0.263977 0.0331166 -0.933743 0.32362 0.152951 -0.00558207 -0.496635 -0.180972 0.107771 -0.964907 -0.239456 --0.16257 -0.494965 -0.180085 -0.216774 -0.9474 -0.235462 --0.250465 0.11077 -0.0093988 -0.74493 -0.645754 0.167576 -0.186794 0.245707 -0.187719 0.613107 0.321224 -0.721745 --0.153026 0.232661 -0.185115 -0.466726 0.29286 -0.834506 --0.171126 0.204369 -0.183746 -0.381398 0.17618 -0.907467 -0.209502 0.157263 -0.18883 0.707848 0.0115089 -0.706271 --0.201231 0.0598179 0.000655825 -0.806855 -0.566263 0.168317 --0.158541 0.00183519 -0.0371741 -0.715912 -0.690615 -0.102569 --0.101881 -0.0486321 -0.0273744 -0.591598 -0.791464 -0.153615 --0.208243 0.113392 -0.199159 0.0135596 0.631008 -0.775658 --0.101824 -0.0537022 -0.000888922 -0.592633 -0.796101 -0.122516 --0.0532122 -0.170579 -0.006644 -0.404382 0.902766 0.14659 --0.238663 0.111728 -0.178272 -0.735289 0.543601 -0.404782 -0.200729 0.0932609 -0.188582 0.670671 -0.190311 -0.716926 --0.148038 -0.191471 0.00336939 -0.0669119 0.720482 0.690238 -0.068068 -0.0634329 -0.130323 0.103898 -0.879111 -0.465155 --0.235671 0.0578085 -0.181854 -0.658822 -0.586752 -0.470825 -0.198608 0.0467943 -0.17274 0.662404 -0.362664 -0.655512 -0.161808 -0.193778 -0.00887192 0.88802 0.238906 -0.392868 --0.120157 0.0403025 -0.186171 -0.307215 -0.509334 -0.803865 --0.210857 0.0343577 -0.189969 -0.612677 0.147205 -0.776504 -0.16465 -0.272325 -0.00841697 0.926413 -0.241831 -0.288578 --0.285698 -0.293552 -0.0398533 -0.962049 0.028412 0.271393 --0.280296 -0.28049 -0.0267867 -0.924143 0.108513 0.366313 --0.163535 0.0314781 -0.195572 0.575048 -0.0509511 -0.816531 -0.134542 -0.497411 -0.0382139 0.174033 -0.966633 0.187971 -0.13645 -0.490748 -0.0212061 0.44592 -0.705301 0.551095 -0.123622 0.41624 -0.029397 -0.238022 0.965681 -0.103951 --0.273585 -0.0896972 -0.264835 -0.620375 0.463623 -0.632605 -0.325522 0.369779 -0.0249653 0.999802 -0.0127427 -0.0152775 --0.0451759 -0.242254 -0.264696 0.446053 0.48172 -0.754309 -0.316693 0.303547 -0.0308652 0.966859 -0.222729 -0.124803 --0.278542 0.314921 -0.0244283 -0.0329394 -0.0169397 0.999314 --0.30668 0.287722 -0.0247767 -0.282624 0.051214 0.957863 --0.288438 0.285751 -0.0245489 0.0419892 0.0181038 0.998954 --0.0221394 -0.191095 -0.173853 0.568102 0.783259 -0.252519 --0.298367 0.26931 -0.023559 -0.0700059 0.0668205 0.995306 --0.273808 -0.338345 -0.166973 -0.907758 -0.312728 -0.279602 -0.234243 0.130705 -0.158244 0.809408 -0.0773267 -0.582133 --0.259003 0.235378 -0.0242733 0.0576258 0.157736 0.985798 --0.247395 0.218811 -0.0213515 -0.0317319 0.235253 0.971416 --0.099451 -0.0378739 0.138492 -0.593772 -0.716378 0.366383 -0.283974 0.142946 -0.0325854 0.99223 0.0146368 -0.12355 -0.0049412 0.352454 -0.180592 -0.114951 0.763083 -0.635996 -0.2845 0.15923 -0.021432 0.995058 0.044861 -0.0885791 -0.0336417 0.345102 -0.190465 0.0443174 0.719724 -0.692845 -0.100435 0.332505 -0.184606 0.308452 0.639161 -0.704507 --0.069567 0.306098 -0.197553 -0.402319 0.591631 -0.69865 --0.272901 0.138148 -0.0140568 -0.81844 -0.509762 0.26514 --0.199914 0.0541902 -0.0179697 -0.789453 -0.607483 0.0879135 --0.111302 -0.0436234 -0.0160109 -0.601147 -0.78572 -0.145833 -0.148828 -0.169224 -0.0196075 0.817246 0.26411 -0.512206 --0.137041 -0.171438 -0.0229184 0.00931237 0.865748 0.500393 -0.191785 0.279065 -0.166669 0.59796 0.377731 -0.706939 --0.175487 0.0995726 -0.190427 0.180639 0.156361 -0.971041 -0.140848 -0.321974 -0.0174086 0.871287 -0.44063 -0.216112 --0.161734 -0.38091 -0.266016 -0.367064 -0.356599 -0.859128 --0.23491 -0.43939 -0.0264548 -0.823501 -0.497278 0.27306 --0.243448 -0.423987 -0.0233949 -0.817297 -0.503751 0.27975 -0.0693705 0.201285 -0.259534 0.201101 0.163982 -0.965748 --0.111519 -0.0281881 -0.0871511 -0.578517 -0.787863 -0.211162 -0.184483 0.0434931 -0.18391 0.60303 -0.383344 -0.699573 --0.115351 -0.497161 -0.0174169 0.109366 -0.993748 0.0224673 -0.249532 0.496647 -0.0118621 -0.19563 0.972976 0.122662 -0.173102 0.447887 -0.0173198 -0.625922 0.778739 -0.042285 --0.262901 -0.0955654 -0.276361 -0.302516 0.413518 -0.858771 --0.157146 0.128013 -0.194281 -0.46512 -0.0545913 -0.883563 --0.267014 0.356975 -0.0375649 -0.0289844 0.925606 0.377378 -0.122147 -0.00709794 -0.188249 0.360822 -0.647838 -0.670905 --0.260129 -0.395947 -0.13169 -0.888893 -0.417321 -0.188979 --0.273926 0.35083 -0.0737499 -0.138979 0.859717 -0.491499 --0.193667 -0.0543319 -0.180252 0.712635 -0.608956 0.348316 --0.297022 0.344128 -0.0305563 -0.369997 0.526819 0.765221 -0.28359 0.170352 0.0406465 0.992627 0.0545278 0.10825 --0.298446 0.324906 -0.0260808 -0.239073 0.153717 0.958757 --0.316866 0.302569 -0.0303418 -0.665673 0.123841 0.735896 -0.217388 0.026364 -0.13525 0.7144 -0.496207 -0.493368 --0.221158 -0.143996 -0.192171 0.555643 0.708119 0.435692 --0.11482 0.27479 0.17008 -0.590562 0.395337 0.703523 --0.159081 -0.00136278 -0.00446827 -0.755204 -0.653193 -0.0548339 -0.244263 0.00512708 -0.0337563 0.797671 -0.58359 -0.152133 --0.0104071 -0.204976 -0.184385 0.660339 0.681567 -0.315307 -0.25149 0.0118225 -0.0187866 0.832472 -0.543973 -0.105276 --0.076176 -0.0673309 -0.0250936 -0.532258 -0.834169 -0.144441 --0.0896029 -0.0601359 -0.0143037 -0.564234 -0.813355 -0.141755 -0.0202 -0.408677 -0.180685 0.82855 -0.154236 -0.538252 -0.00920009 -0.4185 -0.190699 0.710229 -0.129256 -0.692002 -0.0254023 -0.44796 -0.191129 0.564624 0.296009 -0.77044 -0.0572021 0.185716 -0.263661 0.143943 0.108355 -0.983636 --0.180455 -0.488598 -0.179168 -0.452132 -0.804531 -0.385107 --0.104314 -0.172055 -0.0244684 0.0554393 0.89934 0.43372 -0.151512 -0.457702 -0.0244168 0.772251 0.142245 0.619189 -0.0192207 0.406649 -0.0636753 -0.108627 0.973933 -0.199136 -0.147881 -0.476092 -0.0213927 0.668126 -0.242149 0.703542 -0.017926 0.364658 -0.16674 -0.0551706 0.807245 -0.587632 -0.275944 0.491911 -0.0320967 0.254019 0.853706 -0.4546 -0.132351 0.311835 -0.185884 0.40696 0.55402 -0.726254 --0.0975889 0.207346 -0.226809 -0.47292 0.182515 -0.861995 --0.137943 0.246526 -0.188983 -0.515178 0.351067 -0.781885 -0.204689 0.187024 -0.19095 0.690845 0.134985 -0.71029 --0.112796 0.302466 -0.169789 -0.519756 0.593879 -0.614135 --0.17162 0.117815 -0.188006 -0.158609 0.121726 -0.979809 -0.0585454 0.414935 -0.0123907 -0.00432233 0.999926 -0.0113981 --0.120707 0.311589 -0.153313 -0.516999 0.657081 -0.548595 --0.0650369 0.385396 -0.0452205 -0.40302 0.901241 -0.159183 -0.120877 0.40435 0.0476908 0.180593 0.928429 0.324662 --0.19332 0.0989153 -0.201317 0.411389 0.30176 -0.860058 --0.241455 0.0755908 -0.18891 -0.787749 -0.216152 -0.576828 -0.103159 0.406399 0.0522698 0.144983 0.963293 0.225936 --0.156876 0.0707403 -0.190992 0.0877729 -0.02314 -0.995872 -0.0291073 -0.498643 -0.0454683 -0.0843972 -0.996272 0.0178534 -0.0836793 0.412764 0.0189247 0.0454997 0.995895 0.0782456 --0.107604 0.0477951 -0.197338 -0.414137 -0.473975 -0.77707 --0.216406 0.0511591 -0.190236 -0.460738 -0.48022 -0.746397 --0.319071 0.273361 -0.0294111 -0.683983 0.0172377 0.729294 -0.294747 0.235904 -0.0286346 0.918536 -0.365863 -0.149788 -0.203103 -0.0414642 -0.0244927 0.653272 -0.745659 -0.131257 --0.0209079 -0.105216 -0.0305008 -0.620476 -0.643473 -0.448276 -0.00716605 -0.119299 -0.0441514 -0.557824 -0.376514 -0.739641 --0.264533 -0.227143 -0.0317715 -0.772045 0.471341 0.426362 -0.0911586 -0.0194381 -0.189258 0.220539 -0.707959 -0.670937 -0.0728684 -0.0261761 -0.186808 0.136653 -0.742972 -0.655225 -0.155815 -0.255256 -0.0339386 0.860233 -0.0809675 -0.503431 --0.179748 -0.0429106 -0.188198 0.849264 -0.527713 0.0164238 -0.123343 -0.382244 -0.036488 0.983918 0.151332 -0.0948945 --0.293698 -0.119905 -0.192708 -0.735516 0.163411 0.657505 --0.262827 -0.396564 -0.0382225 -0.876633 -0.446385 0.179595 --0.212636 -0.470425 -0.0226263 -0.747047 -0.608615 0.267411 --0.276775 -0.370304 -0.0958552 -0.931348 -0.353899 -0.0857042 --0.287278 -0.153101 -0.180597 -0.565854 0.237605 0.789527 -0.106313 0.251345 -0.233074 0.345429 0.350784 -0.870419 --0.297797 -0.169351 -0.185465 -0.809138 0.181895 0.558757 --0.30049 -0.185446 -0.187226 -0.927953 0.0646164 0.367053 -0.0635791 0.167765 -0.264069 0.177627 0.0684305 -0.981716 -0.0190171 -0.251457 -0.178888 0.913877 0.32855 -0.238502 --0.0803716 -0.424224 -0.252884 0.191289 -0.530837 -0.825603 --0.170436 -0.496109 -0.0389164 -0.0601794 -0.998087 0.0141972 -0.245042 0.486359 -0.0422157 -0.17243 0.864553 -0.472033 -0.0283534 -0.392032 -0.176873 0.891098 -0.287181 -0.351384 -0.210986 0.472435 -0.0405755 -0.489294 0.822081 -0.291159 -0.188207 0.451968 -0.0538731 -0.545664 0.77716 -0.313486 -0.00212429 -0.491503 -0.196782 0.131096 -0.747075 -0.651685 -0.325692 0.400122 -0.0276137 0.998712 0.0422419 -0.0280951 --0.0970603 -0.497084 -0.187925 0.0162015 -0.9937 -0.110895 -0.068099 0.327163 -0.200994 0.201872 0.62807 -0.751516 --0.276254 -0.110492 -0.181982 -0.376412 0.0640301 0.924237 -0.170971 0.2523 -0.197395 0.5559 0.3496 -0.754158 --0.320997 0.240064 -0.0467949 -0.981387 -0.192031 0.00216182 --0.139902 0.226931 -0.195071 -0.525912 0.261596 -0.809311 -0.192374 0.19066 -0.201329 0.637448 0.152216 -0.755308 --0.244205 0.145935 -0.136518 -0.787883 -0.303507 -0.53584 --0.29778 0.17827 -0.0431784 -0.877875 -0.472149 -0.0800708 --0.289707 0.162619 -0.0315011 -0.858736 -0.512418 0.000911059 -0.281939 0.164413 -0.0399215 0.988122 0.0393269 -0.148553 --0.169708 0.0831656 -0.192594 0.20127 0.0999671 -0.974421 -0.184819 0.089315 -0.201534 0.613133 -0.203786 -0.763243 --0.141075 0.0776179 -0.195002 -0.295545 -0.223102 -0.928913 -0.075137 0.180495 -0.260858 0.226392 0.0929134 -0.969595 --0.11526 -0.0367431 -0.0362817 -0.605148 -0.780745 -0.155672 --0.226856 0.0654966 -0.198054 -0.483279 -0.47671 -0.734295 --0.0619252 -0.0738553 -0.0377218 -0.517826 -0.843647 -0.141835 -0.201626 -0.00525016 -0.118635 0.637586 -0.636509 -0.433982 --0.247113 -0.0987123 -0.178651 0.140606 -0.226901 0.963715 --0.131564 -0.161602 -0.0427779 0.0536438 0.921899 0.383698 --0.0872999 -0.174396 -0.0219159 0.0264465 0.922661 0.384705 -0.13999 -0.17511 -0.0339588 0.738299 0.259138 -0.622705 -0.129292 -0.160998 -0.0400794 0.673055 0.241258 -0.699136 --0.182288 0.029303 -0.202658 0.122297 0.244658 -0.961866 --0.227551 -0.183847 -0.0391963 -0.501334 0.748165 0.434642 -0.167167 0.0419431 -0.196795 0.533048 -0.395807 -0.747795 -0.0502986 -0.0650632 -0.129292 0.0198864 -0.88377 -0.467499 --0.213664 0.0175127 -0.19924 -0.553688 0.585146 -0.592482 --0.0567543 0.000505572 -0.185655 -0.321994 -0.674533 -0.664323 --0.171661 0.015315 -0.200128 0.609455 -0.0390879 -0.791857 -0.14855 -0.266466 -0.0434085 0.810637 -0.124645 -0.572129 --0.277202 -0.363628 -0.0404109 -0.938339 -0.292928 0.183612 --0.25381 -0.410425 -0.0311911 -0.85149 -0.476331 0.219257 -0.161142 -0.455085 -0.0409527 0.881186 0.281843 0.379574 -0.0637417 -0.0733256 -0.112318 0.0825074 -0.880597 -0.466629 --0.215283 -0.0976872 -0.197252 0.809433 -0.430641 0.399207 --0.221462 -0.113814 -0.202372 0.875405 -0.204785 0.437868 -0.129096 -0.498873 -0.0564431 0.0404313 -0.998461 0.0379617 -0.221304 0.469849 -0.0571803 -0.339268 0.809738 -0.478771 -0.229032 0.480668 -0.0425102 -0.352036 0.851619 -0.38835 --0.170136 -0.153997 -0.193595 0.0070891 0.956305 -0.292286 --0.0333885 0.397363 -0.048812 -0.31776 0.932456 -0.171911 --0.0634863 -0.173315 -0.194103 0.398262 0.870915 -0.287915 --0.0777407 0.381774 -0.0317689 -0.428196 0.897318 -0.107091 -0.0332777 -0.313022 -0.199576 0.953107 0.0965404 -0.286822 --0.0514428 -0.077432 -0.0512488 -0.459403 -0.85846 -0.228027 --0.266498 -0.07247 -0.176084 -0.577203 0.021466 0.816319 --0.151164 -0.166719 -0.0311661 -0.0243236 0.883865 0.46711 --0.165776 -0.161837 -0.0429132 -0.084748 0.910467 0.404806 --0.201444 -0.172942 -0.0349784 -0.297908 0.836422 0.460052 -0.147929 -0.22663 -0.0440295 0.761124 0.14871 -0.631329 --0.00911933 0.176942 -0.262832 -0.190516 0.0642465 -0.979579 --0.221676 -0.416155 -0.195983 -0.735411 -0.4428 -0.512932 --0.0122156 0.157548 -0.262965 -0.192596 0.00321827 -0.981273 -0.128206 -0.400134 -0.0344419 0.93958 0.341903 0.017083 -0.304687 0.286108 -0.0585446 0.893357 -0.261233 -0.36561 -0.281176 0.17483 0.0558251 0.981505 0.0630922 0.180741 --0.0276887 -0.493904 -0.193084 -0.0605114 -0.811762 -0.580845 --0.132973 -0.497174 -0.1822 -0.0375436 -0.9948 -0.0946773 --0.147472 -0.494107 -0.193688 -0.179583 -0.928241 -0.325758 --0.27106 0.137899 -0.0438841 -0.793366 -0.59392 -0.133527 --0.234277 0.0918094 -0.029152 -0.734859 -0.678159 0.0090757 --0.102945 0.264131 -0.204893 -0.506139 0.395206 -0.766574 -0.197895 0.169714 -0.199575 0.668055 0.064843 -0.741281 --0.12166 -0.0244625 -0.0710749 -0.614079 -0.769182 -0.176824 --0.227133 0.107671 -0.197439 -0.490549 0.512639 -0.704672 --0.0908645 -0.0548396 -0.0370888 -0.573424 -0.803715 -0.158831 --0.143581 0.115414 -0.200665 -0.51277 -0.127382 -0.849024 --0.220395 -0.473026 -0.0544024 -0.763629 -0.62941 0.143921 --0.209036 -0.482 -0.042376 -0.645236 -0.740804 0.186759 --0.266191 -0.396829 -0.0756393 -0.897236 -0.441551 -0.000220296 --0.15685 0.151167 -0.19599 -0.514381 -0.0151114 -0.857428 -0.30194 0.45237 -0.0528704 0.671081 0.445055 -0.592939 --0.174278 0.0642559 -0.196007 0.241644 0.0695166 -0.967872 -0.0694136 0.411586 -0.0437511 0.0226303 0.985857 -0.166053 --0.196397 0.043418 -0.195202 -0.232478 -0.00647761 -0.97258 --0.0179899 -0.0343312 -0.164525 -0.267302 -0.77952 -0.566479 -0.279042 0.126865 -0.0603277 0.97511 -0.0328721 -0.219273 --0.211383 0.0663579 -0.0292804 -0.754614 -0.653492 0.0592171 --0.123297 0.235612 -0.203515 -0.530526 0.280861 -0.799787 -0.146942 0.0322019 -0.204255 0.448703 -0.446333 -0.774243 --0.133219 -0.0170745 -0.060031 -0.644974 -0.747073 -0.160906 --0.0173109 -0.0110508 -0.191463 -0.256632 -0.680914 -0.685928 -0.188825 -0.0528303 -0.026896 0.61215 -0.776215 -0.150873 -0.0383457 -0.0364237 -0.177464 -0.0405052 -0.786192 -0.616653 -0.00941705 -0.498622 0.0338506 -0.00185106 -0.999811 -0.0193755 --0.19069 -0.0516204 -0.20037 0.843258 -0.504548 -0.185332 --0.275471 -0.0620653 -0.190862 -0.849875 0.392551 0.351591 --0.205867 -0.0822465 -0.207571 0.924061 -0.381468 0.0243584 -0.11111 -0.117022 -0.0504668 0.507854 -0.223477 -0.831951 -0.104177 -0.146716 -0.0536962 0.415518 0.148143 -0.89744 --0.21884 -0.133435 -0.204843 0.871719 0.31366 0.376461 --0.148906 -0.157473 -0.0518783 0.00202462 0.934877 0.354965 -0.0374325 0.414168 -0.0111623 -0.0603732 0.998125 -0.0101232 --0.292502 -0.277557 -0.144533 -0.990451 -0.103801 -0.0907319 --0.25099 -0.132093 -0.178669 0.0583553 0.220233 0.9737 --0.302095 -0.155596 -0.196753 -0.886557 0.0961669 0.452514 --0.293295 -0.246339 -0.188322 -0.971677 -0.210016 -0.108342 -0.0350162 0.41351 0.00807732 -0.0641468 0.996766 0.048405 -0.00146988 -0.411945 -0.206758 0.708869 -0.467845 -0.527851 --0.00586191 -0.428045 -0.202198 0.611707 -0.198794 -0.765699 -0.151791 -0.490422 -0.0344937 0.567266 -0.685385 0.456572 -0.0458817 -0.49886 -0.0503152 -0.00410699 -0.999987 0.00288659 -0.239193 0.473917 -0.0591993 -0.138147 0.794999 -0.590671 --0.225915 -0.0948245 -0.182868 0.471302 -0.436538 0.766361 --0.203956 -0.153662 -0.0978765 -0.321923 0.928219 0.186481 -0.307852 0.436238 -0.05641 0.752685 0.346177 -0.560024 -0.317178 0.416468 -0.0529276 0.873511 0.192379 -0.44718 --0.172207 -0.472439 -0.206506 -0.50611 -0.563419 -0.653002 -0.00621408 -0.474652 -0.203443 0.250888 -0.175369 -0.951998 --0.285139 -0.328722 -0.130614 -0.954763 -0.250961 -0.15952 --0.0677756 0.380026 -0.0642224 -0.411378 0.886149 -0.213325 --0.3248 0.297204 -0.0477878 -0.990776 0.107931 0.0819344 --0.247882 0.111547 -0.0590888 -0.778691 -0.611213 -0.141633 --0.212272 0.0669632 -0.0472578 -0.762034 -0.64725 -0.019296 --0.0262436 0.166771 -0.259617 -0.238768 0.0410244 -0.97021 -0.178593 -0.0556663 -0.045784 0.570391 -0.789176 -0.227717 -0.11425 0.309877 -0.196968 0.359799 0.557891 -0.747865 --0.0781526 0.289605 -0.205058 -0.433139 0.514433 -0.740101 --0.110306 -0.160143 -0.0529959 0.0926443 0.945377 0.312537 -0.127798 0.299224 -0.197474 0.406254 0.520511 -0.751017 -0.183629 0.177586 -0.210576 0.599626 0.0997127 -0.794044 -0.184434 0.140729 -0.210373 0.59931 -0.0663262 -0.797764 --0.145061 0.137431 -0.202995 -0.544351 -0.0768857 -0.835327 --0.215193 -0.174295 -0.0438264 -0.400258 0.81747 0.414169 --0.211898 0.0965865 -0.208444 -0.0642711 0.278579 -0.95826 -0.134631 -0.201739 -0.0507882 0.669816 0.249081 -0.699504 --0.19867 0.0797753 -0.208784 0.295431 -0.0898588 -0.951129 --0.264845 -0.205968 -0.0642105 -0.776344 0.562424 0.284552 --0.286458 -0.31317 -0.0447306 -0.974117 -0.0495774 0.220539 --0.290079 -0.313996 -0.06495 -0.98834 -0.0911004 0.122006 --0.249525 -0.426414 -0.0593499 -0.872943 -0.480074 0.0865984 -0.161207 -0.44561 -0.0568805 0.875387 0.467724 0.122195 --0.222946 0.000861546 -0.210821 -0.523438 0.671904 -0.523983 -0.0956326 0.147463 0.241943 0.571993 0.653146 0.49621 -0.159537 0.433238 -0.0463518 -0.578672 0.789333 -0.205164 --0.172742 -0.0237388 -0.186052 0.92431 -0.371659 -0.0867192 -0.0842122 0.329618 -0.193598 0.262207 0.63556 -0.726162 --0.0818724 0.377104 -0.0475643 -0.433562 0.885044 -0.169474 -0.317542 0.333556 -0.052694 0.935353 -0.121488 -0.332197 --0.321337 0.273627 -0.0655925 -0.94054 -0.0441517 -0.336801 --0.206823 -0.146775 -0.204671 0.536967 0.839959 0.0783273 --0.315149 0.223069 -0.0568652 -0.945166 -0.2754 -0.175546 -0.00124416 -0.235286 -0.212351 0.750163 0.519002 -0.409747 --0.278332 0.151081 -0.0563664 -0.804332 -0.569186 -0.170517 --0.284083 0.163786 -0.0690763 -0.823249 -0.52861 -0.206963 -0.0883882 -0.134356 -0.0576798 0.25709 0.00497414 -0.966375 --0.265219 -0.397588 -0.093724 -0.898888 -0.431915 -0.0738289 -0.0127324 -0.402055 -0.199205 0.765913 -0.435436 -0.473047 --0.210399 -0.416752 -0.209898 -0.671598 -0.443488 -0.593527 --0.00797303 -0.44745 -0.204646 0.284518 0.0126952 -0.958587 -0.0290983 -0.148939 -0.0560912 -0.356343 0.284444 -0.890007 --0.181603 -0.159125 -0.0553023 -0.1634 0.926267 0.339603 -0.124042 -0.225897 -0.0666262 0.614172 0.160963 -0.772582 --0.235356 -0.00280137 -0.194215 -0.751365 0.616407 -0.235569 -0.136156 -0.302367 -0.0477438 0.811929 -0.271518 -0.516769 --0.0265955 -0.455294 -0.205876 0.240537 -0.29738 -0.923963 -0.0808181 0.143981 -0.26083 0.258161 -0.0158019 -0.965973 --0.2848 -0.346871 -0.0676228 -0.971039 -0.232977 0.0529709 -0.167532 -0.464029 -0.0547125 0.971605 0.136925 0.192963 --0.140211 -0.495195 -0.0651055 -0.0121549 -0.999457 0.0306218 --0.155251 -0.495565 -0.052203 0.036399 -0.999319 0.00612616 -0.133636 -0.0594512 -0.101137 0.374625 -0.833029 -0.407087 -0.0369773 -0.498894 -0.0656276 -0.0103579 -0.99994 -0.0034641 --0.0141255 -0.483552 -0.203099 -0.0357993 -0.490325 -0.870804 -0.258877 0.466691 -0.0675613 0.137962 0.694321 -0.706317 --0.0523468 -0.479467 -0.203369 0.288616 -0.56314 -0.774322 --0.271742 -0.354019 -0.154117 -0.907523 -0.334477 -0.254024 -0.115012 0.312274 0.19144 0.27747 0.512743 0.812469 -0.289042 0.245373 -0.0593604 0.853102 -0.346096 -0.390428 -0.0315069 0.333482 -0.20167 0.0443732 0.665466 -0.745108 -0.297752 0.264166 -0.0579226 0.867848 -0.32634 -0.374623 --0.0605814 0.295562 -0.210306 -0.367979 0.533614 -0.761477 --0.311626 0.208116 -0.045917 -0.937214 -0.346661 -0.038162 -0.278471 0.175093 -0.0567411 0.977597 0.0398863 -0.206672 --0.169253 -0.497317 -0.107758 -0.0301353 -0.999412 0.0163825 --0.178809 0.0285854 0.027718 -0.869055 -0.480404 0.11813 --0.0689646 -0.0665676 -0.0561202 -0.51807 -0.834909 -0.185821 -0.115566 -0.0896297 -0.0642796 0.436928 -0.66864 -0.601677 --0.229938 0.0866986 -0.203272 -0.569009 0.0181582 -0.822131 -0.0930389 -0.1172 -0.0589475 0.306529 -0.250074 -0.918424 --0.215762 0.0770504 -0.208684 -0.214284 -0.228452 -0.94968 --0.298576 0.179541 -0.0253778 -0.886034 -0.344359 0.310421 --0.16599 -0.153557 -0.0647994 -0.0934374 0.942683 0.32034 --0.115416 0.0642316 -0.202031 -0.444838 -0.379438 -0.811262 --0.187185 -0.461875 -0.201318 -0.622256 -0.48308 -0.61598 -0.125599 -0.245264 -0.0680702 0.645866 0.07658 -0.7596 -0.114629 -0.349858 -0.0617276 0.877988 -0.0563881 -0.475351 --0.0845027 0.0566096 -0.21493 -0.400019 -0.443643 -0.801976 --0.121545 -0.496729 -0.0569096 -0.112567 -0.993638 0.00356556 --0.203678 0.008301 -0.213312 -0.0677662 0.574748 -0.81552 -0.211008 0.108723 -0.182247 0.710634 -0.14978 -0.687434 -0.147234 -0.496986 -0.0523491 0.296995 -0.946538 0.125939 -0.0100744 0.401981 -0.078196 -0.149761 0.961571 -0.230117 --0.2535 0.354109 -0.0680366 0.0488351 0.949428 -0.310165 -0.0336932 -0.00244891 -0.211194 -0.0559403 -0.630647 -0.774051 --0.313347 0.322369 -0.0716475 -0.802784 0.332834 -0.494732 --0.178028 -0.0141008 -0.204471 0.81585 -0.0757001 -0.573287 --0.139007 0.096315 -0.199763 -0.455189 -0.181542 -0.871691 --0.265472 -0.043122 -0.200501 -0.825783 0.563846 0.0126922 --0.314765 0.304001 -0.0775539 -0.84772 0.160228 -0.505666 --0.190142 0.0400978 -0.0516244 -0.784112 -0.620383 -0.0171269 --0.0575623 -0.069347 -0.067775 -0.429581 -0.857277 -0.283788 --0.040055 -0.0788837 -0.0630025 -0.37955 -0.870804 -0.312476 --0.029499 -0.0788874 -0.0746025 -0.318811 -0.881096 -0.349328 --0.151669 -0.150434 -0.0726208 0.00221394 0.943913 0.330186 --0.13075 -0.155578 -0.0607451 0.0795481 0.950017 0.301894 --0.190702 -0.153553 -0.197072 0.199871 0.97354 -0.110776 --0.245533 -0.372439 -0.197128 -0.785563 -0.404509 -0.468256 -0.0279244 -0.164926 -0.0641755 -0.18795 0.627876 -0.755279 -0.0164575 -0.346376 -0.230793 0.793074 -0.190644 -0.578522 --0.257667 -0.369871 -0.176473 -0.842072 -0.390143 -0.372429 --0.240133 -0.178761 -0.0691608 -0.582513 0.758295 0.292691 -0.0363799 -0.339822 -0.190291 0.9615 -0.0694276 -0.26589 --0.149741 0.246379 0.150145 -0.729416 0.282887 0.622838 -0.00068649 -0.400039 -0.219076 0.688545 -0.474827 -0.548129 -0.126619 -0.265245 -0.0680151 0.688213 -0.0225478 -0.725158 --0.177688 -0.455692 -0.214189 -0.557011 -0.473284 -0.682452 --0.156891 -0.482644 -0.207082 -0.366108 -0.698086 -0.615338 --0.137966 -0.48885 -0.209199 -0.205654 -0.794875 -0.57086 --0.282572 -0.296332 -0.179643 -0.928494 -0.254575 -0.270352 -0.00278977 0.314105 -0.216917 -0.086407 0.597265 -0.797376 -0.122559 -0.389097 -0.0516257 0.937599 0.283144 -0.201834 --0.257919 -0.411981 -0.0671502 -0.87928 -0.474423 0.0423093 --0.0310148 0.312343 -0.210297 -0.266964 0.606272 -0.749109 --0.0671125 0.278582 -0.217998 -0.390986 0.456222 -0.799369 --0.241292 -0.440153 -0.0542026 -0.863849 -0.485942 0.132758 --0.0595501 0.375227 -0.0950141 -0.399872 0.871003 -0.285405 --0.11356 0.273614 -0.192044 -0.526199 0.451954 -0.720313 -0.181665 0.440269 -0.0686903 -0.51033 0.752862 -0.415646 --0.117489 0.125074 -0.219532 -0.523602 -0.117134 -0.843872 -0.307217 0.421355 -0.0653372 0.748432 0.277371 -0.602424 -0.294791 0.432136 -0.0725574 0.627623 0.377925 -0.680634 -0.0702943 0.404969 -0.0759651 0.0442753 0.967512 -0.24892 -0.0613443 0.408417 -0.0619909 0.0159502 0.979561 -0.200513 -0.0887758 -0.00261617 -0.205503 0.212919 -0.614451 -0.759681 -0.0319613 0.410152 -0.0496765 -0.060258 0.984783 -0.16301 --0.0192259 0.326526 -0.201728 -0.220736 0.662752 -0.715566 --0.160047 0.338558 -0.0696293 -0.0641921 0.962373 -0.264041 --0.307436 0.207467 -0.0669544 -0.907078 -0.340273 -0.247837 --0.214011 0.0706223 -0.0684771 -0.775638 -0.625458 -0.0847815 -0.0185948 -0.0843064 -0.089419 -0.137935 -0.869339 -0.474577 -0.0822219 -0.105526 -0.0664029 0.195254 -0.494375 -0.847036 --0.244227 -0.410572 -0.160143 -0.832676 -0.438467 -0.338227 --0.30669 -0.154233 -0.214987 -0.99725 0.0210031 0.0710782 --0.077437 0.315679 -0.183552 -0.424389 0.642693 -0.63784 --0.175541 -0.158577 -0.210582 0.156638 0.953155 -0.258767 -0.0453531 -0.10269 -0.0706567 -0.0938823 -0.657705 -0.747403 --0.180849 -0.15306 -0.0738848 -0.181037 0.944195 0.275175 --0.290834 -0.264154 -0.0776835 -0.979601 0.14241 0.141782 -0.122233 -0.317241 -0.0608049 0.78468 -0.228146 -0.576391 -0.078095 -0.0539483 -0.145364 0.150184 -0.859623 -0.488358 -0.118389 -0.368399 -0.0536722 0.951133 0.0781392 -0.298732 --0.242112 -0.44192 -0.0717753 -0.877529 -0.477458 0.0444656 --0.278566 -0.273817 -0.210972 -0.878093 -0.302465 -0.370768 -0.0266142 -0.304881 -0.215558 0.90828 0.127872 -0.398342 --0.0115967 -0.417605 -0.218167 0.634269 -0.507936 -0.582841 --0.194058 -0.420307 -0.223908 -0.597042 -0.441358 -0.669884 --0.036621 -0.442625 -0.21974 0.482426 -0.519744 -0.705076 --0.162864 -0.463997 -0.219124 -0.431419 -0.519675 -0.737438 -0.148629 -0.0915453 0.0750898 0.847229 -0.322837 0.421876 --0.0711884 -0.484087 -0.210235 0.290744 -0.664271 -0.688631 --0.199841 -0.492718 -0.0831103 -0.405545 -0.913884 0.0186635 --0.314025 0.27089 -0.0817612 -0.879957 -0.0242133 -0.474435 --0.115968 -0.487622 -0.215271 -0.0268359 -0.755877 -0.654164 --0.0409568 0.298547 -0.216823 -0.305954 0.537793 -0.785602 --0.184907 0.0352924 -0.0843892 -0.767865 -0.637316 -0.064896 -0.102943 0.285997 -0.217589 0.325391 0.472683 -0.818957 -0.142011 0.250263 -0.216984 0.455344 0.352526 -0.817549 --0.109578 0.194249 -0.222695 -0.50161 0.145887 -0.852704 -0.186248 0.159282 -0.209986 0.607811 0.0125127 -0.793983 --0.123251 0.160501 -0.21771 -0.529632 0.027013 -0.847798 --0.0984879 -0.0382511 -0.0839929 -0.566517 -0.794245 -0.219622 -0.106761 0.0105993 -0.209448 0.289033 -0.549103 -0.784185 -0.0490375 0.00920282 -0.220275 0.0286442 -0.574658 -0.817892 -0.0247314 0.0104055 -0.220283 -0.0879936 -0.582223 -0.808254 --0.187282 -0.025433 -0.216083 0.761686 -0.0538306 -0.645706 --0.00454069 0.374197 -0.146345 -0.201202 0.861008 -0.4671 -0.110622 -0.367882 -0.0717629 0.852533 0.139957 -0.503586 -0.129408 -0.411273 -0.0724852 0.715902 0.64156 -0.275474 --0.298047 -0.101899 -0.22135 -0.939318 0.34145 -0.0330768 --0.21678 -0.118246 -0.216933 0.981444 -0.0961078 0.165922 -0.25025 0.331811 -0.122972 0.449272 0.00020621 -0.893395 --0.242875 -0.335088 -0.227656 -0.718345 -0.359177 -0.595795 -0.234964 0.450245 -0.0850486 -0.0241928 0.677851 -0.734801 -0.0271257 -0.321844 -0.217217 0.905497 0.0198816 -0.423887 -0.13119 -0.0152821 -0.174073 0.385501 -0.685191 -0.617983 -0.312398 0.402806 -0.0647532 0.826011 0.144267 -0.544879 -0.304092 0.376545 -0.0803736 0.767483 0.0636893 -0.637898 --0.0934251 -0.486072 -0.214809 0.131315 -0.721679 -0.679658 -0.0885149 0.296722 -0.21669 0.284617 0.508003 -0.812973 --0.0516993 0.269797 -0.229441 -0.337534 0.40806 -0.848267 --0.0714551 0.261694 -0.224182 -0.412197 0.364656 -0.834937 --0.2894 0.342189 -0.0783618 -0.387237 0.682657 -0.619699 --0.302887 0.297302 -0.0949342 -0.739994 0.172773 -0.650045 -0.276915 0.14342 -0.0695263 0.968904 0.0100463 -0.247235 --0.101864 0.125054 -0.228721 -0.479398 -0.121018 -0.869214 --0.104799 0.0928534 -0.21985 -0.477268 -0.265845 -0.837581 -0.137452 0.0723197 -0.227298 0.434887 -0.285228 -0.854118 -0.00222232 0.0150083 -0.219619 -0.182039 -0.571622 -0.800069 --0.266775 0.137089 -0.0622943 -0.788455 -0.590109 -0.173525 --0.257928 -0.0376145 -0.219337 -0.717929 0.638424 -0.277475 --0.264865 0.140606 -0.0812046 -0.791048 -0.575723 -0.206849 --0.193323 -0.0437639 -0.218388 0.83972 -0.227336 -0.493141 --0.280886 -0.068358 -0.224025 -0.826538 0.539802 -0.159528 --0.0526094 0.354852 -0.14946 -0.383171 0.8007 -0.4605 --0.161292 0.0126407 -0.0931496 -0.65267 -0.75689 -0.0337537 --0.0922241 -0.166992 -0.206936 0.265128 0.897774 -0.351723 -0.200804 -0.0305803 -0.0716822 0.625763 -0.727064 -0.282487 --0.0199715 -0.233308 -0.238067 0.599968 0.539937 -0.590344 --0.0760946 -0.0529743 -0.0864184 -0.483032 -0.820555 -0.305565 -0.128021 -0.142527 0.119516 0.724723 0.331494 0.60406 --0.265749 -0.310953 -0.209539 -0.833263 -0.322685 -0.44894 -0.0260363 -0.33965 -0.218043 0.883644 -0.110012 -0.455051 --0.282439 -0.131911 -0.182277 -0.434578 0.149759 0.888096 --0.251818 -0.340412 -0.212405 -0.778727 -0.360353 -0.513547 -0.144397 -0.0486136 0.15427 0.453714 -0.795413 0.401823 --0.201201 -0.483705 -0.0243722 -0.606498 -0.767061 0.209231 --0.155321 -0.44917 -0.232221 -0.344619 -0.482295 -0.805375 --0.0814987 -0.471357 -0.222586 0.238709 -0.541284 -0.806244 --0.130881 -0.478058 -0.221689 -0.156947 -0.602082 -0.782857 -0.0428013 0.293729 -0.229792 0.120416 0.50123 -0.856895 --0.0231841 0.298492 -0.222913 -0.225064 0.536284 -0.813478 -0.104812 0.268196 -0.226381 0.335302 0.412613 -0.84695 --0.0743508 0.240708 -0.230584 -0.42191 0.274865 -0.863968 -0.170098 0.166069 -0.22101 0.54269 0.0453253 -0.838709 --0.0117745 0.139456 -0.262542 -0.188993 -0.0499823 -0.980706 -0.170216 0.148769 -0.221195 0.546799 -0.030595 -0.836705 --0.0875796 0.134066 -0.237065 -0.439244 -0.0789295 -0.894894 --0.0778817 0.0990517 -0.235541 -0.411932 -0.24161 -0.878599 --0.0654126 -0.00802127 -0.171951 -0.339134 -0.705555 -0.622238 -0.151334 0.0846855 -0.223564 0.495042 -0.223602 -0.839605 --0.0408741 0.0450444 -0.226664 -0.283485 -0.495101 -0.821286 --0.0760953 0.00508354 -0.180781 -0.361856 -0.664553 -0.653781 --0.0288234 0.0290828 -0.220604 -0.262091 -0.54112 -0.79906 -0.129503 -0.419664 -0.0891282 0.567051 0.689748 -0.450224 --0.214686 -0.0223103 -0.233716 0.190379 0.466926 -0.86356 --0.228941 -0.01296 -0.223037 -0.407458 0.674606 -0.615536 --0.247264 -0.0379087 -0.237236 -0.488396 0.665016 -0.564998 -0.244252 0.435358 -0.0964865 0.128596 0.561046 -0.817735 --0.0301919 0.391741 -0.0800245 -0.312241 0.920795 -0.233758 --0.184767 -0.496225 -0.0945987 -0.136187 -0.990616 0.0115025 --0.300899 -0.114127 -0.20931 -0.945134 0.229066 0.232916 --0.213749 -0.103223 -0.229124 0.981047 -0.175269 -0.0826281 --0.301953 0.313061 -0.0903 -0.670765 0.324472 -0.666928 --0.256587 -0.0311759 -0.185003 -0.849715 0.502758 0.158803 --0.120568 -0.167186 -0.220795 0.14146 0.885135 -0.443312 -0.28789 0.259483 -0.0729475 0.804456 -0.321098 -0.499746 --0.303477 -0.19228 -0.202425 -0.990743 -0.121738 0.0600625 --0.0586806 -0.196119 -0.231402 0.42705 0.70238 -0.569465 -0.00973144 -0.274216 -0.232487 0.792674 0.284556 -0.539163 -0.0420285 -0.49182 -0.168399 0.472848 -0.760211 -0.445527 --0.00703684 -0.391479 -0.234292 0.623674 -0.440167 -0.645975 --0.028013 -0.425345 -0.227201 0.539364 -0.53067 -0.653816 --0.0453357 -0.430597 -0.234992 0.411624 -0.542913 -0.731991 -0.273519 0.1795 -0.0767979 0.960216 0.0572707 -0.273322 -0.2716 0.195275 -0.080319 0.94623 0.034304 -0.32167 -0.0877232 0.259548 -0.236602 0.2815 0.385566 -0.87869 --0.237234 0.317675 -0.118005 -0.108625 0.662565 -0.741086 --0.209361 0.196725 -0.171564 -0.346609 0.0402541 -0.937145 --0.256164 0.125623 -0.0705089 -0.783847 -0.594277 -0.180049 --0.205611 0.0599581 -0.104532 -0.728012 -0.549916 0.409378 -0.156053 0.135117 -0.228908 0.502714 -0.0672639 -0.861832 --0.0504255 0.061485 -0.232541 -0.305777 -0.42972 -0.849612 -0.106762 0.0588812 -0.235221 0.303915 -0.365719 -0.879707 --0.212961 0.0734098 -0.0901679 -0.819209 -0.572377 0.0357897 --0.258414 0.210417 -0.14521 -0.636025 -0.0768185 -0.767835 -0.238008 0.0188273 -0.0877193 0.777143 -0.536762 -0.328535 --0.25946 -0.0497837 -0.237739 -0.62321 0.63939 -0.450321 --0.284232 -0.0809891 -0.239682 -0.80841 0.493151 -0.321366 --0.0449035 -0.0711112 -0.0790278 -0.368611 -0.86581 -0.338376 --0.222257 -0.161285 -0.090717 -0.409349 0.894807 0.178197 -0.00900582 -0.178494 -0.0821095 0.10326 0.903758 -0.415403 --0.240287 -0.0129489 -0.20599 -0.699592 0.655226 -0.285044 -0.0797694 -0.202932 -0.0845757 0.356412 0.441363 -0.82351 -0.0971495 -0.207738 -0.0784748 0.437594 0.342176 -0.831521 --0.299371 -0.207881 -0.21706 -0.950156 -0.257075 -0.176399 --0.0159365 -0.407631 -0.230662 0.586677 -0.493655 -0.641962 --0.0631128 -0.439675 -0.236575 0.316468 -0.544395 -0.776841 -0.0545176 -0.0242935 -0.19175 0.0468691 -0.727816 -0.684169 -0.106505 -0.287295 -0.0850398 0.667681 -0.0734791 -0.740812 -0.0600911 0.299001 -0.223291 0.188429 0.522516 -0.831547 -0.0750574 0.286719 -0.226813 0.237682 0.474225 -0.847713 -0.105172 -0.319344 -0.0804788 0.717922 -0.15408 -0.678857 -0.031286 -0.424521 -0.168081 0.793782 0.320532 -0.516885 --0.2804 -0.362543 -0.079427 -0.947387 -0.319514 -0.0192106 --0.273036 -0.381343 -0.0848304 -0.920093 -0.389135 -0.0447511 -0.166446 -0.457592 -0.0738952 0.955832 0.260038 -0.136988 --0.0718737 0.142056 -0.244953 -0.388943 -0.0422662 -0.920292 -0.250809 0.44789 -0.0856295 0.14992 0.624103 -0.766825 --0.134816 0.0301371 -0.175861 0.00983938 -0.585895 -0.810327 -0.11956 -0.499102 -0.0748426 0.00761235 -0.999966 -0.00318689 --0.034538 0.0562358 -0.235261 -0.267363 -0.450444 -0.851832 -0.0892661 0.0869832 -0.25034 0.260437 -0.259232 -0.930038 -0.0814418 0.0708368 -0.247359 0.218657 -0.326726 -0.919478 --0.0190129 0.0579066 -0.24054 -0.226247 -0.434987 -0.87155 -0.0674089 0.0582418 -0.245471 0.150267 -0.384731 -0.910715 -0.0131518 0.0455772 -0.240894 -0.113645 -0.467181 -0.876827 -0.285741 0.423652 -0.0845605 0.556647 0.343896 -0.756227 --0.021619 -0.39722 -0.242926 0.533851 -0.45929 -0.709969 --0.232418 -0.0278686 -0.236007 -0.230772 0.64412 -0.729283 --0.218156 -0.0387959 -0.242398 0.342263 0.388994 -0.855301 -0.0512086 0.404349 -0.0808301 0.00230123 0.969749 -0.244095 --0.0711218 -0.184535 -0.225156 0.370765 0.772457 -0.5156 --0.278586 -0.233347 -0.243373 -0.780436 -0.376088 -0.499477 --0.105136 0.227122 -0.217678 -0.497079 0.238122 -0.834392 --0.00136221 -0.0120492 -0.195787 -0.212205 -0.676629 -0.705083 --0.147338 0.291619 -0.151839 -0.400886 0.626375 -0.668539 -0.299959 0.413091 -0.0771118 0.687282 0.254007 -0.680532 --0.015655 0.284109 -0.2333 -0.184378 0.468488 -0.864016 --0.037409 0.236442 -0.246593 -0.28696 0.258573 -0.922385 --0.0716865 0.373761 -0.0807095 -0.416921 0.873713 -0.250603 -0.128977 0.185973 -0.241589 0.412273 0.122484 -0.902789 -0.262756 0.0714252 -0.0884332 0.904371 -0.263108 -0.335987 --0.203973 0.0600395 -0.0817176 -0.789625 -0.612783 -0.0314646 --0.171012 0.0228235 -0.108282 -0.612316 -0.699186 0.369063 -0.100536 -0.498644 -0.0444634 0.00968383 -0.999222 0.0382254 --0.305259 -0.132881 -0.223075 -0.99088 0.127857 -0.0425397 --0.14953 0.00471987 -0.105474 -0.534838 -0.843583 0.0481274 -0.0299683 -0.0929065 -0.0778841 -0.140764 -0.793636 -0.591885 --0.305123 -0.170122 -0.22702 -0.982238 -0.104947 -0.155544 --0.19577 -0.169237 -0.254285 0.518466 0.677233 -0.522061 --0.111276 -0.177087 -0.235147 0.18841 0.811874 -0.552595 --0.00498047 -0.176622 -0.0807231 0.0746195 0.962293 -0.261581 --0.0325673 -0.218118 -0.235006 0.535334 0.612453 -0.581652 -0.00544451 0.110963 -0.262266 -0.120967 -0.17735 -0.976685 --0.252199 -0.184383 -0.0817754 -0.670104 0.706973 0.226161 --0.135784 -0.496397 -0.101153 0.0412059 -0.998749 0.0283157 --0.143199 -0.496358 -0.0840057 0.0218025 -0.999389 0.0273156 -0.290224 0.403032 -0.0886166 0.608867 0.224005 -0.760988 --0.227107 -0.362221 -0.229217 -0.671095 -0.381472 -0.635697 -0.216361 0.26498 -0.150222 0.68793 0.280982 -0.66918 --0.0382341 -0.401201 -0.251536 0.435102 -0.467394 -0.769564 --0.149384 -0.419199 -0.251861 -0.300125 -0.461525 -0.834817 -0.0332264 -0.498428 -0.0981994 -0.0118197 -0.999908 -0.00669255 --0.301851 0.226476 -0.0943066 -0.867758 -0.183885 -0.461717 -0.0170463 0.272324 -0.242513 -0.0121126 0.416135 -0.909222 -0.00481785 0.285707 -0.235362 -0.0716753 0.479253 -0.874745 --0.0616761 0.205372 -0.244416 -0.370114 0.146966 -0.917288 --0.184127 0.0365754 -0.101599 -0.692754 -0.683485 0.230085 --0.219183 -0.152825 -0.173181 0.0595074 0.955771 0.288028 --0.0155081 0.071352 -0.24745 -0.20744 -0.363964 -0.908019 -0.139019 -0.0663548 -0.0817129 0.42372 -0.813413 -0.398523 -0.0506777 0.0471256 -0.242381 0.0653153 -0.439817 -0.895709 --0.0681107 0.0144017 -0.193391 -0.346059 -0.613819 -0.709556 --0.202746 -0.0569847 -0.229585 0.868079 -0.167167 -0.467433 --0.208758 -0.0875667 -0.22466 0.954794 -0.248758 -0.162751 --0.0153633 -0.378712 -0.249088 0.557015 -0.378154 -0.739415 -0.204106 0.2691 -0.160563 0.649268 0.330455 -0.685019 --0.214181 -0.139793 -0.241269 0.947439 0.30239 -0.104497 --0.304989 -0.151714 -0.234573 -0.976411 -0.000119247 -0.215921 --0.237699 -0.171373 -0.0854569 -0.558022 0.801762 0.213984 -0.237615 0.0307153 -0.105062 0.786543 -0.478058 -0.39091 --0.258117 -0.110169 -0.179049 -0.00239163 -0.0126226 0.999917 -0.0838113 -0.235925 -0.0970196 0.539425 0.279347 -0.794347 -0.0237091 0.101391 -0.261713 -0.0488873 -0.215514 -0.975276 -0.00563679 -0.354852 -0.241375 0.703282 -0.251391 -0.664979 --0.115835 0.0253207 -0.176826 -0.300768 -0.614135 -0.729641 -0.0869234 -0.370287 -0.0968338 0.555554 0.128592 -0.821477 -0.0362957 0.26821 -0.243735 0.0882583 0.41135 -0.907194 -0.0892062 0.243487 -0.242409 0.293604 0.329485 -0.89735 --0.0495877 0.221904 -0.246144 -0.333529 0.202239 -0.920792 -0.108042 -0.387959 -0.0832664 0.737946 0.304866 -0.602073 --0.23501 -0.452959 -0.102389 -0.857577 -0.50724 -0.0852609 -0.125378 0.168982 -0.244703 0.403359 0.0480305 -0.91378 -0.11381 0.156246 -0.249925 0.369844 0.012925 -0.929004 -0.165654 -0.478709 -0.0813954 0.911988 -0.319714 -0.257022 -0.157217 -0.483757 -0.0976799 0.747725 -0.444255 -0.493503 --0.0282244 0.0822375 -0.248423 -0.244863 -0.315733 -0.916709 -0.150211 0.277169 -0.198432 0.477538 0.435445 -0.763115 --0.0113449 0.0880089 -0.254149 -0.184841 -0.277238 -0.942854 -0.217438 0.425774 -0.103129 -0.0995279 0.552261 -0.827709 -0.0307139 0.0539667 -0.246167 -0.0182684 -0.417929 -0.908296 --0.231105 -0.0444707 -0.249662 0.0776312 0.525099 -0.847493 -0.281393 0.358345 -0.103798 0.600714 0.0504519 -0.797871 --0.260134 -0.0626539 -0.25315 -0.507592 0.613122 -0.605335 --0.209504 -0.0720314 -0.237929 0.893071 -0.117237 -0.434373 -0.29269 0.367376 -0.0933284 0.685186 0.0666447 -0.725313 --0.225981 0.339528 -0.0925028 0.0801837 0.839327 -0.537681 --0.307252 0.258453 -0.0925288 -0.855898 -0.0459205 -0.515101 -0.261085 0.225352 -0.100597 0.874627 0.0151112 -0.484562 --0.0922808 -0.180217 -0.231351 0.281656 0.796857 -0.534499 --0.0775018 -0.205239 -0.25305 0.327534 0.644765 -0.690651 --0.060417 -0.206253 -0.244126 0.418647 0.651076 -0.633115 --0.0339319 -0.233611 -0.250455 0.518382 0.537186 -0.665366 --0.0310839 -0.25369 -0.262473 0.526856 0.41762 -0.740281 --0.0152395 -0.267299 -0.256838 0.620239 0.321958 -0.715295 -0.269044 0.213103 -0.0854603 0.916559 0.000889406 -0.399898 -0.00769063 -0.334926 -0.244701 0.720053 -0.125035 -0.682562 -0.26628 0.179052 -0.0987148 0.929488 0.0751819 -0.36111 -0.274089 0.131659 -0.0799395 0.956426 -0.0209136 -0.291223 --0.125752 -0.0164009 -0.0903096 -0.609185 -0.769007 -0.193706 -0.0477383 -0.200191 -0.0954774 0.355018 0.637684 -0.683609 -0.15869 0.0257365 -0.192802 0.492173 -0.495526 -0.715695 -0.0356544 0.236674 -0.255673 0.0626548 0.290074 -0.954951 --0.00626972 -0.117444 -0.0338151 -0.636776 -0.442114 -0.631705 -0.239767 0.196643 0.148327 0.714046 0.159674 0.681647 --0.0279278 0.221652 -0.25286 -0.246163 0.196601 -0.949079 --0.0429471 0.209703 -0.250666 -0.30645 0.153362 -0.939451 --0.293147 -0.26728 -0.0959309 -0.992581 0.0868467 0.0850945 -0.100163 -0.305571 -0.088256 0.679193 -0.128468 -0.722629 -0.088277 -0.316439 -0.0971558 0.656403 -0.124921 -0.743996 --0.0287308 0.0974802 -0.252778 -0.24181 -0.235622 -0.941281 -0.0468343 0.0658407 -0.250911 0.0581968 -0.363651 -0.929716 -0.0552714 0.0943401 -0.259435 0.111276 -0.247151 -0.962566 -0.109916 -0.49891 -0.0911178 0.00970366 -0.996834 -0.0789188 -0.165387 0.417421 -0.0876574 -0.434241 0.724414 -0.535406 -0.275217 0.394891 -0.101547 0.517843 0.219464 -0.826846 -0.267507 0.35485 -0.113176 0.499167 0.0542196 -0.864808 --0.109124 0.348566 -0.0992922 -0.463355 0.827232 -0.317788 --0.110996 0.353689 -0.0804652 -0.45854 0.849355 -0.261414 --0.21007 0.333938 -0.0981963 0.10835 0.840777 -0.530428 --0.298842 -0.18606 -0.239957 -0.911563 -0.223984 -0.344795 --0.162615 -0.181097 -0.251942 0.168566 0.761944 -0.625321 --0.0167584 -0.286036 -0.264147 0.597751 0.164608 -0.7846 --0.0521681 -0.0310844 -0.150328 -0.328935 -0.778875 -0.534 -0.290782 0.32814 -0.0935126 0.716672 -0.109208 -0.688807 --0.213025 -0.357147 -0.244809 -0.587538 -0.363019 -0.723199 --0.225056 -0.321277 -0.252532 -0.581979 -0.339869 -0.738776 -0.279822 0.317712 -0.102296 0.649346 -0.120426 -0.750897 --0.0818413 -0.440077 -0.242733 0.208328 -0.540538 -0.815119 --0.00073257 0.239714 -0.253761 -0.113603 0.281747 -0.95274 --0.0280733 0.203343 -0.255997 -0.251542 0.131751 -0.958837 -0.100923 0.188847 -0.252336 0.322475 0.128845 -0.937768 --0.304497 0.279064 -0.0959299 -0.801562 0.0664611 -0.594206 --0.197986 0.0239316 -0.202491 -0.227906 0.452661 -0.862066 --0.0618367 -0.494433 -0.192286 0.135347 -0.911071 -0.389398 -0.176444 0.0308861 -0.182789 0.56092 -0.463485 -0.685966 -0.28046 0.0803478 -0.011557 0.976821 -0.203428 -0.0666177 -0.00610608 0.0945958 -0.258638 -0.119117 -0.247408 -0.961562 --0.161387 0.0501831 -0.194085 0.368918 -0.00775719 -0.929429 -0.0303343 0.0718386 -0.253512 -0.0219428 -0.342143 -0.939392 -0.0895309 -0.0833344 -0.0863518 0.220864 -0.803987 -0.552109 --0.213682 -0.0892658 -0.242255 0.927258 -0.10642 -0.358981 --0.216552 -0.106555 -0.246635 0.950854 -0.0348504 -0.307672 --0.0291027 -0.0659943 -0.104151 -0.29103 -0.861271 -0.41655 --0.127655 0.059609 -0.193848 -0.340309 -0.381852 -0.85929 --0.239624 0.0960464 -0.191346 -0.772136 0.242348 -0.58743 -0.0377173 -0.0824907 -0.0961096 -0.0436929 -0.865278 -0.499384 --0.181172 -0.181235 -0.259332 0.313049 0.691323 -0.651209 --0.168383 -0.193158 -0.266234 0.182103 0.626301 -0.758014 --0.244936 -0.0249175 -0.220795 -0.620267 0.673482 -0.402109 --0.0677266 -0.219372 -0.260356 0.365733 0.577276 -0.730063 --0.150939 0.0395872 -0.18411 0.414719 -0.283678 -0.864601 -0.091677 -0.295011 -0.0975245 0.658363 -0.0738902 -0.749065 --0.289042 -0.32096 -0.115508 -0.975051 -0.200483 -0.095303 --0.0545046 -0.399184 -0.26038 0.323972 -0.462226 -0.825463 -0.0529345 -0.00703447 -0.207714 0.0363578 -0.641903 -0.765923 --0.0961747 -0.415297 -0.260933 0.0743735 -0.505191 -0.859797 --0.218494 0.161526 -0.165186 -0.506062 -0.128547 -0.852864 --0.291554 -0.311408 -0.101664 -0.989252 -0.142773 -0.0315687 --0.281394 -0.355699 -0.101105 -0.946431 -0.306546 -0.101479 -0.0747717 -0.359069 -0.103264 0.568352 0.00919324 -0.822734 --0.0112346 0.209264 -0.258827 -0.180494 0.159958 -0.970482 -0.0255953 0.216825 -0.261201 0.000281267 0.206653 -0.978414 -0.00758725 0.210637 -0.261364 -0.0981973 0.174651 -0.979722 -0.053219 0.414168 -0.0273102 -0.018126 0.995194 -0.0962311 --0.0142305 0.192656 -0.260604 -0.200695 0.105083 -0.974002 --0.00516554 -0.497689 -0.0938022 -0.0582342 -0.997985 0.0252008 -0.0111662 0.178852 -0.266122 -0.0908466 0.0746211 -0.993065 -0.237317 0.421761 -0.105415 0.0930784 0.470919 -0.877252 -0.0788704 0.39267 -0.110765 0.0996049 0.917246 -0.385667 --0.0270221 0.148881 -0.259643 -0.23459 -0.0217055 -0.971852 -0.00501993 0.130979 -0.264826 -0.126751 -0.0865723 -0.98815 --0.222372 0.326761 -0.109234 0.0122134 0.764001 -0.6451 -0.263142 0.262856 -0.104703 0.704895 -0.161348 -0.690717 -0.0610168 0.114386 -0.262931 0.141698 -0.151235 -0.978289 -0.26348 0.243451 -0.0993911 0.804176 -0.132071 -0.579533 --0.245342 -0.0852065 -0.272642 0.191958 0.362896 -0.911844 -0.224706 0.160198 -0.173494 0.770303 0.0291156 -0.637014 --0.229167 -0.0612821 -0.257104 0.364912 0.360743 -0.858315 --0.218699 -0.0742248 -0.251727 0.754526 0.0677148 -0.652767 --0.285548 -0.096135 -0.254226 -0.776103 0.416971 -0.473074 --0.221588 -0.0933563 -0.256784 0.795914 0.0396344 -0.604111 --0.300796 -0.130508 -0.24377 -0.942657 0.128562 -0.308008 --0.29931 -0.148416 -0.251443 -0.917474 0.00813189 -0.397711 --0.260648 0.149324 -0.112677 -0.796557 -0.473233 -0.376227 --0.150711 -0.19172 -0.261431 0.136276 0.681503 -0.719015 --0.268296 -0.218743 -0.0508903 -0.807374 0.494299 0.322205 --0.0504076 -0.256277 -0.274962 0.392793 0.370497 -0.841692 --0.259279 -0.269622 -0.245507 -0.713841 -0.343128 -0.610486 --0.0319276 -0.270777 -0.270742 0.506176 0.26579 -0.820452 -0.266374 0.109637 -0.0976664 0.923604 -0.0953401 -0.371302 --0.21077 -0.329711 -0.258902 -0.510137 -0.342708 -0.788867 --0.197753 0.0441089 -0.109257 -0.601844 -0.539285 0.58903 --0.187995 -0.347028 -0.265782 -0.457963 -0.304453 -0.835211 -0.0284049 -0.196072 -0.103082 0.396318 0.73616 -0.548635 -0.0964149 -0.417769 -0.106677 0.348177 0.464869 -0.814045 -0.0823239 -0.401361 -0.10571 0.488574 0.31396 -0.814079 -0.210136 0.0623838 -0.168165 0.703102 -0.300218 -0.644605 --0.257218 -0.411373 -0.103273 -0.885849 -0.452795 -0.101235 -0.15144 -0.45702 -0.105768 0.698941 0.240056 -0.673687 --0.0367582 -0.496401 -0.114245 -0.027457 -0.998887 0.0383528 -0.0260373 -0.498555 -0.0797938 -0.0172643 -0.999808 -0.00927176 -0.0239411 0.140611 -0.267242 -0.0439021 -0.0501538 -0.997776 -0.0605504 0.1518 -0.265591 0.155612 0.0113377 -0.987753 -0.0642492 0.135488 -0.264423 0.168245 -0.0584582 -0.98401 -0.0180022 0.120678 -0.26497 -0.0677788 -0.136332 -0.988342 -0.0309583 0.403372 -0.081777 -0.0662537 0.968563 -0.239784 --0.259997 -0.0770641 -0.266116 -0.381277 0.535992 -0.75322 --0.208828 -0.153687 -0.252956 0.765727 0.534019 -0.358449 -0.159392 0.313096 0.167521 0.496949 0.547602 0.673181 --0.212146 -0.165631 -0.269068 0.624695 0.445951 -0.641002 --0.198206 -0.180625 -0.268924 0.453614 0.536219 -0.711831 -0.259278 0.389403 -0.111162 0.393078 0.235188 -0.888918 --0.25887 0.333983 -0.0987481 -0.14913 0.715511 -0.682498 --0.0340443 0.360734 -0.153255 -0.322729 0.816017 -0.479544 --0.155953 -0.400122 -0.259474 -0.335112 -0.426462 -0.840137 --0.0574091 -0.382208 -0.26993 0.302307 -0.380977 -0.873766 --0.218153 0.0571421 -0.117925 -0.687757 -0.424326 0.589014 --0.233016 -0.0977444 -0.268395 0.615581 0.149596 -0.773745 -0.214082 -0.0210068 -0.0633818 0.68808 -0.68364 -0.243275 --0.217378 -0.123869 -0.2494 0.956572 0.0793531 -0.280486 -0.146077 -0.0478258 -0.113443 0.40295 -0.819601 -0.407289 --0.042285 0.365086 -0.139185 -0.359273 0.833264 -0.420232 --0.280328 -0.20244 -0.261944 -0.723783 -0.330578 -0.605687 --0.247249 -0.243294 -0.27041 -0.535771 -0.352105 -0.767445 --0.287406 -0.2363 -0.0973168 -0.94896 0.288479 0.127495 --0.0655758 -0.264824 -0.284034 0.301306 0.285388 -0.909818 --0.29421 -0.282222 -0.109612 -0.99954 -0.0295747 0.00671364 --0.0498455 -0.275825 -0.281195 0.382884 0.202429 -0.901345 --0.232025 -0.257558 -0.274195 -0.452333 -0.302971 -0.838811 --0.267758 -0.380965 -0.127847 -0.904968 -0.387304 -0.176151 --0.274232 -0.368918 -0.118506 -0.924954 -0.349078 -0.15035 --0.0213615 -0.30284 -0.269497 0.543804 0.0397107 -0.838272 --0.0307846 -0.31908 -0.274693 0.476712 -0.0644014 -0.876697 --0.249212 -0.427676 -0.0977066 -0.880139 -0.469502 -0.0701643 --0.142962 -0.389866 -0.268966 -0.24893 -0.393038 -0.885187 --0.106278 -0.387696 -0.27555 -0.0172856 -0.395293 -0.918392 -0.0931388 -0.38745 -0.0965826 0.546475 0.225008 -0.806682 --0.232483 -0.453102 -0.120639 -0.855632 -0.496117 -0.14752 -0.0867378 0.359181 -0.162114 0.23393 0.748042 -0.621055 --0.224592 -0.115823 -0.262099 0.810809 0.106102 -0.575614 --0.218906 -0.137842 -0.259727 0.868872 0.250594 -0.426923 -0.233554 0.397876 -0.116561 0.151904 0.350946 -0.923992 -0.0012531 0.395928 -0.0956695 -0.184539 0.942112 -0.279946 --0.047514 0.375657 -0.109284 -0.375311 0.868703 -0.323259 --0.286723 -0.172994 -0.267516 -0.753482 -0.200321 -0.626209 --0.184872 -0.197929 -0.274309 0.263717 0.47131 -0.841618 --0.0771308 0.366281 -0.0967541 -0.420877 0.859747 -0.289306 --0.135108 0.33396 -0.099395 -0.386222 0.845979 -0.36763 -0.214312 0.0925746 -0.174692 0.726462 -0.186643 -0.661375 --0.119037 -0.214016 -0.273031 0.154614 0.540991 -0.826694 --0.256835 0.320506 -0.111273 -0.222792 0.617478 -0.754377 --0.22345 -0.274986 -0.272366 -0.45374 -0.294049 -0.841223 --0.210641 -0.313426 -0.266231 -0.480082 -0.31742 -0.817781 --0.00147066 -0.497876 -0.149778 -0.0194023 -0.99981 -0.00180978 -0.251156 0.293942 -0.119568 0.558729 -0.0861684 -0.824862 --0.281058 0.201484 -0.118284 -0.796141 -0.244166 -0.553664 --0.0687281 -0.372944 -0.276998 0.227427 -0.338473 -0.913079 --0.0716168 -0.392303 -0.269384 0.218284 -0.430406 -0.875844 --0.0897904 -0.396827 -0.270499 0.0970827 -0.442959 -0.89127 -0.231354 0.0701184 -0.145506 0.787881 -0.257294 -0.559502 --0.247767 -0.105138 -0.279934 0.291459 0.261961 -0.920015 --0.156316 0.107358 -0.193358 -0.336226 -0.0431411 -0.940793 -0.0425175 0.399709 -0.0975314 -0.0104665 0.953481 -0.301272 --0.279752 -0.106172 -0.269045 -0.662786 0.350529 -0.661698 --0.124016 -0.398469 -0.269046 -0.130285 -0.432244 -0.892295 --0.202583 -0.194823 -0.279386 0.352282 0.354847 -0.866014 --0.217576 -0.181364 -0.281423 0.431739 0.305427 -0.848714 --0.275413 -0.188221 -0.274208 -0.644582 -0.272734 -0.714234 -0.07011 -0.282027 -0.116663 0.627963 -0.0296797 -0.777677 --0.22969 -0.237993 -0.281849 -0.309849 -0.258154 -0.915068 --0.101509 -0.227437 -0.277216 0.197859 0.47595 -0.856927 -0.0782909 -0.299312 -0.10844 0.628376 -0.0975346 -0.771771 --0.0350809 -0.288698 -0.27616 0.469342 0.115945 -0.875371 -0.0729045 -0.31561 -0.109844 0.649866 -0.108773 -0.752226 --0.182305 -0.330597 -0.27409 -0.409686 -0.261675 -0.87389 -0.100407 -0.0312775 -0.171539 0.260453 -0.770317 -0.582044 -0.205396 0.129153 -0.191725 0.689067 -0.101959 -0.717489 --0.20684 -0.487158 -0.128359 -0.631484 -0.768718 -0.10149 --0.124731 -0.379933 -0.276988 -0.139321 -0.353241 -0.9251 --0.0867628 -0.380264 -0.277552 0.111756 -0.368251 -0.922985 -0.0644007 -0.391049 -0.116013 0.461128 0.174095 -0.870087 --0.265207 -0.114549 -0.28308 -0.257323 0.27224 -0.927184 --0.281185 -0.122132 -0.274685 -0.655093 0.210031 -0.725769 --0.279482 -0.140577 -0.279753 -0.619361 0.0538454 -0.783258 --0.231465 -0.134354 -0.275171 0.678246 0.199192 -0.707322 --0.241502 -0.148222 -0.285764 0.360486 0.161187 -0.918732 --0.170106 0.137929 -0.188124 -0.40168 0.0188643 -0.915586 -0.128194 -0.43033 -0.10426 0.41257 0.637669 -0.650511 --0.213645 -0.482213 -0.113426 -0.714135 -0.696332 -0.0716439 --0.218334 -0.201104 -0.286758 0.21273 0.135724 -0.967639 -0.0601974 0.39558 -0.107837 0.06121 0.932719 -0.355372 --0.292451 -0.132028 -0.262846 -0.843871 0.110149 -0.525117 -0.264516 0.339644 -0.115209 0.511848 -0.0065591 -0.859051 -0.0250082 0.285955 -0.235778 0.035811 0.478598 -0.877304 --0.180075 -0.220115 -0.282361 0.110322 0.297092 -0.948454 --0.163528 0.322767 -0.107313 -0.0452806 0.863979 -0.501489 --0.231455 -0.211489 -0.287668 -0.120868 -0.13936 -0.982838 --0.241918 0.128966 -0.129277 -0.93476 -0.222061 -0.277331 -0.249084 0.0638799 -0.113607 0.84574 -0.292491 -0.446288 --0.18785 -0.272013 -0.285661 -0.226531 -0.12111 -0.966445 -0.0154298 -0.0687363 -0.118214 -0.114717 -0.88333 -0.454497 --0.167932 -0.32379 -0.282046 -0.332564 -0.227855 -0.915141 --0.152838 -0.340607 -0.282778 -0.275875 -0.248253 -0.928582 --0.247852 -0.17279 -0.116203 -0.611709 0.777102 0.14807 --0.260626 -0.185526 -0.1123 -0.726914 0.67038 0.148951 --0.246227 -0.127125 -0.284448 0.350253 0.188506 -0.91749 -0.0388802 -0.20815 -0.10981 0.474892 0.64555 -0.598116 -0.053724 -0.216248 -0.106392 0.470024 0.554944 -0.686378 --0.261095 -0.15339 -0.288887 -0.223529 0.0120635 -0.974623 -0.0713658 -0.262352 -0.114558 0.634961 0.122132 -0.762829 -0.136149 -0.460617 -0.117664 0.437878 0.16214 -0.884293 --0.246984 -0.168988 -0.28969 0.0299652 0.0191089 -0.999368 --0.255655 -0.187851 -0.286754 -0.332995 -0.193332 -0.922896 -0.11297 -0.483258 -0.121454 0.0994685 -0.435908 -0.894478 --0.23575 -0.187139 -0.289007 0.0964498 0.0205327 -0.995126 --0.162531 -0.147109 -0.176089 -0.0363015 0.952393 -0.302703 -0.0942283 -0.484826 -0.122598 0.236461 -0.524551 -0.817883 --0.0873662 -0.495758 -0.119403 -0.0109027 -0.999872 0.0117128 -0.0711756 -0.49816 -0.103372 0.0476508 -0.992391 -0.113533 --0.198162 -0.212799 -0.283959 0.208618 0.221781 -0.952519 --0.111452 -0.241735 -0.285888 0.119227 0.352137 -0.928324 --0.194735 -0.233584 -0.286603 0.017895 0.069424 -0.997427 --0.212804 -0.246755 -0.284344 -0.199167 -0.166756 -0.965673 --0.157406 -0.242754 -0.287717 -0.0136895 0.226189 -0.973987 --0.171006 -0.259245 -0.289159 -0.114892 0.040973 -0.992533 -0.0399516 -0.498554 -0.117386 0.0128385 -0.999745 -0.0185895 --0.0552237 -0.295277 -0.285944 0.344389 0.061393 -0.936818 -0.25065 0.352396 -0.122025 0.404349 0.0865082 -0.910504 -0.237812 0.364473 -0.124727 0.290091 0.183827 -0.939178 --0.16527 0.171796 -0.190856 -0.468104 0.0474944 -0.882396 --0.137709 -0.351061 -0.283824 -0.210912 -0.266852 -0.940375 --0.14856 -0.00181674 -0.0675809 -0.65573 -0.742113 -0.138879 --0.288369 0.253369 -0.117618 -0.741067 0.0285842 -0.670822 --0.0997134 -0.2769 -0.294098 0.0832341 0.140496 -0.986576 --0.184118 0.215059 -0.176885 -0.291276 0.192034 -0.937167 -0.243473 0.0875315 -0.134779 0.827357 -0.194491 -0.526929 -0.0558876 -0.0815689 -0.0975084 0.0262172 -0.855653 -0.516886 --0.139468 -0.309498 -0.292448 -0.169101 -0.126835 -0.977404 --0.108784 -0.297463 -0.29561 0.0086587 0.00269011 -0.999959 --0.0803712 -0.323405 -0.291811 0.16662 -0.121718 -0.97848 --0.235374 -0.166359 -0.102395 -0.516861 0.844007 0.143205 --0.1006 -0.329798 -0.292657 0.0272822 -0.170402 -0.984997 --0.270974 -0.195619 -0.124668 -0.797041 0.575016 0.184611 --0.127487 -0.297051 -0.294914 -0.0793647 -0.0294045 -0.996412 --0.1176 -0.277661 -0.294735 0.00436526 0.103832 -0.994585 --0.117318 -0.316463 -0.294106 -0.0657502 -0.118824 -0.990736 --0.294203 -0.267124 -0.112238 -0.998031 0.0528748 0.0337302 --0.294101 -0.272722 -0.127227 -0.999229 -0.0206264 -0.033398 --0.289758 -0.222544 -0.231633 -0.868371 -0.342415 -0.358725 --0.238362 -0.438796 -0.130712 -0.8627 -0.46287 -0.203716 --0.0150392 0.379656 -0.129165 -0.257706 0.884402 -0.389128 --0.118911 -0.198899 -0.261619 0.173818 0.648179 -0.741385 --0.0513549 0.368221 -0.12339 -0.38915 0.845895 -0.364724 --0.271536 0.251527 -0.0248697 0.0977536 0.0829868 0.991745 -0.202934 0.382778 -0.124617 -0.00524028 0.387562 -0.921829 -0.169718 0.374789 -0.12656 -0.0447466 0.523911 -0.850597 -0.188391 0.37314 -0.128511 -0.0189136 0.419509 -0.907554 -0.127634 0.375972 -0.126587 0.109314 0.766776 -0.632539 --0.134022 -0.328685 -0.290067 -0.177222 -0.198133 -0.964021 --0.185309 0.313172 -0.122433 0.0611296 0.760328 -0.646656 --0.164502 -0.303306 -0.287543 -0.267849 -0.160263 -0.950038 --0.0881881 -0.289531 -0.294189 0.144859 0.0735878 -0.986712 --0.280477 -0.257392 -0.220212 -0.86095 -0.327883 -0.388919 --0.230179 0.0466301 -0.150113 -0.82576 -0.508541 0.243941 --0.0230532 -0.497411 -0.154211 -0.0191322 -0.999811 0.00351903 --0.058139 -0.0479061 -0.117893 -0.367803 -0.828012 -0.423222 --0.0319208 -0.0473763 -0.137099 -0.281434 -0.825273 -0.489612 --0.169938 -0.282099 -0.288795 -0.213976 -0.0772894 -0.973776 --0.29351 -0.254032 -0.123572 -0.992629 0.116144 0.0346264 --0.149567 -0.291722 -0.292227 -0.166483 -0.0551109 -0.984503 --0.148632 -0.476271 -0.217837 -0.313588 -0.604902 -0.731954 --0.103978 -0.21063 -0.267258 0.220222 0.591124 -0.775935 --0.158626 0.19085 -0.192331 -0.482792 0.132935 -0.865587 --0.146177 -0.463289 -0.227261 -0.270658 -0.512737 -0.814767 --0.133631 -0.243054 -0.287971 0.0287523 0.295987 -0.954759 --0.0909833 0.364014 -0.0816181 -0.440605 0.860463 -0.255874 -0.0871583 -0.496912 -0.109102 0.102351 -0.935738 -0.337519 -0.054094 0.38319 -0.136365 0.0739433 0.878701 -0.471612 --0.102235 -0.350511 -0.288204 0.00579617 -0.255876 -0.966692 -0.220882 0.354159 -0.131311 0.218024 0.193327 -0.956604 -0.220222 0.334133 -0.134619 0.288982 0.123931 -0.949279 -0.235589 0.3034 -0.129638 0.48053 -0.00575208 -0.876959 --0.215712 0.299567 -0.135202 -0.0865143 0.59213 -0.801185 --0.0611434 -0.315724 -0.287819 0.298642 -0.0618191 -0.952361 --0.111828 -0.00815511 -0.1383 -0.468623 -0.774289 -0.425288 -0.180902 -0.00661938 -0.143194 0.562067 -0.647408 -0.514727 -0.00534731 -0.197509 -0.131511 0.556803 0.761299 -0.332257 --0.278094 -0.209033 -0.115717 -0.865282 0.483231 0.133319 --0.183895 -0.29288 -0.283405 -0.303674 -0.188307 -0.933982 --0.270922 -0.253256 -0.240353 -0.766461 -0.362827 -0.529994 --0.00771149 0.388087 -0.113339 -0.225687 0.913369 -0.338855 --0.0741566 0.355228 -0.127757 -0.418036 0.819611 -0.39177 -0.185151 0.357737 -0.13522 0.0819075 0.374877 -0.923449 -0.164542 0.361304 -0.134915 0.0923324 0.522351 -0.847717 --0.0845053 -0.264587 -0.28922 0.202918 0.25725 -0.9448 --0.115518 0.332019 -0.127174 -0.4788 0.774741 -0.412949 --0.0697572 -0.282249 -0.289213 0.267692 0.141359 -0.953079 -0.312178 0.348491 -0.0686453 0.870448 -0.0684971 -0.487471 --0.0622733 0.342338 -0.161515 -0.394863 0.760157 -0.515988 --0.158214 0.30153 -0.135857 -0.233725 0.713391 -0.660641 --0.179014 0.300765 -0.134536 -0.0167045 0.680477 -0.732579 --0.233026 0.286726 -0.140652 -0.213123 0.477123 -0.852603 -0.245234 0.160024 -0.142964 0.851324 0.0241615 -0.524083 --0.0769631 0.336084 -0.15938 -0.419379 0.750317 -0.511024 --0.228268 0.0551236 -0.134192 -0.717149 -0.504922 0.480366 --0.231354 0.0698775 -0.124825 -0.69244 -0.421415 0.585607 --0.242629 -0.422796 -0.145953 -0.848692 -0.454459 -0.270536 --0.11504 0.214434 -0.215069 -0.511577 0.207617 -0.833777 -0.0887611 0.405035 -0.0719635 0.0426247 0.964777 -0.259592 --0.0978873 -0.016479 -0.138457 -0.448901 -0.774301 -0.446033 --0.184688 0.0327187 -0.0356613 -0.79426 -0.607506 -0.00934734 --0.0827126 -0.028361 -0.13235 -0.411252 -0.794831 -0.446224 --0.211497 0.17737 -0.170562 -0.409597 -0.0557794 -0.91056 --0.104761 0.361138 -0.0664613 -0.454712 0.862493 -0.222132 --0.0866214 -0.497796 -0.168696 0.0113871 -0.999886 -0.00987392 --0.191961 0.0587106 0.03681 -0.881029 -0.429389 0.198525 --0.274103 -0.221027 -0.258199 -0.700174 -0.371491 -0.609714 --0.229472 -0.16608 -0.283847 0.465966 0.221766 -0.85656 -0.0891783 -0.060057 -0.130196 0.194164 -0.867788 -0.457432 -0.0185907 -0.0604675 -0.135201 -0.110872 -0.875028 -0.471204 -0.0461251 -0.07361 -0.11275 -0.00215244 -0.885093 -0.465409 --0.227934 -0.157094 -0.137252 -0.407817 0.908121 0.0948739 --0.2336 -0.16281 -0.119912 -0.491509 0.859457 0.140544 --0.0387431 -0.173822 -0.125068 0.365142 0.927237 -0.0830784 --0.26714 -0.17272 -0.284933 -0.459576 -0.15919 -0.873755 -0.0448823 -0.241901 -0.131187 0.660239 0.343508 -0.667898 --0.120756 0.254346 -0.197376 -0.534248 0.369603 -0.760245 -0.0367133 -0.400147 -0.149826 0.939677 -0.0536288 -0.337833 -0.0420181 -0.383009 -0.139633 0.962855 -0.0907331 -0.254316 --0.218867 -0.462269 -0.153421 -0.813901 -0.484058 -0.321329 --0.224103 -0.462355 -0.135823 -0.840917 -0.501838 -0.202527 -0.139173 0.349061 -0.15051 0.286763 0.636832 -0.715689 -0.0970017 -0.136882 0.142975 0.447634 0.379552 0.809669 -0.133451 0.365342 -0.136863 0.185607 0.690299 -0.699312 -0.148849 0.3606 -0.137456 0.170468 0.61181 -0.772418 --0.262085 -0.13415 -0.287566 -0.177289 0.132561 -0.97519 --0.0869596 -0.217401 -0.26684 0.272214 0.567779 -0.776869 -0.155977 0.345306 -0.146643 0.268505 0.549915 -0.790884 -0.21959 0.312864 -0.136988 0.402018 0.0992871 -0.910233 -0.205162 0.323581 -0.140549 0.309468 0.209834 -0.927469 -0.219441 0.293998 -0.13901 0.529106 0.1332 -0.838036 --0.226577 0.270261 -0.150373 -0.230629 0.387375 -0.892609 --0.237395 0.253834 -0.152654 -0.346924 0.256931 -0.902014 -0.00100093 -0.0819675 -0.0870828 -0.202013 -0.882198 -0.425344 -0.227764 0.242174 -0.147421 0.756123 0.255685 -0.602415 -0.0806066 0.399985 -0.0907462 0.0695903 0.946381 -0.315467 --0.293641 -0.198263 -0.169302 -0.887826 0.180928 0.423119 --0.258566 0.17931 -0.137672 -0.726623 -0.259444 -0.636166 -0.0448892 0.222369 -0.258828 0.102923 0.237016 -0.966038 --0.198301 0.0505386 -0.0366951 -0.780922 -0.624358 0.0184025 --0.182237 -0.311627 -0.279461 -0.364635 -0.238565 -0.900071 --0.167323 0.00963465 -0.0192124 -0.767111 -0.639452 -0.0513894 --0.144389 -0.0161065 -0.0124951 -0.699168 -0.708613 -0.095034 --0.0534191 -0.175404 -0.184224 0.437573 0.867406 -0.236932 --0.258852 -0.173744 -0.145435 -0.568634 0.727297 0.384309 --0.0407671 0.398456 0.0171537 -0.323047 0.945015 0.0508593 --0.289903 -0.295828 -0.145736 -0.973482 -0.176307 -0.145772 --0.148528 -0.49713 -0.17455 -0.0587939 -0.993898 -0.0933313 -0.0387571 -0.497084 -0.149657 0.172917 -0.97534 -0.137153 --0.181764 -0.495856 -0.146578 -0.220763 -0.970846 -0.0933951 --0.191311 -0.252849 -0.286822 -0.127653 -0.0498414 -0.990566 -0.0131525 -0.0918221 -0.0735422 -0.235397 -0.811117 -0.535422 --0.16054 -0.22392 -0.282377 0.0644852 0.355277 -0.932534 --0.175513 -0.23938 -0.28712 -0.00175494 0.161758 -0.986829 --0.143078 -0.229726 -0.283573 0.0450923 0.357839 -0.932694 --0.12186 -0.227772 -0.281267 0.108358 0.423358 -0.899459 -0.0730992 0.37749 -0.141375 0.144414 0.838887 -0.524798 --0.0233701 0.370621 -0.142585 -0.288849 0.849481 -0.441529 -0.111494 0.36854 -0.140525 0.222902 0.756101 -0.615326 --0.198617 0.22043 0.0478051 -0.963281 0.23508 0.129717 --0.185168 0.285283 -0.147094 -0.0662109 0.575315 -0.815248 -0.208135 -0.0361227 0.056778 0.670586 -0.730096 0.131434 --0.271129 0.225813 -0.135189 -0.678013 -0.043717 -0.733748 --0.151011 -0.153471 -0.192435 0.022176 0.93968 -0.341335 -0.236581 0.20755 -0.148059 0.815297 0.168867 -0.553872 --0.248617 -0.204759 -0.285118 -0.343811 -0.245058 -0.906499 -0.2446 0.1972 -0.138486 0.849782 0.131711 -0.510415 -0.203392 0.0155235 -0.142901 0.65684 -0.554026 -0.511484 -0.272681 0.152929 0.0957891 0.947198 0.0852585 0.309107 -0.0816032 0.378903 0.130482 0.123575 0.851019 0.510389 --0.291361 -0.237963 -0.132709 -0.974328 0.204765 0.0935759 --0.104261 -0.370183 -0.282217 -0.0106608 -0.32257 -0.946485 --0.111073 -0.497116 -0.143117 0.017877 -0.999101 0.0384471 -0.037087 -0.315238 -0.150768 0.974504 0.108071 -0.19663 --0.295371 -0.139408 -0.190229 -0.736098 0.136808 0.662905 --0.279126 -0.336058 -0.149082 -0.932458 -0.288004 -0.21812 --0.270959 -0.366085 -0.140263 -0.912615 -0.347027 -0.216116 -0.0486054 -0.424015 -0.139104 0.733848 0.46322 -0.496885 -0.072949 0.367481 -0.156176 0.173264 0.795377 -0.580822 --0.0685217 0.348613 -0.146167 -0.411924 0.793014 -0.448828 --0.166812 0.290032 -0.145188 -0.177755 0.638186 -0.74908 --0.256277 0.258336 -0.142767 -0.476558 0.211471 -0.85333 --0.15729 -0.361866 -0.274802 -0.321182 -0.303446 -0.897086 -0.211886 0.249137 -0.162655 0.687861 0.307092 -0.657679 --0.245488 0.181068 -0.150826 -0.61537 -0.181913 -0.76696 --0.0474244 -0.328494 -0.281657 0.378574 -0.117726 -0.918054 --0.0419044 -0.30719 -0.280802 0.418649 -0.00402671 -0.908139 --0.235884 0.149107 -0.148128 -0.710028 -0.199986 -0.675178 --0.248153 0.165871 -0.143223 -0.687682 -0.29201 -0.664698 -0.236136 0.148566 -0.157168 0.826166 -0.0194044 -0.563092 --0.209483 -0.0833379 -0.191173 0.761338 -0.500038 0.412707 -0.0197742 -0.222989 -0.148981 0.752626 0.484531 -0.445851 --0.209604 -0.264275 -0.281413 -0.29556 -0.207175 -0.93259 --0.277215 -0.316785 -0.177678 -0.910829 -0.282582 -0.300896 -0.0672529 -0.472464 -0.145536 0.805364 -0.0145049 -0.592604 --0.177273 -0.49469 -0.164049 -0.277797 -0.941424 -0.19118 --0.0819024 -0.231373 -0.274237 0.27431 0.480083 -0.833231 -0.102426 0.360459 -0.154372 0.26313 0.736089 -0.623647 --0.0928081 -0.244072 -0.283421 0.201042 0.381765 -0.90213 -0.0907608 0.37132 -0.145044 0.204398 0.794567 -0.571738 -0.162419 0.328937 -0.154932 0.380996 0.503203 -0.775648 --0.264557 0.243356 -0.140302 -0.587159 0.0842034 -0.80508 --0.0155381 0.364613 -0.157761 -0.242157 0.822836 -0.514101 -0.234559 0.114033 -0.155351 0.805654 -0.120952 -0.579907 -0.0054865 0.147642 -0.265756 -0.128838 -0.026093 -0.991322 --0.241053 0.0609365 -0.143202 -0.736132 -0.551973 0.391708 --0.225537 -0.0367212 -0.152413 -0.127039 -0.34996 0.92811 --0.169358 -0.208448 -0.276584 0.135728 0.452616 -0.881315 -0.00887626 0.257489 -0.248505 -0.0587438 0.357813 -0.931944 -0.0377567 -0.4189 -0.152034 0.851043 0.290693 -0.43729 --0.199022 -0.0674076 -0.196009 0.866173 -0.489614 0.100112 -0.0582865 -0.439073 -0.139262 0.712174 0.440564 -0.546546 --0.0583829 -0.49721 -0.152006 0.00464946 -0.999641 0.0263975 --0.0924411 -0.496583 -0.13776 0.00737981 -0.998883 0.0466803 --0.189632 0.113221 -0.192658 0.226201 0.440393 -0.868843 --0.172205 0.274925 -0.155681 -0.174678 0.551802 -0.815477 --0.199074 0.256063 -0.161549 -0.167539 0.362868 -0.916656 --0.243399 -0.399732 -0.174718 -0.812524 -0.43094 -0.39255 --0.044257 0.104339 -0.249867 -0.295433 -0.204199 -0.933286 -0.147664 0.422652 -0.0536227 -0.526449 0.812387 -0.250757 -0.205164 0.0281474 -0.152996 0.67474 -0.472368 -0.567093 --0.053759 -0.0204801 -0.163842 -0.319585 -0.737659 -0.594747 --0.0974451 -0.43002 -0.252193 0.0812612 -0.526384 -0.846355 -0.0164535 -0.0517295 -0.150427 -0.125594 -0.857428 -0.499042 -0.110265 -0.0196818 -0.181418 0.3102 -0.708336 -0.634063 --0.227254 -0.0540106 -0.16077 0.0321127 -0.43958 0.897629 -0.0404513 -0.328405 -0.164002 0.994017 0.104546 -0.0316278 -0.011263 -0.220389 -0.162599 0.795404 0.499252 -0.343627 --0.0492696 -0.415674 -0.247699 0.36638 -0.520883 -0.771003 -0.0692192 0.0408144 -0.236805 0.150467 -0.450258 -0.880129 --0.142762 -0.371845 -0.276005 -0.24393 -0.321831 -0.914835 --0.233755 0.163172 -0.154983 -0.613681 -0.20932 -0.761302 -0.0900012 -0.0435234 -0.158492 0.212802 -0.822637 -0.527241 --0.288779 -0.288114 -0.16185 -0.966395 -0.189253 -0.173966 -0.0169467 0.0266541 -0.230123 -0.110042 -0.52835 -0.841865 --0.254893 -0.391553 -0.156972 -0.855297 -0.412339 -0.313758 --0.0356627 -0.00585337 -0.189105 -0.296143 -0.678526 -0.672236 --0.145336 0.0586512 -0.188236 0.0309563 -0.256593 -0.966024 --0.250374 -0.0603217 -0.16631 -0.397064 -0.181168 0.899733 -0.0339169 0.370544 -0.158896 0.0151185 0.824893 -0.565087 -0.149551 0.307885 -0.178631 0.446505 0.53221 -0.719296 -0.15522 0.317705 -0.167673 0.440897 0.541754 -0.71562 -0.169088 0.301239 -0.170697 0.499109 0.490592 -0.71429 --0.134325 -0.198269 -0.264351 0.139752 0.636589 -0.758435 --0.215734 -0.372533 -0.234229 -0.622428 -0.395273 -0.675532 --0.207238 0.241374 -0.164938 -0.224494 0.265859 -0.937508 diff -Nru cgal-4.7/examples/Surface_reconstruction_points_3/data/sphere926.pwn cgal-4.8/examples/Surface_reconstruction_points_3/data/sphere926.pwn --- cgal-4.7/examples/Surface_reconstruction_points_3/data/sphere926.pwn 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_reconstruction_points_3/data/sphere926.pwn 1970-01-01 00:00:00.000000000 +0000 @@ -1,926 +0,0 @@ -2.78865 0.400948 -9.59493 0.27886 0.0400935 -0.959495 -4.11187 0.591198 -9.09632 0.389602 0.0560156 -0.919278 -2.81733 0 -9.59493 0.281727 4.34882e-019 -0.959495 -2.70321 0.793732 -9.59493 0.28032 0.0800395 -0.956564 -3.98588 1.17036 -9.09632 0.419268 0.123109 -0.899477 -0.793732 2.70321 -9.59493 0.0800395 0.28032 -0.956564 -0.591198 4.11187 -9.09632 0.0560156 0.389602 -0.919278 -1.17036 3.98588 -9.09632 0.123109 0.419268 -0.899477 -0.400948 2.78865 -9.59493 0.0400935 0.27886 -0.959495 -0 2.81733 -9.59493 0 0.281727 -0.959495 -0 4.15415 -9.09632 0 0.436968 -0.899477 --0.591198 4.11187 -9.09632 -0.0560156 0.389602 -0.919278 --0.400948 2.78865 -9.59493 -0.0400935 0.27886 -0.959495 --0.793732 2.70321 -9.59493 -0.0800395 0.28032 -0.956564 --1.17036 3.98588 -9.09632 -0.123109 0.419268 -0.899477 --2.70321 0.793732 -9.59493 -0.28032 0.0800395 -0.956564 --4.11187 0.591198 -9.09632 -0.389602 0.0560156 -0.919278 --3.98588 1.17036 -9.09632 -0.419268 0.123109 -0.899477 --2.78865 0.400948 -9.59493 -0.27886 0.0400935 -0.959495 --2.81733 0 -9.59493 -0.281727 2.17441e-019 -0.959495 --4.15415 0 -9.09632 -0.436968 0 -0.899477 --4.11187 -0.591198 -9.09632 -0.389602 -0.0560156 -0.919278 --2.78865 -0.400948 -9.59493 -0.27886 -0.0400935 -0.959495 --2.70321 -0.793732 -9.59493 -0.28032 -0.0800395 -0.956564 --3.98588 -1.17036 -9.09632 -0.419268 -0.123109 -0.899477 --0.793732 -2.70321 -9.59493 -0.0800395 -0.28032 -0.956564 --0.591198 -4.11187 -9.09632 -0.0560156 -0.389602 -0.919278 --1.17036 -3.98588 -9.09632 -0.123109 -0.419268 -0.899477 --0.400948 -2.78865 -9.59493 -0.0400935 -0.27886 -0.959495 -0 -2.81733 -9.59493 4.34882e-019 -0.281727 -0.959495 -0 -4.15415 -9.09632 1.15968e-018 -0.436968 -0.899477 -0.591198 -4.11187 -9.09632 0.0560156 -0.389602 -0.919278 -0.400948 -2.78865 -9.59493 0.0400935 -0.27886 -0.959495 -0.793732 -2.70321 -9.59493 0.0800395 -0.28032 -0.956564 -1.17036 -3.98588 -9.09632 0.123109 -0.419268 -0.899477 -4.15415 0 -9.09632 0.436968 0 -0.899477 -2.70321 -0.793732 -9.59493 0.28032 -0.0800395 -0.956564 -2.78865 -0.400948 -9.59493 0.27886 -0.0400935 -0.959495 -4.11187 -0.591198 -9.09632 0.389602 -0.0560156 -0.919278 -3.98588 -1.17036 -9.09632 0.419268 -0.123109 -0.899477 -3.49469 2.2459 -9.09632 0.356647 0.237372 -0.90358 -4.54816 2.92292 -8.41254 0.464662 0.292785 -0.835683 -3.77875 1.7257 -9.09632 0.367349 0.17316 -0.913822 -1.7257 3.77875 -9.09632 0.17316 0.367349 -0.913822 -2.92292 4.54816 -8.41254 0.292785 0.464662 -0.835683 -2.2459 3.49469 -9.09632 0.237372 0.356647 -0.90358 --2.2459 3.49469 -9.09632 -0.237372 0.356647 -0.90358 --2.92292 4.54816 -8.41254 -0.292785 0.464662 -0.835683 --1.7257 3.77875 -9.09632 -0.17316 0.367349 -0.913822 --3.77875 1.7257 -9.09632 -0.367349 0.17316 -0.913822 --4.54816 2.92292 -8.41254 -0.464662 0.292785 -0.835683 --3.49469 2.2459 -9.09632 -0.356647 0.237372 -0.90358 --3.49469 -2.2459 -9.09632 -0.356647 -0.237372 -0.90358 --4.54816 -2.92292 -8.41254 -0.464662 -0.292785 -0.835683 --3.77875 -1.7257 -9.09632 -0.367349 -0.17316 -0.913822 --1.7257 -3.77875 -9.09632 -0.17316 -0.367349 -0.913822 --2.92292 -4.54816 -8.41254 -0.292785 -0.464662 -0.835683 --2.2459 -3.49469 -9.09632 -0.237372 -0.356647 -0.90358 -2.2459 -3.49469 -9.09632 0.237372 -0.356647 -0.90358 -2.92292 -4.54816 -8.41254 0.292785 -0.464662 -0.835683 -1.7257 -3.77875 -9.09632 0.17316 -0.367349 -0.913822 -3.77875 -1.7257 -9.09632 0.367349 -0.17316 -0.913822 -4.54816 -2.92292 -8.41254 0.464662 -0.292785 -0.835683 -3.49469 -2.2459 -9.09632 0.356647 -0.237372 -0.90358 -4.91784 2.2459 -8.41254 0.483623 0.213308 -0.848886 -5.95682 2.72039 -7.5575 0.579121 0.264475 -0.77115 -5.50904 3.54044 -7.5575 0.565385 0.3513 -0.746276 -4.94911 4.28842 -7.5575 0.493771 0.418273 -0.76239 -4.08589 3.54044 -8.41254 0.393313 0.340807 -0.853906 -4.28842 4.94911 -7.5575 0.429221 0.504724 -0.749015 -3.54044 5.50904 -7.5575 0.3513 0.565385 -0.746276 -2.72039 5.95682 -7.5575 0.264475 0.579121 -0.77115 -3.54044 4.08589 -8.41254 0.355119 0.407643 -0.84126 -2.2459 4.91784 -8.41254 0.213308 0.483623 -0.848886 --2.2459 4.91784 -8.41254 -0.213308 0.483623 -0.848886 --2.72039 5.95682 -7.5575 -0.264475 0.579121 -0.77115 --3.54044 5.50904 -7.5575 -0.3513 0.565385 -0.746276 --4.28842 4.94911 -7.5575 -0.429221 0.504724 -0.749015 --3.54044 4.08589 -8.41254 -0.355119 0.407643 -0.84126 --4.08589 3.54044 -8.41254 -0.393313 0.340807 -0.853906 --4.94911 4.28842 -7.5575 -0.493771 0.418273 -0.76239 --5.50904 3.54044 -7.5575 -0.565385 0.3513 -0.746276 --5.95682 2.72039 -7.5575 -0.579121 0.264475 -0.77115 --4.91784 2.2459 -8.41254 -0.483623 0.213308 -0.848886 --4.91784 -2.2459 -8.41254 -0.483623 -0.213308 -0.848886 --5.95682 -2.72039 -7.5575 -0.579121 -0.264475 -0.77115 --5.50904 -3.54044 -7.5575 -0.565385 -0.3513 -0.746276 --4.94911 -4.28842 -7.5575 -0.493771 -0.418273 -0.76239 --4.08589 -3.54044 -8.41254 -0.393313 -0.340807 -0.853906 --3.54044 -4.08589 -8.41254 -0.355119 -0.407643 -0.84126 --4.28842 -4.94911 -7.5575 -0.429221 -0.504724 -0.749015 --3.54044 -5.50904 -7.5575 -0.3513 -0.565385 -0.746276 --2.72039 -5.95682 -7.5575 -0.264475 -0.579121 -0.77115 --2.2459 -4.91784 -8.41254 -0.213308 -0.483623 -0.848886 -2.2459 -4.91784 -8.41254 0.213308 -0.483623 -0.848886 -2.72039 -5.95682 -7.5575 0.264475 -0.579121 -0.77115 -3.54044 -5.50904 -7.5575 0.3513 -0.565385 -0.746276 -3.54044 -4.08589 -8.41254 0.355119 -0.407643 -0.84126 -4.28842 -4.94911 -7.5575 0.429221 -0.504724 -0.749015 -4.08589 -3.54044 -8.41254 0.393313 -0.340807 -0.853906 -4.94911 -4.28842 -7.5575 0.493771 -0.418273 -0.76239 -5.50904 -3.54044 -7.5575 0.565385 -0.3513 -0.746276 -5.95682 -2.72039 -7.5575 0.579121 -0.264475 -0.77115 -4.91784 -2.2459 -8.41254 0.483623 -0.213308 -0.848886 -6.35777 4.08589 -6.54861 0.636372 0.407646 -0.654871 -5.71158 4.94911 -6.54861 0.57188 0.494062 -0.654871 -4.94911 5.71158 -6.54861 0.504986 0.582786 -0.636671 -4.08589 6.35777 -6.54861 0.407646 0.636372 -0.654871 --4.08589 6.35777 -6.54861 -0.407646 0.636372 -0.654871 --4.94911 5.71158 -6.54861 -0.504986 0.582786 -0.636671 --6.35777 4.08589 -6.54861 -0.636372 0.407646 -0.654871 --5.71158 4.94911 -6.54861 -0.57188 0.494062 -0.654871 --6.35777 -4.08589 -6.54861 -0.636372 -0.407646 -0.654871 --5.71158 -4.94911 -6.54861 -0.57188 -0.494062 -0.654871 --4.08589 -6.35777 -6.54861 -0.407646 -0.636372 -0.654871 --4.94911 -5.71158 -6.54861 -0.504986 -0.582786 -0.636671 -4.08589 -6.35777 -6.54861 0.407646 -0.636372 -0.654871 -4.94911 -5.71158 -6.54861 0.504986 -0.582786 -0.636671 -6.35777 -4.08589 -6.54861 0.636372 -0.407646 -0.654871 -5.71158 -4.94911 -6.54861 0.57188 -0.494062 -0.654871 -7.65231 3.49469 -5.40641 0.753288 0.344015 -0.560545 -7.07708 4.54816 -5.40641 0.707856 0.464658 -0.532008 -6.87454 3.1395 -6.54861 0.673054 0.307374 -0.672696 -4.54816 7.07708 -5.40641 0.464658 0.707856 -0.532008 -3.49469 7.65231 -5.40641 0.344015 0.753288 -0.560545 -3.1395 6.87454 -6.54861 0.307374 0.673054 -0.672696 --3.49469 7.65231 -5.40641 -0.344015 0.753288 -0.560545 --4.54816 7.07708 -5.40641 -0.464658 0.707856 -0.532008 --3.1395 6.87454 -6.54861 -0.307374 0.673054 -0.672696 --7.65231 3.49469 -5.40641 -0.753288 0.344015 -0.560545 --7.07708 4.54816 -5.40641 -0.707856 0.464658 -0.532008 --6.87454 3.1395 -6.54861 -0.673054 0.307374 -0.672696 --7.65231 -3.49469 -5.40641 -0.753288 -0.344015 -0.560545 --7.07708 -4.54816 -5.40641 -0.707856 -0.464658 -0.532008 --6.87454 -3.1395 -6.54861 -0.673054 -0.307374 -0.672696 --3.49469 -7.65231 -5.40641 -0.344015 -0.753288 -0.560545 --4.54816 -7.07708 -5.40641 -0.464658 -0.707856 -0.532008 --3.1395 -6.87454 -6.54861 -0.307374 -0.673054 -0.672696 -3.49469 -7.65231 -5.40641 0.344015 -0.753288 -0.560545 -4.54816 -7.07708 -5.40641 0.464658 -0.707856 -0.532008 -3.1395 -6.87454 -6.54861 0.307374 -0.673054 -0.672696 -6.87454 -3.1395 -6.54861 0.673054 -0.307374 -0.672696 -7.65231 -3.49469 -5.40641 0.753288 -0.344015 -0.560545 -7.07708 -4.54816 -5.40641 0.707856 -0.464658 -0.532008 -8.07177 2.37009 -5.40641 0.819306 0.240571 -0.520445 -9.00373 1.29454 -4.15415 0.897446 0.119338 -0.424676 -8.32691 1.19723 -5.40641 0.823258 0.129964 -0.55259 -8.72786 2.56273 -4.15415 0.882098 0.245008 -0.402336 -6.87454 5.95682 -4.15415 0.679773 0.589027 -0.436984 -7.65231 4.91784 -4.15415 0.762817 0.506199 -0.402335 -6.35777 5.50904 -5.40641 0.622305 0.554421 -0.552588 -5.95682 6.87454 -4.15415 0.596213 0.686989 -0.415424 -5.50904 6.35777 -5.40641 0.565374 0.633261 -0.528519 -4.91784 7.65231 -4.15415 0.506199 0.762817 -0.402335 -2.37009 8.07177 -5.40641 0.240571 0.819306 -0.520445 -1.29454 9.00373 -4.15415 0.119338 0.897446 -0.424676 -2.56273 8.72786 -4.15415 0.245008 0.882098 -0.402336 -1.19723 8.32691 -5.40641 0.129964 0.823258 -0.55259 -0 8.41254 -5.40641 2.61344e-018 0.841248 -0.54065 -0 9.09632 -4.15415 0 0.909628 -0.415423 --1.29454 9.00373 -4.15415 -0.119338 0.897446 -0.424676 --1.19723 8.32691 -5.40641 -0.129964 0.823258 -0.55259 --2.37009 8.07177 -5.40641 -0.240571 0.819306 -0.520445 --2.56273 8.72786 -4.15415 -0.245008 0.882098 -0.402336 --5.95682 6.87454 -4.15415 -0.596213 0.686989 -0.415424 --4.91784 7.65231 -4.15415 -0.506199 0.762817 -0.402335 --5.50904 6.35777 -5.40641 -0.565374 0.633261 -0.528519 --6.87454 5.95682 -4.15415 -0.679773 0.589027 -0.436984 --6.35777 5.50904 -5.40641 -0.622305 0.554421 -0.552588 --7.65231 4.91784 -4.15415 -0.762817 0.506199 -0.402335 --8.07177 2.37009 -5.40641 -0.819306 0.240571 -0.520445 --9.00373 1.29454 -4.15415 -0.897446 0.119338 -0.424676 --8.72786 2.56273 -4.15415 -0.882098 0.245008 -0.402336 --8.32691 1.19723 -5.40641 -0.823258 0.129964 -0.55259 --8.41254 0 -5.40641 -0.841248 2.61344e-018 -0.54065 --9.09632 0 -4.15415 -0.909628 0 -0.415423 --9.00373 -1.29454 -4.15415 -0.897446 -0.119338 -0.424676 --8.32691 -1.19723 -5.40641 -0.823258 -0.129964 -0.55259 --8.07177 -2.37009 -5.40641 -0.819306 -0.240571 -0.520445 --8.72786 -2.56273 -4.15415 -0.882098 -0.245008 -0.402336 --6.87454 -5.95682 -4.15415 -0.679773 -0.589027 -0.436984 --7.65231 -4.91784 -4.15415 -0.762817 -0.506199 -0.402335 --6.35777 -5.50904 -5.40641 -0.622305 -0.554421 -0.552588 --5.95682 -6.87454 -4.15415 -0.596213 -0.686989 -0.415424 --5.50904 -6.35777 -5.40641 -0.565374 -0.633261 -0.528519 --4.91784 -7.65231 -4.15415 -0.506199 -0.762817 -0.402335 --2.37009 -8.07177 -5.40641 -0.240571 -0.819306 -0.520445 --1.29454 -9.00373 -4.15415 -0.119338 -0.897446 -0.424676 --2.56273 -8.72786 -4.15415 -0.245008 -0.882098 -0.402336 --1.19723 -8.32691 -5.40641 -0.129964 -0.823258 -0.55259 -0 -8.41254 -5.40641 1.74229e-018 -0.841248 -0.54065 -0 -9.09632 -4.15415 0 -0.909628 -0.415423 -1.29454 -9.00373 -4.15415 0.119338 -0.897446 -0.424676 -1.19723 -8.32691 -5.40641 0.129964 -0.823258 -0.55259 -2.37009 -8.07177 -5.40641 0.240571 -0.819306 -0.520445 -2.56273 -8.72786 -4.15415 0.245008 -0.882098 -0.402336 -5.95682 -6.87454 -4.15415 0.596213 -0.686989 -0.415424 -4.91784 -7.65231 -4.15415 0.506199 -0.762817 -0.402335 -5.50904 -6.35777 -5.40641 0.565374 -0.633261 -0.528519 -6.87454 -5.95682 -4.15415 0.679773 -0.589027 -0.436984 -6.35777 -5.50904 -5.40641 0.622305 -0.554421 -0.552588 -7.65231 -4.91784 -4.15415 0.762817 -0.506199 -0.402335 -9.09632 0 -4.15415 0.909628 0 -0.415423 -8.41254 0 -5.40641 0.841248 8.71145e-019 -0.54065 -8.07177 -2.37009 -5.40641 0.819306 -0.240571 -0.520445 -8.32691 -1.19723 -5.40641 0.823258 -0.129964 -0.55259 -9.00373 -1.29454 -4.15415 0.897446 -0.119338 -0.424676 -8.72786 -2.56273 -4.15415 0.882098 -0.245008 -0.402336 -9.59493 0 -2.81733 0.952503 -4.64713e-018 -0.30453 -9.49727 1.3655 -2.81733 0.949792 0.136075 -0.281742 -8.2743 3.77875 -4.15415 0.827426 0.377874 -0.415425 -9.20627 2.70321 -2.81733 0.920592 0.280314 -0.271909 -8.72786 3.98588 -2.81733 0.872783 0.398588 -0.28174 -3.77875 8.2743 -4.15415 0.377874 0.827426 -0.415425 -2.70321 9.20627 -2.81733 0.280314 0.920592 -0.271909 -3.98588 8.72786 -2.81733 0.398588 0.872783 -0.28174 -0 9.59493 -2.81733 0 0.952503 -0.30453 -1.3655 9.49727 -2.81733 0.136075 0.949792 -0.281742 --1.3655 9.49727 -2.81733 -0.136075 0.949792 -0.281742 --3.77875 8.2743 -4.15415 -0.377874 0.827426 -0.415425 --2.70321 9.20627 -2.81733 -0.280314 0.920592 -0.271909 --3.98588 8.72786 -2.81733 -0.398588 0.872783 -0.28174 --8.2743 3.77875 -4.15415 -0.827426 0.377874 -0.415425 --9.20627 2.70321 -2.81733 -0.920592 0.280314 -0.271909 --8.72786 3.98588 -2.81733 -0.872783 0.398588 -0.28174 --9.59493 0 -2.81733 -0.952503 0 -0.30453 --9.49727 1.3655 -2.81733 -0.949792 0.136075 -0.281742 --9.49727 -1.3655 -2.81733 -0.949792 -0.136075 -0.281742 --8.2743 -3.77875 -4.15415 -0.827426 -0.377874 -0.415425 --9.20627 -2.70321 -2.81733 -0.920592 -0.280314 -0.271909 --8.72786 -3.98588 -2.81733 -0.872783 -0.398588 -0.28174 --3.77875 -8.2743 -4.15415 -0.377874 -0.827426 -0.415425 --2.70321 -9.20627 -2.81733 -0.280314 -0.920592 -0.271909 --3.98588 -8.72786 -2.81733 -0.398588 -0.872783 -0.28174 -0 -9.59493 -2.81733 -2.32356e-018 -0.952503 -0.30453 --1.3655 -9.49727 -2.81733 -0.136075 -0.949792 -0.281742 -1.3655 -9.49727 -2.81733 0.136075 -0.949792 -0.281742 -3.77875 -8.2743 -4.15415 0.377874 -0.827426 -0.415425 -2.70321 -9.20627 -2.81733 0.280314 -0.920592 -0.271909 -3.98588 -8.72786 -2.81733 0.398588 -0.872783 -0.28174 -8.2743 -3.77875 -4.15415 0.827426 -0.377874 -0.415425 -9.20627 -2.70321 -2.81733 0.920592 -0.280314 -0.271909 -8.72786 -3.98588 -2.81733 0.872783 -0.398588 -0.28174 -9.49727 -1.3655 -2.81733 0.949792 -0.136075 -0.281742 -9.79747 1.40866 -1.42315 0.976116 0.164179 -0.142279 -9.49727 2.78865 -1.42315 0.949726 0.278867 -0.142317 -9.00373 4.11187 -1.42315 0.900373 0.411187 -0.142317 -8.07177 5.18741 -2.81733 0.814706 0.512171 -0.27191 -8.32691 5.35138 -1.42315 0.8265 0.548159 -0.128135 -7.48057 6.48195 -1.42315 0.74528 0.64579 -0.165869 -7.25137 6.28334 -2.81733 0.719854 0.623757 -0.304528 -5.18741 8.07177 -2.81733 0.512171 0.814706 -0.27191 -6.48195 7.48057 -1.42315 0.648378 0.747898 -0.14232 -6.28334 7.25137 -2.81733 0.628694 0.724822 -0.281739 -5.35138 8.32691 -1.42315 0.548159 0.8265 -0.128135 -4.11187 9.00373 -1.42315 0.411187 0.900373 -0.142317 -2.78865 9.49727 -1.42315 0.278867 0.949726 -0.142317 -1.40866 9.79747 -1.42315 0.164179 0.976116 -0.142279 --1.40866 9.79747 -1.42315 -0.164179 0.976116 -0.142279 --2.78865 9.49727 -1.42315 -0.278867 0.949726 -0.142317 --4.11187 9.00373 -1.42315 -0.411187 0.900373 -0.142317 --5.18741 8.07177 -2.81733 -0.512171 0.814706 -0.27191 --5.35138 8.32691 -1.42315 -0.548159 0.8265 -0.128135 --6.48195 7.48057 -1.42315 -0.648378 0.747898 -0.14232 --6.28334 7.25137 -2.81733 -0.628694 0.724822 -0.281739 --8.07177 5.18741 -2.81733 -0.814706 0.512171 -0.27191 --7.48057 6.48195 -1.42315 -0.74528 0.64579 -0.165869 --7.25137 6.28334 -2.81733 -0.719854 0.623757 -0.304528 --8.32691 5.35138 -1.42315 -0.8265 0.548159 -0.128135 --9.00373 4.11187 -1.42315 -0.900373 0.411187 -0.142317 --9.49727 2.78865 -1.42315 -0.949726 0.278867 -0.142317 --9.79747 1.40866 -1.42315 -0.976116 0.164179 -0.142279 --9.79747 -1.40866 -1.42315 -0.976116 -0.164179 -0.142279 --9.49727 -2.78865 -1.42315 -0.949726 -0.278867 -0.142317 --9.00373 -4.11187 -1.42315 -0.900373 -0.411187 -0.142317 --8.07177 -5.18741 -2.81733 -0.814706 -0.512171 -0.27191 --8.32691 -5.35138 -1.42315 -0.8265 -0.548159 -0.128135 --7.48057 -6.48195 -1.42315 -0.74528 -0.64579 -0.165869 --7.25137 -6.28334 -2.81733 -0.719854 -0.623757 -0.304528 --5.18741 -8.07177 -2.81733 -0.512171 -0.814706 -0.27191 --6.48195 -7.48057 -1.42315 -0.648378 -0.747898 -0.14232 --6.28334 -7.25137 -2.81733 -0.628694 -0.724822 -0.281739 --5.35138 -8.32691 -1.42315 -0.548159 -0.8265 -0.128135 --4.11187 -9.00373 -1.42315 -0.411187 -0.900373 -0.142317 --2.78865 -9.49727 -1.42315 -0.278867 -0.949726 -0.142317 --1.40866 -9.79747 -1.42315 -0.164179 -0.976116 -0.142279 -1.40866 -9.79747 -1.42315 0.164179 -0.976116 -0.142279 -2.78865 -9.49727 -1.42315 0.278867 -0.949726 -0.142317 -4.11187 -9.00373 -1.42315 0.411187 -0.900373 -0.142317 -5.18741 -8.07177 -2.81733 0.512171 -0.814706 -0.27191 -5.35138 -8.32691 -1.42315 0.548159 -0.8265 -0.128135 -6.48195 -7.48057 -1.42315 0.648378 -0.747898 -0.14232 -6.28334 -7.25137 -2.81733 0.628694 -0.724822 -0.281739 -8.07177 -5.18741 -2.81733 0.814706 -0.512171 -0.27191 -7.48057 -6.48195 -1.42315 0.74528 -0.64579 -0.165869 -7.25137 -6.28334 -2.81733 0.719854 -0.623757 -0.304528 -8.32691 -5.35138 -1.42315 0.8265 -0.548159 -0.128135 -9.00373 -4.11187 -1.42315 0.900373 -0.411187 -0.142317 -9.49727 -2.78865 -1.42315 0.949726 -0.278867 -0.142317 -9.79747 -1.40866 -1.42315 0.976116 -0.164179 -0.142279 -9.59493 2.81733 0 0.959492 0.281735 1.74357e-018 -9.89822 1.42315 0 0.992932 0.118683 0 -8.41254 5.40641 0 0.853901 0.520435 0 -7.5575 6.54861 0 0.755749 0.654861 0 -6.54861 7.5575 0 0.636663 0.771142 0 -5.40641 8.41254 0 0.520435 0.853901 2.32411e-018 -2.81733 9.59493 0 0.281735 0.959492 1.74357e-018 -1.42315 9.89822 0 0.118683 0.992932 -2.32411e-018 --2.81733 9.59493 0 -0.281735 0.959492 1.74357e-018 --1.42315 9.89822 0 -0.118683 0.992932 0 --5.40641 8.41254 0 -0.520435 0.853901 0 --6.54861 7.5575 0 -0.636663 0.771142 -2.32411e-018 --7.5575 6.54861 0 -0.755749 0.654861 0 --8.41254 5.40641 0 -0.853901 0.520435 2.32411e-018 --9.59493 2.81733 0 -0.959492 0.281735 1.74357e-018 --9.89822 1.42315 0 -0.992932 0.118683 -2.32411e-018 --9.59493 -2.81733 0 -0.959492 -0.281735 1.74357e-018 --9.89822 -1.42315 0 -0.992932 -0.118683 -2.32411e-018 --8.41254 -5.40641 0 -0.853901 -0.520435 0 --7.5575 -6.54861 0 -0.755749 -0.654861 0 --6.54861 -7.5575 0 -0.636663 -0.771142 0 --5.40641 -8.41254 0 -0.520435 -0.853901 2.32411e-018 --2.81733 -9.59493 0 -0.281735 -0.959492 1.74357e-018 --1.42315 -9.89822 0 -0.118683 -0.992932 0 -2.81733 -9.59493 0 0.281735 -0.959492 1.74357e-018 -1.42315 -9.89822 0 0.118683 -0.992932 -2.32411e-018 -5.40641 -8.41254 0 0.520435 -0.853901 0 -6.54861 -7.5575 0 0.636663 -0.771142 -2.32411e-018 -7.5575 -6.54861 0 0.755749 -0.654861 0 -8.41254 -5.40641 0 0.853901 -0.520435 2.32411e-018 -9.59493 -2.81733 0 0.959492 -0.281735 1.74357e-018 -9.89822 -1.42315 0 0.992932 -0.118683 0 -9.79747 1.40866 1.42315 0.976116 0.164179 0.142279 -9.49727 2.78865 1.42315 0.949726 0.278867 0.142317 -9.00373 4.11187 1.42315 0.900373 0.411187 0.142317 -9.09632 4.15415 0 0.909632 0.415414 0 -8.32691 5.35138 1.42315 0.8265 0.548159 0.128135 -7.48057 6.48195 1.42315 0.74528 0.64579 0.165869 -6.48195 7.48057 1.42315 0.648378 0.747898 0.14232 -5.35138 8.32691 1.42315 0.548159 0.8265 0.128135 -4.11187 9.00373 1.42315 0.411187 0.900373 0.142317 -4.15415 9.09632 0 0.415414 0.909632 3.48715e-018 -2.78865 9.49727 1.42315 0.278867 0.949726 0.142317 -1.40866 9.79747 1.42315 0.164179 0.976116 0.142279 --1.40866 9.79747 1.42315 -0.164179 0.976116 0.142279 --2.78865 9.49727 1.42315 -0.278867 0.949726 0.142317 --4.11187 9.00373 1.42315 -0.411187 0.900373 0.142317 --4.15415 9.09632 0 -0.415414 0.909632 0 --5.35138 8.32691 1.42315 -0.548159 0.8265 0.128135 --6.48195 7.48057 1.42315 -0.648378 0.747898 0.14232 --7.48057 6.48195 1.42315 -0.74528 0.64579 0.165869 --8.32691 5.35138 1.42315 -0.8265 0.548159 0.128135 --9.00373 4.11187 1.42315 -0.900373 0.411187 0.142317 --9.09632 4.15415 0 -0.909632 0.415414 3.48715e-018 --9.49727 2.78865 1.42315 -0.949726 0.278867 0.142317 --9.79747 1.40866 1.42315 -0.976116 0.164179 0.142279 --9.79747 -1.40866 1.42315 -0.976116 -0.164179 0.142279 --9.49727 -2.78865 1.42315 -0.949726 -0.278867 0.142317 --9.00373 -4.11187 1.42315 -0.900373 -0.411187 0.142317 --9.09632 -4.15415 0 -0.909632 -0.415414 0 --8.32691 -5.35138 1.42315 -0.8265 -0.548159 0.128135 --7.48057 -6.48195 1.42315 -0.74528 -0.64579 0.165869 --6.48195 -7.48057 1.42315 -0.648378 -0.747898 0.14232 --5.35138 -8.32691 1.42315 -0.548159 -0.8265 0.128135 --4.11187 -9.00373 1.42315 -0.411187 -0.900373 0.142317 --4.15415 -9.09632 0 -0.415414 -0.909632 3.48715e-018 --2.78865 -9.49727 1.42315 -0.278867 -0.949726 0.142317 --1.40866 -9.79747 1.42315 -0.164179 -0.976116 0.142279 -1.40866 -9.79747 1.42315 0.164179 -0.976116 0.142279 -2.78865 -9.49727 1.42315 0.278867 -0.949726 0.142317 -4.11187 -9.00373 1.42315 0.411187 -0.900373 0.142317 -4.15415 -9.09632 0 0.415414 -0.909632 0 -5.35138 -8.32691 1.42315 0.548159 -0.8265 0.128135 -6.48195 -7.48057 1.42315 0.648378 -0.747898 0.14232 -7.48057 -6.48195 1.42315 0.74528 -0.64579 0.165869 -8.32691 -5.35138 1.42315 0.8265 -0.548159 0.128135 -9.00373 -4.11187 1.42315 0.900373 -0.411187 0.142317 -9.09632 -4.15415 0 0.909632 -0.415414 3.48715e-018 -9.49727 -2.78865 1.42315 0.949726 -0.278867 0.142317 -9.79747 -1.40866 1.42315 0.976116 -0.164179 0.142279 -9.20627 2.70321 2.81733 0.920592 0.280314 0.271909 -9.49727 1.3655 2.81733 0.949792 0.136075 0.281742 -2.70321 9.20627 2.81733 0.280314 0.920592 0.271909 -1.3655 9.49727 2.81733 0.136075 0.949792 0.281742 --2.70321 9.20627 2.81733 -0.280314 0.920592 0.271909 --1.3655 9.49727 2.81733 -0.136075 0.949792 0.281742 --9.20627 2.70321 2.81733 -0.920592 0.280314 0.271909 --9.49727 1.3655 2.81733 -0.949792 0.136075 0.281742 --9.20627 -2.70321 2.81733 -0.920592 -0.280314 0.271909 --9.49727 -1.3655 2.81733 -0.949792 -0.136075 0.281742 --2.70321 -9.20627 2.81733 -0.280314 -0.920592 0.271909 --1.3655 -9.49727 2.81733 -0.136075 -0.949792 0.281742 -2.70321 -9.20627 2.81733 0.280314 -0.920592 0.271909 -1.3655 -9.49727 2.81733 0.136075 -0.949792 0.281742 -9.20627 -2.70321 2.81733 0.920592 -0.280314 0.271909 -9.49727 -1.3655 2.81733 0.949792 -0.136075 0.281742 -9.00373 1.29454 4.15415 0.897446 0.119338 0.424676 -9.59493 0 2.81733 0.952503 -4.64713e-018 0.30453 -8.2743 3.77875 4.15415 0.827426 0.377874 0.415425 -8.72786 2.56273 4.15415 0.882098 0.245008 0.402336 -8.72786 3.98588 2.81733 0.872783 0.398588 0.28174 -8.07177 5.18741 2.81733 0.814706 0.512171 0.27191 -7.25137 6.28334 2.81733 0.719854 0.623757 0.304528 -6.28334 7.25137 2.81733 0.628694 0.724822 0.281739 -5.18741 8.07177 2.81733 0.512171 0.814706 0.27191 -3.98588 8.72786 2.81733 0.398588 0.872783 0.28174 -2.56273 8.72786 4.15415 0.245008 0.882098 0.402336 -3.77875 8.2743 4.15415 0.377874 0.827426 0.415425 -0 9.59493 2.81733 -2.32356e-018 0.952503 0.30453 -1.29454 9.00373 4.15415 0.119338 0.897446 0.424676 -0 9.09632 4.15415 0 0.909628 0.415423 --1.29454 9.00373 4.15415 -0.119338 0.897446 0.424676 --3.77875 8.2743 4.15415 -0.377874 0.827426 0.415425 --2.56273 8.72786 4.15415 -0.245008 0.882098 0.402336 --3.98588 8.72786 2.81733 -0.398588 0.872783 0.28174 --5.18741 8.07177 2.81733 -0.512171 0.814706 0.27191 --6.28334 7.25137 2.81733 -0.628694 0.724822 0.281739 --7.25137 6.28334 2.81733 -0.719854 0.623757 0.304528 --8.07177 5.18741 2.81733 -0.814706 0.512171 0.27191 --8.72786 3.98588 2.81733 -0.872783 0.398588 0.28174 --8.72786 2.56273 4.15415 -0.882098 0.245008 0.402336 --8.2743 3.77875 4.15415 -0.827426 0.377874 0.415425 --9.59493 0 2.81733 -0.952503 -2.32356e-018 0.30453 --9.00373 1.29454 4.15415 -0.897446 0.119338 0.424676 --9.09632 0 4.15415 -0.909628 0 0.415423 --9.00373 -1.29454 4.15415 -0.897446 -0.119338 0.424676 --8.2743 -3.77875 4.15415 -0.827426 -0.377874 0.415425 --8.72786 -2.56273 4.15415 -0.882098 -0.245008 0.402336 --8.72786 -3.98588 2.81733 -0.872783 -0.398588 0.28174 --8.07177 -5.18741 2.81733 -0.814706 -0.512171 0.27191 --7.25137 -6.28334 2.81733 -0.719854 -0.623757 0.304528 --6.28334 -7.25137 2.81733 -0.628694 -0.724822 0.281739 --5.18741 -8.07177 2.81733 -0.512171 -0.814706 0.27191 --3.98588 -8.72786 2.81733 -0.398588 -0.872783 0.28174 --2.56273 -8.72786 4.15415 -0.245008 -0.882098 0.402336 --3.77875 -8.2743 4.15415 -0.377874 -0.827426 0.415425 -0 -9.59493 2.81733 0 -0.952503 0.30453 --1.29454 -9.00373 4.15415 -0.119338 -0.897446 0.424676 -0 -9.09632 4.15415 0 -0.909628 0.415423 -1.29454 -9.00373 4.15415 0.119338 -0.897446 0.424676 -3.77875 -8.2743 4.15415 0.377874 -0.827426 0.415425 -2.56273 -8.72786 4.15415 0.245008 -0.882098 0.402336 -3.98588 -8.72786 2.81733 0.398588 -0.872783 0.28174 -5.18741 -8.07177 2.81733 0.512171 -0.814706 0.27191 -6.28334 -7.25137 2.81733 0.628694 -0.724822 0.281739 -7.25137 -6.28334 2.81733 0.719854 -0.623757 0.304528 -8.07177 -5.18741 2.81733 0.814706 -0.512171 0.27191 -8.72786 -3.98588 2.81733 0.872783 -0.398588 0.28174 -9.09632 0 4.15415 0.909628 0 0.415423 -9.00373 -1.29454 4.15415 0.897446 -0.119338 0.424676 -8.2743 -3.77875 4.15415 0.827426 -0.377874 0.415425 -8.72786 -2.56273 4.15415 0.882098 -0.245008 0.402336 -8.41254 0 5.40641 0.841248 1.74229e-018 0.54065 -8.32691 1.19723 5.40641 0.823258 0.129964 0.55259 -8.07177 2.37009 5.40641 0.819306 0.240571 0.520445 -6.87454 5.95682 4.15415 0.679773 0.589027 0.436984 -7.07708 4.54816 5.40641 0.707856 0.464658 0.532008 -7.65231 4.91784 4.15415 0.762817 0.506199 0.402335 -6.35777 5.50904 5.40641 0.622305 0.554421 0.552588 -5.50904 6.35777 5.40641 0.565374 0.633261 0.528519 -5.95682 6.87454 4.15415 0.596213 0.686989 0.415424 -4.54816 7.07708 5.40641 0.464658 0.707856 0.532008 -4.91784 7.65231 4.15415 0.506199 0.762817 0.402335 -2.37009 8.07177 5.40641 0.240571 0.819306 0.520445 -1.19723 8.32691 5.40641 0.129964 0.823258 0.55259 -0 8.41254 5.40641 1.74229e-018 0.841248 0.54065 --1.19723 8.32691 5.40641 -0.129964 0.823258 0.55259 --2.37009 8.07177 5.40641 -0.240571 0.819306 0.520445 --5.95682 6.87454 4.15415 -0.596213 0.686989 0.415424 --4.54816 7.07708 5.40641 -0.464658 0.707856 0.532008 --4.91784 7.65231 4.15415 -0.506199 0.762817 0.402335 --5.50904 6.35777 5.40641 -0.565374 0.633261 0.528519 --6.35777 5.50904 5.40641 -0.622305 0.554421 0.552588 --6.87454 5.95682 4.15415 -0.679773 0.589027 0.436984 --7.07708 4.54816 5.40641 -0.707856 0.464658 0.532008 --7.65231 4.91784 4.15415 -0.762817 0.506199 0.402335 --8.07177 2.37009 5.40641 -0.819306 0.240571 0.520445 --8.32691 1.19723 5.40641 -0.823258 0.129964 0.55259 --8.41254 0 5.40641 -0.841248 8.71145e-019 0.54065 --8.32691 -1.19723 5.40641 -0.823258 -0.129964 0.55259 --8.07177 -2.37009 5.40641 -0.819306 -0.240571 0.520445 --6.87454 -5.95682 4.15415 -0.679773 -0.589027 0.436984 --7.07708 -4.54816 5.40641 -0.707856 -0.464658 0.532008 --7.65231 -4.91784 4.15415 -0.762817 -0.506199 0.402335 --6.35777 -5.50904 5.40641 -0.622305 -0.554421 0.552588 --5.50904 -6.35777 5.40641 -0.565374 -0.633261 0.528519 --5.95682 -6.87454 4.15415 -0.596213 -0.686989 0.415424 --4.54816 -7.07708 5.40641 -0.464658 -0.707856 0.532008 --4.91784 -7.65231 4.15415 -0.506199 -0.762817 0.402335 --2.37009 -8.07177 5.40641 -0.240571 -0.819306 0.520445 --1.19723 -8.32691 5.40641 -0.129964 -0.823258 0.55259 -0 -8.41254 5.40641 2.61344e-018 -0.841248 0.54065 -1.19723 -8.32691 5.40641 0.129964 -0.823258 0.55259 -2.37009 -8.07177 5.40641 0.240571 -0.819306 0.520445 -5.95682 -6.87454 4.15415 0.596213 -0.686989 0.415424 -4.54816 -7.07708 5.40641 0.464658 -0.707856 0.532008 -4.91784 -7.65231 4.15415 0.506199 -0.762817 0.402335 -5.50904 -6.35777 5.40641 0.565374 -0.633261 0.528519 -6.35777 -5.50904 5.40641 0.622305 -0.554421 0.552588 -6.87454 -5.95682 4.15415 0.679773 -0.589027 0.436984 -7.07708 -4.54816 5.40641 0.707856 -0.464658 0.532008 -7.65231 -4.91784 4.15415 0.762817 -0.506199 0.402335 -8.32691 -1.19723 5.40641 0.823258 -0.129964 0.55259 -8.07177 -2.37009 5.40641 0.819306 -0.240571 0.520445 -7.65231 3.49469 5.40641 0.753288 0.344015 0.560545 -6.35777 4.08589 6.54861 0.636372 0.407646 0.654871 -6.87454 3.1395 6.54861 0.673054 0.307374 0.672696 -3.49469 7.65231 5.40641 0.344015 0.753288 0.560545 -4.08589 6.35777 6.54861 0.407646 0.636372 0.654871 -3.1395 6.87454 6.54861 0.307374 0.673054 0.672696 --3.49469 7.65231 5.40641 -0.344015 0.753288 0.560545 --4.08589 6.35777 6.54861 -0.407646 0.636372 0.654871 --3.1395 6.87454 6.54861 -0.307374 0.673054 0.672696 --7.65231 3.49469 5.40641 -0.753288 0.344015 0.560545 --6.35777 4.08589 6.54861 -0.636372 0.407646 0.654871 --6.87454 3.1395 6.54861 -0.673054 0.307374 0.672696 --7.65231 -3.49469 5.40641 -0.753288 -0.344015 0.560545 --6.35777 -4.08589 6.54861 -0.636372 -0.407646 0.654871 --6.87454 -3.1395 6.54861 -0.673054 -0.307374 0.672696 --3.49469 -7.65231 5.40641 -0.344015 -0.753288 0.560545 --4.08589 -6.35777 6.54861 -0.407646 -0.636372 0.654871 --3.1395 -6.87454 6.54861 -0.307374 -0.673054 0.672696 -3.49469 -7.65231 5.40641 0.344015 -0.753288 0.560545 -4.08589 -6.35777 6.54861 0.407646 -0.636372 0.654871 -3.1395 -6.87454 6.54861 0.307374 -0.673054 0.672696 -7.65231 -3.49469 5.40641 0.753288 -0.344015 0.560545 -6.35777 -4.08589 6.54861 0.636372 -0.407646 0.654871 -6.87454 -3.1395 6.54861 0.673054 -0.307374 0.672696 -4.94911 4.28842 7.5575 0.493771 0.418273 0.76239 -5.50904 3.54044 7.5575 0.565385 0.3513 0.746276 -5.71158 4.94911 6.54861 0.57188 0.494062 0.654871 -4.28842 4.94911 7.5575 0.429221 0.504724 0.749015 -4.94911 5.71158 6.54861 0.504986 0.582786 0.636671 -3.54044 5.50904 7.5575 0.3513 0.565385 0.746276 --4.28842 4.94911 7.5575 -0.429221 0.504724 0.749015 --3.54044 5.50904 7.5575 -0.3513 0.565385 0.746276 --4.94911 5.71158 6.54861 -0.504986 0.582786 0.636671 --4.94911 4.28842 7.5575 -0.493771 0.418273 0.76239 --5.71158 4.94911 6.54861 -0.57188 0.494062 0.654871 --5.50904 3.54044 7.5575 -0.565385 0.3513 0.746276 --4.94911 -4.28842 7.5575 -0.493771 -0.418273 0.76239 --5.50904 -3.54044 7.5575 -0.565385 -0.3513 0.746276 --5.71158 -4.94911 6.54861 -0.57188 -0.494062 0.654871 --4.28842 -4.94911 7.5575 -0.429221 -0.504724 0.749015 --4.94911 -5.71158 6.54861 -0.504986 -0.582786 0.636671 --3.54044 -5.50904 7.5575 -0.3513 -0.565385 0.746276 -4.28842 -4.94911 7.5575 0.429221 -0.504724 0.749015 -3.54044 -5.50904 7.5575 0.3513 -0.565385 0.746276 -4.94911 -5.71158 6.54861 0.504986 -0.582786 0.636671 -4.94911 -4.28842 7.5575 0.493771 -0.418273 0.76239 -5.71158 -4.94911 6.54861 0.57188 -0.494062 0.654871 -5.50904 -3.54044 7.5575 0.565385 -0.3513 0.746276 -4.54816 2.92292 8.41254 0.464662 0.292785 0.835683 -5.95682 2.72039 7.5575 0.579121 0.264475 0.77115 -4.08589 3.54044 8.41254 0.393313 0.340807 0.853906 -2.92292 4.54816 8.41254 0.292785 0.464662 0.835683 -3.54044 4.08589 8.41254 0.355119 0.407643 0.84126 -2.72039 5.95682 7.5575 0.264475 0.579121 0.77115 --2.92292 4.54816 8.41254 -0.292785 0.464662 0.835683 --2.72039 5.95682 7.5575 -0.264475 0.579121 0.77115 --3.54044 4.08589 8.41254 -0.355119 0.407643 0.84126 --4.54816 2.92292 8.41254 -0.464662 0.292785 0.835683 --4.08589 3.54044 8.41254 -0.393313 0.340807 0.853906 --5.95682 2.72039 7.5575 -0.579121 0.264475 0.77115 --4.54816 -2.92292 8.41254 -0.464662 -0.292785 0.835683 --5.95682 -2.72039 7.5575 -0.579121 -0.264475 0.77115 --4.08589 -3.54044 8.41254 -0.393313 -0.340807 0.853906 --2.92292 -4.54816 8.41254 -0.292785 -0.464662 0.835683 --3.54044 -4.08589 8.41254 -0.355119 -0.407643 0.84126 --2.72039 -5.95682 7.5575 -0.264475 -0.579121 0.77115 -2.92292 -4.54816 8.41254 0.292785 -0.464662 0.835683 -2.72039 -5.95682 7.5575 0.264475 -0.579121 0.77115 -3.54044 -4.08589 8.41254 0.355119 -0.407643 0.84126 -4.54816 -2.92292 8.41254 0.464662 -0.292785 0.835683 -4.08589 -3.54044 8.41254 0.393313 -0.340807 0.853906 -5.95682 -2.72039 7.5575 0.579121 -0.264475 0.77115 -4.91784 2.2459 8.41254 0.483623 0.213308 0.848886 -3.77875 1.7257 9.09632 0.367349 0.17316 0.913822 -3.49469 2.2459 9.09632 0.356647 0.237372 0.90358 -2.2459 4.91784 8.41254 0.213308 0.483623 0.848886 -1.7257 3.77875 9.09632 0.17316 0.367349 0.913822 -2.2459 3.49469 9.09632 0.237372 0.356647 0.90358 --2.2459 4.91784 8.41254 -0.213308 0.483623 0.848886 --1.7257 3.77875 9.09632 -0.17316 0.367349 0.913822 --2.2459 3.49469 9.09632 -0.237372 0.356647 0.90358 --3.77875 1.7257 9.09632 -0.367349 0.17316 0.913822 --3.49469 2.2459 9.09632 -0.356647 0.237372 0.90358 --4.91784 2.2459 8.41254 -0.483623 0.213308 0.848886 --4.91784 -2.2459 8.41254 -0.483623 -0.213308 0.848886 --3.77875 -1.7257 9.09632 -0.367349 -0.17316 0.913822 --3.49469 -2.2459 9.09632 -0.356647 -0.237372 0.90358 --2.2459 -4.91784 8.41254 -0.213308 -0.483623 0.848886 --1.7257 -3.77875 9.09632 -0.17316 -0.367349 0.913822 --2.2459 -3.49469 9.09632 -0.237372 -0.356647 0.90358 -2.2459 -4.91784 8.41254 0.213308 -0.483623 0.848886 -1.7257 -3.77875 9.09632 0.17316 -0.367349 0.913822 -2.2459 -3.49469 9.09632 0.237372 -0.356647 0.90358 -3.77875 -1.7257 9.09632 0.367349 -0.17316 0.913822 -3.49469 -2.2459 9.09632 0.356647 -0.237372 0.90358 -4.91784 -2.2459 8.41254 0.483623 -0.213308 0.848886 -4.11187 0.591198 9.09632 0.389602 0.0560156 0.919278 -2.81733 0 9.59493 0.281727 1.0872e-018 0.959495 -4.15415 0 9.09632 0.436968 0 0.899477 -2.78865 0.400948 9.59493 0.27886 0.0400935 0.959495 -2.70321 0.793732 9.59493 0.28032 0.0800395 0.956564 -3.98588 1.17036 9.09632 0.419268 0.123109 0.899477 -0.591198 4.11187 9.09632 0.0560156 0.389602 0.919278 -0.793732 2.70321 9.59493 0.0800395 0.28032 0.956564 -1.17036 3.98588 9.09632 0.123109 0.419268 0.899477 -0.400948 2.78865 9.59493 0.0400935 0.27886 0.959495 -0 2.81733 9.59493 -1.30464e-018 0.281727 0.959495 -0 4.15415 9.09632 1.15968e-018 0.436968 0.899477 --0.591198 4.11187 9.09632 -0.0560156 0.389602 0.919278 --0.400948 2.78865 9.59493 -0.0400935 0.27886 0.959495 --0.793732 2.70321 9.59493 -0.0800395 0.28032 0.956564 --1.17036 3.98588 9.09632 -0.123109 0.419268 0.899477 --4.11187 0.591198 9.09632 -0.389602 0.0560156 0.919278 --2.70321 0.793732 9.59493 -0.28032 0.0800395 0.956564 --3.98588 1.17036 9.09632 -0.419268 0.123109 0.899477 --2.78865 0.400948 9.59493 -0.27886 0.0400935 0.959495 --2.81733 0 9.59493 -0.281727 -4.34882e-019 0.959495 --4.15415 0 9.09632 -0.436968 0 0.899477 --4.11187 -0.591198 9.09632 -0.389602 -0.0560156 0.919278 --2.78865 -0.400948 9.59493 -0.27886 -0.0400935 0.959495 --2.70321 -0.793732 9.59493 -0.28032 -0.0800395 0.956564 --3.98588 -1.17036 9.09632 -0.419268 -0.123109 0.899477 --0.591198 -4.11187 9.09632 -0.0560156 -0.389602 0.919278 --0.793732 -2.70321 9.59493 -0.0800395 -0.28032 0.956564 --1.17036 -3.98588 9.09632 -0.123109 -0.419268 0.899477 --0.400948 -2.78865 9.59493 -0.0400935 -0.27886 0.959495 -0 -2.81733 9.59493 6.52322e-019 -0.281727 0.959495 -0 -4.15415 9.09632 -1.15968e-018 -0.436968 0.899477 -0.591198 -4.11187 9.09632 0.0560156 -0.389602 0.919278 -0.400948 -2.78865 9.59493 0.0400935 -0.27886 0.959495 -0.793732 -2.70321 9.59493 0.0800395 -0.28032 0.956564 -1.17036 -3.98588 9.09632 0.123109 -0.419268 0.899477 -4.11187 -0.591198 9.09632 0.389602 -0.0560156 0.919278 -2.78865 -0.400948 9.59493 0.27886 -0.0400935 0.959495 -2.70321 -0.793732 9.59493 0.28032 -0.0800395 0.956564 -3.98588 -1.17036 9.09632 0.419268 -0.123109 0.899477 --7.25137 -2.12919 -6.54861 -0.733532 -0.207834 -0.647098 --7.25137 -2.12919 6.54861 -0.733532 -0.207834 0.647098 --6.48195 -0.931965 -7.5575 -0.654909 -0.100366 -0.749014 --7.48057 -1.07554 -6.54861 -0.758827 -0.0975079 -0.643952 --7.5575 0 -6.54861 -0.73992 0 -0.672695 --9.89822 0 -1.42315 -0.989821 1.74349e-018 -0.142319 --10 0 0 -1 0 0 --9.89822 0 1.42315 -0.989821 1.74349e-018 0.142319 --7.48057 -1.07554 6.54861 -0.758827 -0.0975079 0.643952 --7.5575 0 6.54861 -0.73992 -1.16073e-018 0.672695 --6.48195 -0.931965 7.5575 -0.654909 -0.100366 0.749014 --6.48195 0.931965 -7.5575 -0.654909 0.100366 -0.749014 --7.48057 1.07554 -6.54861 -0.758827 0.0975079 -0.643952 --6.54861 0 -7.5575 -0.636654 0 -0.77115 --7.25137 2.12919 -6.54861 -0.733532 0.207834 -0.647098 --7.48057 1.07554 6.54861 -0.758827 0.0975079 0.643952 --7.25137 2.12919 6.54861 -0.733532 0.207834 0.647098 --6.48195 0.931965 7.5575 -0.654909 0.100366 0.749014 --6.54861 0 7.5575 -0.636654 0 0.77115 -7.25137 -2.12919 -6.54861 0.733532 -0.207834 -0.647098 -7.25137 -2.12919 6.54861 0.733532 -0.207834 0.647098 -6.54861 0 -7.5575 0.636654 1.16031e-018 -0.77115 -7.5575 0 -6.54861 0.73992 0 -0.672695 -6.48195 -0.931965 -7.5575 0.654909 -0.100366 -0.749014 -7.48057 -1.07554 -6.54861 0.758827 -0.0975079 -0.643952 -10 0 0 1 0 0 -9.89822 0 -1.42315 0.989821 -1.74349e-018 -0.142319 -9.89822 0 1.42315 0.989821 0 0.142319 -7.48057 -1.07554 6.54861 0.758827 -0.0975079 0.643952 -7.5575 0 6.54861 0.73992 1.16073e-018 0.672695 -6.54861 0 7.5575 0.636654 0 0.77115 -6.48195 -0.931965 7.5575 0.654909 -0.100366 0.749014 -6.48195 0.931965 -7.5575 0.654909 0.100366 -0.749014 -7.48057 1.07554 -6.54861 0.758827 0.0975079 -0.643952 -7.25137 2.12919 -6.54861 0.733532 0.207834 -0.647098 -7.48057 1.07554 6.54861 0.758827 0.0975079 0.643952 -7.25137 2.12919 6.54861 0.733532 0.207834 0.647098 -6.48195 0.931965 7.5575 0.654909 0.100366 0.749014 --2.12919 -7.25137 -6.54861 -0.207834 -0.733532 -0.647098 --2.12919 -7.25137 6.54861 -0.207834 -0.733532 0.647098 --0.931965 -6.48195 -7.5575 -0.100366 -0.654909 -0.749014 -0 -7.5575 -6.54861 -1.16073e-018 -0.73992 -0.672695 --1.07554 -7.48057 -6.54861 -0.0975079 -0.758827 -0.643952 -0 -9.89822 -1.42315 -1.74349e-018 -0.989821 -0.142319 -0 -10 0 0 -1 0 -0 -9.89822 1.42315 -1.74349e-018 -0.989821 0.142319 --1.07554 -7.48057 6.54861 -0.0975079 -0.758827 0.643952 -0 -7.5575 6.54861 0 -0.73992 0.672695 --0.931965 -6.48195 7.5575 -0.100366 -0.654909 0.749014 -0.931965 -6.48195 -7.5575 0.100366 -0.654909 -0.749014 -1.07554 -7.48057 -6.54861 0.0975079 -0.758827 -0.643952 -0 -6.54861 -7.5575 -1.16031e-018 -0.636654 -0.77115 -2.12919 -7.25137 -6.54861 0.207834 -0.733532 -0.647098 -1.07554 -7.48057 6.54861 0.0975079 -0.758827 0.643952 -2.12919 -7.25137 6.54861 0.207834 -0.733532 0.647098 -0.931965 -6.48195 7.5575 0.100366 -0.654909 0.749014 -0 -6.54861 7.5575 1.16031e-018 -0.636654 0.77115 --2.12919 7.25137 -6.54861 -0.207834 0.733532 -0.647098 --2.12919 7.25137 6.54861 -0.207834 0.733532 0.647098 --0.931965 6.48195 -7.5575 -0.100366 0.654909 -0.749014 --1.07554 7.48057 -6.54861 -0.0975079 0.758827 -0.643952 -0 7.5575 -6.54861 1.16073e-018 0.73992 -0.672695 -0 6.54861 -7.5575 0 0.636654 -0.77115 -0 9.89822 -1.42315 1.74349e-018 0.989821 -0.142319 -0 10 0 0 1 0 -0 9.89822 1.42315 1.74349e-018 0.989821 0.142319 --1.07554 7.48057 6.54861 -0.0975079 0.758827 0.643952 -0 7.5575 6.54861 0 0.73992 0.672695 --0.931965 6.48195 7.5575 -0.100366 0.654909 0.749014 -0 6.54861 7.5575 1.16031e-018 0.636654 0.77115 -0.931965 6.48195 -7.5575 0.100366 0.654909 -0.749014 -1.07554 7.48057 -6.54861 0.0975079 0.758827 -0.643952 -2.12919 7.25137 -6.54861 0.207834 0.733532 -0.647098 -1.07554 7.48057 6.54861 0.0975079 0.758827 0.643952 -2.12919 7.25137 6.54861 0.207834 0.733532 0.647098 -0.931965 6.48195 7.5575 0.100366 0.654909 0.749014 --6.28334 -1.84495 -7.5575 -0.635743 -0.197237 -0.746276 --6.28334 1.84495 -7.5575 -0.635743 0.197237 -0.746276 --5.35138 -0.769413 -8.41254 -0.527455 -0.0696372 -0.846724 --5.40641 0 -8.41254 -0.540629 -1.74046e-018 -0.841261 --5.18741 -1.52316 -8.41254 -0.537823 -0.15792 -0.828135 --5.18741 1.52316 -8.41254 -0.537823 0.15792 -0.828135 --5.35138 0.769413 -8.41254 -0.527455 0.0696372 -0.846724 --1.84495 -6.28334 -7.5575 -0.197237 -0.635743 -0.746276 --2.72039 -3.1395 -9.09632 -0.273203 -0.312927 -0.909635 --3.1395 -2.72039 -9.09632 -0.297469 -0.257758 -0.919278 --1.84495 -2.12919 -9.59493 -0.18573 -0.211842 -0.959493 --2.12919 -1.84495 -9.59493 -0.195571 -0.169467 -0.965936 --2.56273 -1.17036 -9.59493 -0.235395 -0.107501 -0.965936 --2.37009 -1.52316 -9.59493 -0.256174 -0.164635 -0.952507 --2.37009 1.52316 -9.59493 -0.256174 0.164635 -0.952507 --3.1395 2.72039 -9.09632 -0.297469 0.257758 -0.919278 --2.12919 1.84495 -9.59493 -0.195571 0.169467 -0.965936 --2.56273 1.17036 -9.59493 -0.235395 0.107501 -0.965936 --2.72039 3.1395 -9.09632 -0.273203 0.312927 -0.909635 --1.84495 2.12919 -9.59493 -0.18573 0.211842 -0.959493 --1.84495 6.28334 -7.5575 -0.197237 0.635743 -0.746276 -0 -5.40641 -8.41254 0 -0.540629 -0.841261 --0.769413 -5.35138 -8.41254 -0.0696372 -0.527455 -0.846724 --1.52316 -5.18741 -8.41254 -0.15792 -0.537823 -0.828135 --1.52316 -2.37009 -9.59493 -0.164635 -0.256174 -0.952507 --1.17036 -2.56273 -9.59493 -0.107501 -0.235395 -0.965936 --1.40866 -0.202534 -9.89822 -0.164175 -0.0236052 -0.986149 --1.42315 0 -9.89822 -0.142311 -2.17408e-019 -0.989822 -0 0 -10 1.10675e-018 1.26486e-018 -1 --1.3655 -0.400948 -9.89822 -0.149257 -0.0470025 -0.987681 --1.29454 -0.591198 -9.89822 -0.129451 -0.0591175 -0.989822 --1.19723 -0.769413 -9.89822 -0.139532 -0.0896732 -0.986149 --1.07554 -0.931965 -9.89822 -0.107551 -0.0931952 -0.989822 --0.931965 -1.07554 -9.89822 -0.10476 -0.116244 -0.98768 --0.769413 -1.19723 -9.89822 -0.0896732 -0.139532 -0.986149 --0.591198 -1.29454 -9.89822 -0.0591175 -0.129451 -0.989822 --0.400948 -1.3655 -9.89822 -0.0470025 -0.149257 -0.987681 --0.202534 -1.40866 -9.89822 -0.0236052 -0.164175 -0.986149 -0 -1.42315 -9.89822 -4.34817e-019 -0.142311 -0.989822 --0.202534 1.40866 -9.89822 -0.0236052 0.164175 -0.986149 -0 1.42315 -9.89822 -2.17408e-019 0.142311 -0.989822 --0.400948 1.3655 -9.89822 -0.0470025 0.149257 -0.987681 --1.17036 2.56273 -9.59493 -0.107501 0.235395 -0.965936 --0.591198 1.29454 -9.89822 -0.0591175 0.129451 -0.989822 --0.769413 1.19723 -9.89822 -0.0896732 0.139532 -0.986149 --1.52316 2.37009 -9.59493 -0.164635 0.256174 -0.952507 --0.931965 1.07554 -9.89822 -0.10476 0.116244 -0.98768 --1.07554 0.931965 -9.89822 -0.107551 0.0931952 -0.989822 --1.19723 0.769413 -9.89822 -0.139532 0.0896732 -0.986149 --1.29454 0.591198 -9.89822 -0.129451 0.0591175 -0.989822 --1.3655 0.400948 -9.89822 -0.149257 0.0470025 -0.987681 --1.40866 0.202534 -9.89822 -0.164175 0.0236052 -0.986149 --0.769413 5.35138 -8.41254 -0.0696372 0.527455 -0.846724 --1.52316 5.18741 -8.41254 -0.15792 0.537823 -0.828135 -0 5.40641 -8.41254 -1.74046e-018 0.540629 -0.841261 -1.84495 -6.28334 -7.5575 0.197237 -0.635743 -0.746276 -1.52316 -5.18741 -8.41254 0.15792 -0.537823 -0.828135 -0.769413 -5.35138 -8.41254 0.0696372 -0.527455 -0.846724 -1.17036 -2.56273 -9.59493 0.107501 -0.235395 -0.965936 -1.52316 -2.37009 -9.59493 0.164635 -0.256174 -0.952507 -1.84495 -2.12919 -9.59493 0.18573 -0.211842 -0.959493 -2.72039 -3.1395 -9.09632 0.273203 -0.312927 -0.909635 -0.202534 -1.40866 -9.89822 0.0236052 -0.164175 -0.986149 -0.400948 -1.3655 -9.89822 0.0470025 -0.149257 -0.987681 -0.591198 -1.29454 -9.89822 0.0591175 -0.129451 -0.989822 -0.769413 -1.19723 -9.89822 0.0896732 -0.139532 -0.986149 -0.931965 -1.07554 -9.89822 0.10476 -0.116244 -0.98768 -2.12919 -1.84495 -9.59493 0.195571 -0.169467 -0.965936 -1.07554 -0.931965 -9.89822 0.107551 -0.0931952 -0.989822 -1.19723 -0.769413 -9.89822 0.139532 -0.0896732 -0.986149 -2.37009 -1.52316 -9.59493 0.256174 -0.164635 -0.952507 -2.56273 -1.17036 -9.59493 0.235395 -0.107501 -0.965936 -1.29454 -0.591198 -9.89822 0.129451 -0.0591175 -0.989822 -1.3655 -0.400948 -9.89822 0.149257 -0.0470025 -0.987681 -1.40866 -0.202534 -9.89822 0.164175 -0.0236052 -0.986149 -1.42315 0 -9.89822 0.142311 0 -0.989822 -0.202534 1.40866 -9.89822 0.0236052 0.164175 -0.986149 -0.400948 1.3655 -9.89822 0.0470025 0.149257 -0.987681 -1.17036 2.56273 -9.59493 0.107501 0.235395 -0.965936 -0.591198 1.29454 -9.89822 0.0591175 0.129451 -0.989822 -0.769413 1.19723 -9.89822 0.0896732 0.139532 -0.986149 -1.52316 2.37009 -9.59493 0.164635 0.256174 -0.952507 -1.84495 2.12919 -9.59493 0.18573 0.211842 -0.959493 -1.40866 0.202534 -9.89822 0.164175 0.0236052 -0.986149 -1.3655 0.400948 -9.89822 0.149257 0.0470025 -0.987681 -1.29454 0.591198 -9.89822 0.129451 0.0591175 -0.989822 -2.56273 1.17036 -9.59493 0.235395 0.107501 -0.965936 -1.19723 0.769413 -9.89822 0.139532 0.0896732 -0.986149 -1.07554 0.931965 -9.89822 0.107551 0.0931952 -0.989822 -2.12919 1.84495 -9.59493 0.195571 0.169467 -0.965936 -2.37009 1.52316 -9.59493 0.256174 0.164635 -0.952507 -0.931965 1.07554 -9.89822 0.10476 0.116244 -0.98768 -2.72039 3.1395 -9.09632 0.273203 0.312927 -0.909635 -1.52316 5.18741 -8.41254 0.15792 0.537823 -0.828135 -0.769413 5.35138 -8.41254 0.0696372 0.527455 -0.846724 -1.84495 6.28334 -7.5575 0.197237 0.635743 -0.746276 -3.1395 -2.72039 -9.09632 0.297469 -0.257758 -0.919278 -5.35138 -0.769413 -8.41254 0.527455 -0.0696372 -0.846724 -5.18741 -1.52316 -8.41254 0.537823 -0.15792 -0.828135 -3.1395 2.72039 -9.09632 0.297469 0.257758 -0.919278 -5.18741 1.52316 -8.41254 0.537823 0.15792 -0.828135 -5.35138 0.769413 -8.41254 0.527455 0.0696372 -0.846724 -5.40641 0 -8.41254 0.540629 0 -0.841261 -6.28334 -1.84495 -7.5575 0.635743 -0.197237 -0.746276 -6.28334 1.84495 -7.5575 0.635743 0.197237 -0.746276 --6.28334 -1.84495 7.5575 -0.635743 -0.197237 0.746276 --6.28334 1.84495 7.5575 -0.635743 0.197237 0.746276 --5.35138 -0.769413 8.41254 -0.527455 -0.0696372 0.846724 --5.40641 0 8.41254 -0.540629 -1.74046e-018 0.841261 --5.18741 -1.52316 8.41254 -0.537823 -0.15792 0.828135 --5.18741 1.52316 8.41254 -0.537823 0.15792 0.828135 --5.35138 0.769413 8.41254 -0.527455 0.0696372 0.846724 --1.84495 -6.28334 7.5575 -0.197237 -0.635743 0.746276 --2.72039 -3.1395 9.09632 -0.273203 -0.312927 0.909635 --3.1395 -2.72039 9.09632 -0.297469 -0.257758 0.919278 --1.84495 -2.12919 9.59493 -0.18573 -0.211842 0.959493 --2.12919 -1.84495 9.59493 -0.195571 -0.169467 0.965936 --2.37009 -1.52316 9.59493 -0.256174 -0.164635 0.952507 --2.56273 -1.17036 9.59493 -0.235395 -0.107501 0.965936 --2.37009 1.52316 9.59493 -0.256174 0.164635 0.952507 --3.1395 2.72039 9.09632 -0.297469 0.257758 0.919278 --2.12919 1.84495 9.59493 -0.195571 0.169467 0.965936 --2.56273 1.17036 9.59493 -0.235395 0.107501 0.965936 --2.72039 3.1395 9.09632 -0.273203 0.312927 0.909635 --1.84495 2.12919 9.59493 -0.18573 0.211842 0.959493 --1.84495 6.28334 7.5575 -0.197237 0.635743 0.746276 --1.52316 -5.18741 8.41254 -0.15792 -0.537823 0.828135 --0.769413 -5.35138 8.41254 -0.0696372 -0.527455 0.846724 -0 -5.40641 8.41254 0 -0.540629 0.841261 --1.52316 -2.37009 9.59493 -0.164635 -0.256174 0.952507 --1.17036 -2.56273 9.59493 -0.107501 -0.235395 0.965936 -0 -1.42315 9.89822 0 -0.142311 0.989822 -0 0 10 -2.03563e-018 -1.58107e-018 1 --0.202534 -1.40866 9.89822 -0.0236052 -0.164175 0.986149 --0.400948 -1.3655 9.89822 -0.0470025 -0.149257 0.987681 --0.591198 -1.29454 9.89822 -0.0591175 -0.129451 0.989822 --0.769413 -1.19723 9.89822 -0.0896732 -0.139532 0.986149 --0.931965 -1.07554 9.89822 -0.10476 -0.116244 0.98768 --1.07554 -0.931965 9.89822 -0.107551 -0.0931952 0.989822 --1.19723 -0.769413 9.89822 -0.139532 -0.0896732 0.986149 --1.29454 -0.591198 9.89822 -0.129451 -0.0591175 0.989822 --1.3655 -0.400948 9.89822 -0.149257 -0.0470025 0.987681 --1.40866 -0.202534 9.89822 -0.164175 -0.0236052 0.986149 --1.42315 0 9.89822 -0.142311 -4.34817e-019 0.989822 --1.40866 0.202534 9.89822 -0.164175 0.0236052 0.986149 --1.3655 0.400948 9.89822 -0.149257 0.0470025 0.987681 --1.29454 0.591198 9.89822 -0.129451 0.0591175 0.989822 --1.19723 0.769413 9.89822 -0.139532 0.0896732 0.986149 --1.07554 0.931965 9.89822 -0.107551 0.0931952 0.989822 --0.931965 1.07554 9.89822 -0.10476 0.116244 0.98768 --0.769413 1.19723 9.89822 -0.0896732 0.139532 0.986149 --0.591198 1.29454 9.89822 -0.0591175 0.129451 0.989822 --0.400948 1.3655 9.89822 -0.0470025 0.149257 0.987681 --0.202534 1.40866 9.89822 -0.0236052 0.164175 0.986149 -0 1.42315 9.89822 -4.34817e-019 0.142311 0.989822 --1.17036 2.56273 9.59493 -0.107501 0.235395 0.965936 --1.52316 2.37009 9.59493 -0.164635 0.256174 0.952507 --1.52316 5.18741 8.41254 -0.15792 0.537823 0.828135 --0.769413 5.35138 8.41254 -0.0696372 0.527455 0.846724 -0 5.40641 8.41254 0 0.540629 0.841261 -1.84495 -6.28334 7.5575 0.197237 -0.635743 0.746276 -0.769413 -5.35138 8.41254 0.0696372 -0.527455 0.846724 -1.52316 -5.18741 8.41254 0.15792 -0.537823 0.828135 -1.17036 -2.56273 9.59493 0.107501 -0.235395 0.965936 -1.52316 -2.37009 9.59493 0.164635 -0.256174 0.952507 -2.72039 -3.1395 9.09632 0.273203 -0.312927 0.909635 -1.84495 -2.12919 9.59493 0.18573 -0.211842 0.959493 -1.42315 0 9.89822 0.142311 -2.17408e-019 0.989822 -1.40866 -0.202534 9.89822 0.164175 -0.0236052 0.986149 -1.3655 -0.400948 9.89822 0.149257 -0.0470025 0.987681 -1.29454 -0.591198 9.89822 0.129451 -0.0591175 0.989822 -1.19723 -0.769413 9.89822 0.139532 -0.0896732 0.986149 -1.07554 -0.931965 9.89822 0.107551 -0.0931952 0.989822 -0.931965 -1.07554 9.89822 0.10476 -0.116244 0.98768 -0.769413 -1.19723 9.89822 0.0896732 -0.139532 0.986149 -0.591198 -1.29454 9.89822 0.0591175 -0.129451 0.989822 -0.400948 -1.3655 9.89822 0.0470025 -0.149257 0.987681 -0.202534 -1.40866 9.89822 0.0236052 -0.164175 0.986149 -2.56273 -1.17036 9.59493 0.235395 -0.107501 0.965936 -2.37009 -1.52316 9.59493 0.256174 -0.164635 0.952507 -2.12919 -1.84495 9.59493 0.195571 -0.169467 0.965936 -1.40866 0.202534 9.89822 0.164175 0.0236052 0.986149 -1.3655 0.400948 9.89822 0.149257 0.0470025 0.987681 -2.56273 1.17036 9.59493 0.235395 0.107501 0.965936 -1.29454 0.591198 9.89822 0.129451 0.0591175 0.989822 -1.19723 0.769413 9.89822 0.139532 0.0896732 0.986149 -2.37009 1.52316 9.59493 0.256174 0.164635 0.952507 -2.12919 1.84495 9.59493 0.195571 0.169467 0.965936 -1.07554 0.931965 9.89822 0.107551 0.0931952 0.989822 -0.931965 1.07554 9.89822 0.10476 0.116244 0.98768 -1.84495 2.12919 9.59493 0.18573 0.211842 0.959493 -1.52316 2.37009 9.59493 0.164635 0.256174 0.952507 -0.769413 1.19723 9.89822 0.0896732 0.139532 0.986149 -0.591198 1.29454 9.89822 0.0591175 0.129451 0.989822 -1.17036 2.56273 9.59493 0.107501 0.235395 0.965936 -0.400948 1.3655 9.89822 0.0470025 0.149257 0.987681 -0.202534 1.40866 9.89822 0.0236052 0.164175 0.986149 -2.72039 3.1395 9.09632 0.273203 0.312927 0.909635 -1.52316 5.18741 8.41254 0.15792 0.537823 0.828135 -0.769413 5.35138 8.41254 0.0696372 0.527455 0.846724 -1.84495 6.28334 7.5575 0.197237 0.635743 0.746276 -3.1395 -2.72039 9.09632 0.297469 -0.257758 0.919278 -5.18741 -1.52316 8.41254 0.537823 -0.15792 0.828135 -5.35138 -0.769413 8.41254 0.527455 -0.0696372 0.846724 -3.1395 2.72039 9.09632 0.297469 0.257758 0.919278 -5.18741 1.52316 8.41254 0.537823 0.15792 0.828135 -5.35138 0.769413 8.41254 0.527455 0.0696372 0.846724 -5.40641 0 8.41254 0.540629 -1.74046e-018 0.841261 -6.28334 -1.84495 7.5575 0.635743 -0.197237 0.746276 -6.28334 1.84495 7.5575 0.635743 0.197237 0.746276 diff -Nru cgal-4.7/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd cgal-4.8/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd --- cgal-4.7/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_reconstruction_points_3/poisson_reconstruction.cmd 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -data/kitten.xyz kitten_poisson-20-100-0.5.off -sm_distance 0.5 diff -Nru cgal-4.7/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp cgal-4.8/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp --- cgal-4.7/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Surface_reconstruction_points_3/poisson_reconstruction.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,394 +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 // must be included before kernel -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -// ---------------------------------------------------------------------------- -// 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 Point_with_normal; -typedef Kernel::Sphere_3 Sphere; -typedef std::deque PointList; - -// polyhedron -typedef CGAL::Polyhedron_3 Polyhedron; - -// Poisson implicit function -typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; - -// Surface mesher -typedef CGAL::Surface_mesh_default_triangulation_3 STr; -typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; -typedef CGAL::Poisson_implicit_surface_3 Surface_3; - -// AABB tree -typedef CGAL::AABB_face_graph_triangle_primitive Primitive; -typedef CGAL::AABB_traits AABB_traits; -typedef CGAL::AABB_tree 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 Radius upper bound (default=100 * average spacing)\n"; - std::cerr << " -sm_distance 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::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 - 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::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 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=("< -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -// Types -typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; -typedef Kernel::FT FT; -typedef Kernel::Point_3 Point; -typedef CGAL::Point_with_normal_3 Point_with_normal; -typedef Kernel::Sphere_3 Sphere; -typedef std::vector PointList; -typedef CGAL::Polyhedron_3 Polyhedron; -typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; -typedef CGAL::Surface_mesh_default_triangulation_3 STr; -typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; -typedef CGAL::Implicit_surface_3 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 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 -Nru cgal-4.7/examples/Sweep_line_2/CMakeLists.txt cgal-4.8/examples/Sweep_line_2/CMakeLists.txt --- cgal-4.7/examples/Sweep_line_2/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Sweep_line_2/CMakeLists.txt 2016-04-04 19:00:13.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/Sweep_line_2/sweep_line.cpp cgal-4.8/examples/Sweep_line_2/sweep_line.cpp --- cgal-4.7/examples/Sweep_line_2/sweep_line.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/Sweep_line_2/sweep_line.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,47 @@ +//! \file examples/Arrangement_on_surface_2/sweep_line.cpp +// Computing intersection points among curves using the sweep line. + +#include +#include +#include +#include +#include +#include + +typedef CGAL::Quotient NT; +typedef CGAL::Cartesian Kernel; +typedef Kernel::Point_2 Point_2; +typedef CGAL::Arr_segment_traits_2 Traits_2; +typedef Traits_2::Curve_2 Segment_2; + +int main() +{ + // Construct the input segments. + Segment_2 segments[] = {Segment_2 (Point_2 (1, 5), Point_2 (8, 5)), + Segment_2 (Point_2 (1, 1), Point_2 (8, 8)), + Segment_2 (Point_2 (3, 1), Point_2 (3, 8)), + Segment_2 (Point_2 (8, 5), Point_2 (8, 8))}; + + // Compute all intersection points. + std::list pts; + + CGAL::compute_intersection_points (segments, segments + 4, + std::back_inserter (pts)); + + // Print the result. + std::cout << "Found " << pts.size() << " intersection points: " << std::endl; + std::copy (pts.begin(), pts.end(), + std::ostream_iterator(std::cout, "\n")); + + // Compute the non-intersecting sub-segments induced by the input segments. + std::list sub_segs; + + CGAL::compute_subcurves(segments, segments + 4, std::back_inserter(sub_segs)); + + std::cout << "Found " << sub_segs.size() + << " interior-disjoint sub-segments." << std::endl; + + CGAL_assertion (CGAL::do_curves_intersect (segments, segments + 4)); + + return 0; +} diff -Nru cgal-4.7/examples/TDS_3/CMakeLists.txt cgal-4.8/examples/TDS_3/CMakeLists.txt --- cgal-4.7/examples/TDS_3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/TDS_3/CMakeLists.txt 2016-04-04 19:00:36.000000000 +0000 @@ -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 -Nru cgal-4.7/examples/TDS_3/linking_2d_and_3d.cpp cgal-4.8/examples/TDS_3/linking_2d_and_3d.cpp --- cgal-4.7/examples/TDS_3/linking_2d_and_3d.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/TDS_3/linking_2d_and_3d.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,82 @@ +#include +#include +#include + +// declare the 2D vertex base type, parametrized by some 3D TDS. +template < typename T3, typename Vb = CGAL::Triangulation_ds_vertex_base_2<> > +class My_vertex_2; + +// declare the 3D vertex base type, parametrized by some 2D TDS. +template < typename T2, typename Vb = CGAL::Triangulation_ds_vertex_base_3<> > +class My_vertex_3; + +// Then, we have to break the dependency cycle. + +// we need to refer to a dummy 3D TDS. +typedef CGAL::Triangulation_ds_vertex_base_3<>::Triangulation_data_structure + Dummy_tds_3; +// the 2D TDS, initially plugging a dummy 3D TDS in the vertex type +// (to break the dependency cycle). +typedef CGAL::Triangulation_data_structure_2 > TDS_2; +// the 3D TDS, here we can plug the 2D TDS directly. +typedef CGAL::Triangulation_data_structure_3 > TDS_3; + + +template < typename T3, typename Vb > +class My_vertex_2 + : public Vb +{ +public: + typedef typename Vb::Face_handle Face_handle; + + template + struct Rebind_TDS { + typedef typename Vb::template Rebind_TDS::Other Vb2; + // we also have to break the cycle here by hardcoding TDS_3 instead of T3. + typedef My_vertex_2 Other; + }; + + My_vertex_2() {} + + My_vertex_2(Face_handle f) : Vb(f) {} + + // we store a vertex handle of the 3D TDS. + typename T3::Vertex_handle v3; +}; + +template < typename T2, typename Vb > +class My_vertex_3 + : public Vb +{ +public: + typedef typename Vb::Cell_handle Cell_handle; + + template + struct Rebind_TDS { + typedef typename Vb::template Rebind_TDS::Other Vb2; + typedef My_vertex_3 Other; + }; + + My_vertex_3() {} + + My_vertex_3(Cell_handle c) : Vb(c) {} + + // we store a vertex handle of the 2D TDS. + typename T2::Vertex_handle v2; +}; + + +int main() { + TDS_2 t2; + TDS_3 t3; + + TDS_2::Vertex_handle v2 = t2.insert_dim_up(); + TDS_3::Vertex_handle v3 = t3.insert_increase_dimension(); + + v2->v3 = v3; + v3->v2 = v2; + + assert(t2.is_valid()); + assert(t3.is_valid()); + return 0; +} diff -Nru cgal-4.7/examples/TDS_3/tds.cpp cgal-4.8/examples/TDS_3/tds.cpp --- cgal-4.7/examples/TDS_3/tds.cpp 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/examples/TDS_3/tds.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include + +typedef CGAL::Triangulation_data_structure_3<> Tds; + +typedef Tds::size_type size_type; +typedef Tds::Cell_handle Cell_handle; +typedef Tds::Vertex_handle Vertex_handle; + +int main() +{ + Tds T; + + assert( T.number_of_vertices() == 0 ); + assert( T.dimension() == -2 ); + assert( T.is_valid() ); + + std::vector PV(7); + + PV[0] = T.insert_increase_dimension(); + assert( T.number_of_vertices() == 1 ); + assert( T.dimension() == -1 ); + assert( T.is_valid() ); + + // each of the following insertions of vertices increases the dimension + for ( int i=1; i<5; i++ ) { + PV[i] = T.insert_increase_dimension(PV[0]); + assert( T.number_of_vertices() == (size_type) i+1 ); + assert( T.dimension() == i-1 ); + assert( T.is_valid() ); + } + assert( T.number_of_cells() == 5 ); + + // we now have a simplex in dimension 4 + + // cell incident to PV[0] + Cell_handle c = PV[0]->cell(); + int ind; + bool check = c->has_vertex( PV[0], ind ); + assert( check ); + // PV[0] is the vertex of index ind in c + + // insertion of a new vertex in the facet opposite to PV[0] + PV[5] = T.insert_in_facet(c, ind); + + assert( T.number_of_vertices() == 6 ); + assert( T.dimension() == 3 ); + assert( T.is_valid() ); + + // insertion of a new vertex in c + PV[6] = T.insert_in_cell(c); + + assert( T.number_of_vertices() == 7 ); + assert( T.dimension() == 3 ); + assert( T.is_valid() ); + + std::ofstream oFileT("output_tds",std::ios::out); + // writing file output_tds; + oFileT << T; + + return 0; +} diff -Nru cgal-4.7/examples/Triangulation/delaunay_triangulation.cpp cgal-4.8/examples/Triangulation/delaunay_triangulation.cpp --- cgal-4.7/examples/Triangulation/delaunay_triangulation.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation/delaunay_triangulation.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -1,3 +1,13 @@ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ <= 4) && (__GNUC_MINOR__ < 4) + +#include +int main() +{ + std::cerr << "NOTICE: This test requires G++ >= 4.4, and will not be compiled." << std::endl; +} + +#else + #include #include #include @@ -64,3 +74,5 @@ std::cout << " done in "< +int main() +{ + std::cerr << "NOTICE: This test requires G++ >= 4.4, and will not be compiled." << std::endl; +} + +#else + #include #include #include @@ -39,3 +49,5 @@ return 0; } + +#endif diff -Nru cgal-4.7/examples/Triangulation_3/CMakeLists.txt cgal-4.8/examples/Triangulation_3/CMakeLists.txt --- cgal-4.7/examples/Triangulation_3/CMakeLists.txt 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation_3/CMakeLists.txt 2016-04-04 19:00:13.000000000 +0000 @@ -26,20 +26,19 @@ 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( "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( "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" ) - create_single_source_cgal_program( "tds.cpp" ) else() diff -Nru cgal-4.7/examples/Triangulation_3/fast_location_3.cpp cgal-4.8/examples/Triangulation_3/fast_location_3.cpp --- cgal-4.7/examples/Triangulation_3/fast_location_3.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation_3/fast_location_3.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -27,9 +27,9 @@ // 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))); + 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 -Nru cgal-4.7/examples/Triangulation_3/linking_2d_and_3d.cpp cgal-4.8/examples/Triangulation_3/linking_2d_and_3d.cpp --- cgal-4.7/examples/Triangulation_3/linking_2d_and_3d.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation_3/linking_2d_and_3d.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -#include -#include -#include - -// declare the 2D vertex base type, parametrized by some 3D TDS. -template < typename T3, typename Vb = CGAL::Triangulation_ds_vertex_base_2<> > -class My_vertex_2; - -// declare the 3D vertex base type, parametrized by some 2D TDS. -template < typename T2, typename Vb = CGAL::Triangulation_ds_vertex_base_3<> > -class My_vertex_3; - -// Then, we have to break the dependency cycle. - -// we need to refer to a dummy 3D TDS. -typedef CGAL::Triangulation_ds_vertex_base_3<>::Triangulation_data_structure - Dummy_tds_3; -// the 2D TDS, initially plugging a dummy 3D TDS in the vertex type -// (to break the dependency cycle). -typedef CGAL::Triangulation_data_structure_2 > TDS_2; -// the 3D TDS, here we can plug the 2D TDS directly. -typedef CGAL::Triangulation_data_structure_3 > TDS_3; - - -template < typename T3, typename Vb > -class My_vertex_2 - : public Vb -{ -public: - typedef typename Vb::Face_handle Face_handle; - - template - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - // we also have to break the cycle here by hardcoding TDS_3 instead of T3. - typedef My_vertex_2 Other; - }; - - My_vertex_2() {} - - My_vertex_2(Face_handle f) : Vb(f) {} - - // we store a vertex handle of the 3D TDS. - typename T3::Vertex_handle v3; -}; - -template < typename T2, typename Vb > -class My_vertex_3 - : public Vb -{ -public: - typedef typename Vb::Cell_handle Cell_handle; - - template - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef My_vertex_3 Other; - }; - - My_vertex_3() {} - - My_vertex_3(Cell_handle c) : Vb(c) {} - - // we store a vertex handle of the 2D TDS. - typename T2::Vertex_handle v2; -}; - - -int main() { - TDS_2 t2; - TDS_3 t3; - - TDS_2::Vertex_handle v2 = t2.insert_dim_up(); - TDS_3::Vertex_handle v3 = t3.insert_increase_dimension(); - - v2->v3 = v3; - v3->v2 = v2; - - assert(t2.is_valid()); - assert(t3.is_valid()); - return 0; -} diff -Nru cgal-4.7/examples/Triangulation_3/sequential_parallel.cpp cgal-4.8/examples/Triangulation_3/sequential_parallel.cpp --- cgal-4.7/examples/Triangulation_3/sequential_parallel.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation_3/sequential_parallel.cpp 2016-04-04 19:00:13.000000000 +0000 @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include @@ -9,7 +9,6 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_3 Point; -typedef CGAL::Timer Timer; const int NUM_INSERTED_POINTS = 10000; @@ -27,7 +26,7 @@ // Sequential Delaunay T3 typedef CGAL::Delaunay_triangulation_3 SequentialTriangulation; - Timer t; + CGAL::Real_timer t; t.start(); SequentialTriangulation S(V.begin(), V.end()); t.stop(); diff -Nru cgal-4.7/examples/Triangulation_3/tds.cpp cgal-4.8/examples/Triangulation_3/tds.cpp --- cgal-4.7/examples/Triangulation_3/tds.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/examples/Triangulation_3/tds.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -#include -#include -#include -#include -#include - -typedef CGAL::Triangulation_data_structure_3<> Tds; - -typedef Tds::size_type size_type; -typedef Tds::Cell_handle Cell_handle; -typedef Tds::Vertex_handle Vertex_handle; - -int main() -{ - Tds T; - - assert( T.number_of_vertices() == 0 ); - assert( T.dimension() == -2 ); - assert( T.is_valid() ); - - std::vector PV(7); - - PV[0] = T.insert_increase_dimension(); - assert( T.number_of_vertices() == 1 ); - assert( T.dimension() == -1 ); - assert( T.is_valid() ); - - // each of the following insertions of vertices increases the dimension - for ( int i=1; i<5; i++ ) { - PV[i] = T.insert_increase_dimension(PV[0]); - assert( T.number_of_vertices() == (size_type) i+1 ); - assert( T.dimension() == i-1 ); - assert( T.is_valid() ); - } - assert( T.number_of_cells() == 5 ); - - // we now have a simplex in dimension 4 - - // cell incident to PV[0] - Cell_handle c = PV[0]->cell(); - int ind; - bool check = c->has_vertex( PV[0], ind ); - assert( check ); - // PV[0] is the vertex of index ind in c - - // insertion of a new vertex in the facet opposite to PV[0] - PV[5] = T.insert_in_facet(c, ind); - - assert( T.number_of_vertices() == 6 ); - assert( T.dimension() == 3 ); - assert( T.is_valid() ); - - // insertion of a new vertex in c - PV[6] = T.insert_in_cell(c); - - assert( T.number_of_vertices() == 7 ); - assert( T.dimension() == 3 ); - assert( T.is_valid() ); - - std::ofstream oFileT("output_tds",std::ios::out); - // writing file output_tds; - oFileT << T; - - return 0; -} diff -Nru cgal-4.7/include/CGAL/AABB_C3T3_triangle_primitive.h cgal-4.8/include/CGAL/AABB_C3T3_triangle_primitive.h --- cgal-4.7/include/CGAL/AABB_C3T3_triangle_primitive.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/AABB_C3T3_triangle_primitive.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include + +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 + 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 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 + AABB_C3T3_triangle_primitive( Iterator it, + typename boost::enable_if< + boost::is_same + >::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 -Nru cgal-4.7/include/CGAL/AABB_tree.h cgal-4.8/include/CGAL/AABB_tree.h --- cgal-4.7/include/CGAL/AABB_tree.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/AABB_tree.h 2016-04-04 19:00:11.000000000 +0000 @@ -31,7 +31,7 @@ #include #ifdef CGAL_HAS_THREADS -#include +#include #endif /// \file AABB_tree.h @@ -500,7 +500,7 @@ { #ifdef CGAL_HAS_THREADS //this ensures that this is done once at a time - boost::mutex::scoped_lock scoped_lock(kd_tree_mutex); + CGAL_SCOPED_LOCK(kd_tree_mutex); #endif clear_search_tree(); return accelerate_distance_queries_impl(first,beyond); @@ -599,8 +599,8 @@ // 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 + 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 { @@ -608,7 +608,7 @@ 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); + CGAL_SCOPED_LOCK(internal_tree_mutex); if(m_need_build) #endif const_cast< AABB_tree* >(this)->build(); @@ -1046,7 +1046,7 @@ 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); + CGAL_SCOPED_LOCK(kd_tree_mutex); #endif //we only redo computation only if needed diff -Nru cgal-4.7/include/CGAL/Advancing_front_surface_reconstruction.h cgal-4.8/include/CGAL/Advancing_front_surface_reconstruction.h --- cgal-4.7/include/CGAL/Advancing_front_surface_reconstruction.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Advancing_front_surface_reconstruction.h 2016-04-04 19:00:11.000000000 +0000 @@ -157,15 +157,15 @@ }; namespace AFSR{ - struct Always_false { - - template - bool operator()(const T&, const T&, const T&) const + struct Default_priority { + template + double operator() (const AdvancingFront& adv, Cell_handle& c, + const int& index) const { - return false; + return adv.smallest_radius_delaunay_sphere (c, index); } }; - } //end of namespa AFSR + } //end of namespace AFSR /*! @@ -182,19 +182,20 @@ `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 F must be a functor with `bool operator()(Point,Point,Point)` returning `true` if a triangle should not appear in the output. - This functor enables the user to filter candidate triangles, for example based on its size. - The type `Point` must be the point type of the geometric traits class of the triangulation. - It defaults to a functor that always returns `false`. + \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 F = Default> + class P = Default> class Advancing_front_surface_reconstruction { typedef typename Default::Get, Advancing_front_surface_reconstruction_cell_base_3 > > >::type Triangulation; - typedef typename Default::Get::type Filter; + typedef typename Default::Get::type Priority; public: #ifdef DOXYGEN_RUNNING @@ -220,9 +221,9 @@ typedef unspecified_type Triangulation_3; /*! - The type of the triangle filter functor. + The type of the facet priority functor. */ - typedef unspecified_type Filter; + typedef unspecified_type Priority; /*! The point type. @@ -267,7 +268,7 @@ typedef Triangulation Triangulation_3; typedef typename Triangulation_3::Geom_traits Kernel; - typedef Advancing_front_surface_reconstruction Extract; + typedef Advancing_front_surface_reconstruction Extract; typedef typename Triangulation_3::Geom_traits Geom_traits; typedef typename Kernel::FT coord_type; @@ -369,7 +370,7 @@ Vertex_handle added_vertex; bool deal_with_2d; - Filter filter; + Priority priority; int max_connected_component; double K_init, K_step; std::list interior_edges; @@ -660,15 +661,15 @@ Constructor for the unstructured point cloud given as 3D Delaunay triangulation. */ Advancing_front_surface_reconstruction(Triangulation_3& dt, - Filter filter = Filter()) + Priority priority = Priority()) : T(dt), _number_of_border(1), COS_ALPHA_SLIVER(-0.86), - NB_BORDER_MAX(15), DELTA(.86), min_K(HUGE_VAL), + 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(T.number_of_vertices())), _facet_number(0), _postprocessing_counter(0), _size_before_postprocessing(0), _number_of_connected_components(0), - deal_with_2d(false), filter(filter), max_connected_component(-1), K_init(1.1), K_step(.1) + deal_with_2d(false), priority(priority), max_connected_component(-1), K_init(1.1), K_step(.1) { if(T.dimension() == 2){ @@ -1173,6 +1174,21 @@ //===================================================================== + + + /// \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 @@ -1183,7 +1199,7 @@ || (c->vertex((index+2) & 3) == added_vertex) || (c->vertex((index+3) & 3) == added_vertex) )) { - return HUGE_VAL; + return infinity(); } Cell_handle n = c->neighbor(index); // lazy evaluation ... @@ -1210,7 +1226,7 @@ (c_is_plane && n_is_infinite)|| (n_is_plane && c_is_infinite)|| my_collinear(cp1, cp2, cp3)) - value = HUGE_VAL; + value = infinity(); else { if (c_is_infinite||n_is_infinite||c_is_plane||n_is_plane) @@ -1287,6 +1303,12 @@ return value; } + /*! + + returns the infinite floating value that prevents a facet to be used. + */ + coord_type infinity() const { return std::numeric_limits::infinity(); } + /// @} //--------------------------------------------------------------------- // For a border edge e we determine the incident facet which has the highest @@ -1300,10 +1322,10 @@ int i1 = e.first.second, i2 = e.first.third; int i3 = 6 - e.second - i1 - i2; - Edge_incident_facet e_it = e, predone = previous(e); - Cell_handle c_predone = predone.first.first; + Edge_incident_facet e_it = e; - coord_type min_valueP = NOT_VALID_CANDIDATE, min_valueA = HUGE_VAL; + coord_type min_valueP = NOT_VALID_CANDIDATE, + min_valueA = infinity(); Facet min_facet, min_facetA; bool border_facet(false); @@ -1320,7 +1342,6 @@ coord_type norm12 = P2P1*P2P1; e_it = next(e_it); - bool succ_start(true); do { @@ -1336,24 +1357,12 @@ coord_type tmp=0; - // If the triangle has a high perimeter, - // we do not want to consider it as a good candidate. - - if(filter(facet_it.first->vertex(n_i1)->point(), - facet_it.first->vertex(n_i2)->point(), - facet_it.first->vertex(n_i3)->point())){ - tmp = HUGE_VAL; - } - - - if(tmp != HUGE_VAL){ - tmp = smallest_radius_delaunay_sphere(neigh, n_ind); - } + 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 != HUGE_VAL)&& + if ((tmp != infinity())&& neigh->vertex(n_i3)->not_interior()&& (!is_interior_edge(el1))&&(!is_interior_edge(el2))) { @@ -1367,10 +1376,7 @@ norm = sqrt(norm1 * (v2*v2)); pscal = v1*v2; // check if the triangle will produce a sliver on the surface - bool sliver_facet = ((succ_start || (neigh == c_predone))&& - (pscal <= COS_ALPHA_SLIVER*norm)); - - if (succ_start) succ_start = false; + bool sliver_facet = (pscal <= COS_ALPHA_SLIVER*norm); if (!sliver_facet) { @@ -1401,7 +1407,7 @@ criteria value; - if ((min_valueA == HUGE_VAL) || border_facet) // bad facets case + 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 @@ -1424,7 +1430,7 @@ else { //on refuse une trop grande non-uniformite - coord_type tmp = smallest_radius_delaunay_sphere(c, i); + coord_type tmp = priority (*this, c, i); if (min_valueA <= K * tmp) value = - min_valueP; else @@ -1455,7 +1461,7 @@ { init_timer.start(); Facet min_facet; - coord_type min_value = HUGE_VAL; + coord_type min_value = infinity(); int i1, i2, i3; if (!re_init){ @@ -1464,8 +1470,8 @@ facet_it != end; ++facet_it) { - coord_type value = smallest_radius_delaunay_sphere((*facet_it).first, - (*facet_it).second); + coord_type value = priority (*this, (*facet_it).first, + (*facet_it).second); if (value < min_value) { min_facet = *facet_it; @@ -1484,12 +1490,10 @@ if (c->vertex((index+2) & 3)->is_exterior()) if (c->vertex((index+3) & 3)->is_exterior()) { - coord_type value = smallest_radius_delaunay_sphere(c, index); + coord_type value = priority (*this, c, index); // we might not want the triangle, for example because it is too large - if(filter(c->vertex((index+1)&3)->point(), - c->vertex((index+2)&3)->point(), - c->vertex((index+3)&3)->point())){ + if(value == infinity()){ value = min_value; } @@ -1502,7 +1506,7 @@ } } - if (min_value != HUGE_VAL) + if (min_value != infinity()) { Cell_handle c_min = min_facet.first; @@ -1565,7 +1569,7 @@ if (v1*v2 > COS_BETA*norm) return 1; // label bonne pliure sinon: - if (ear_alpha <= K*smallest_radius_delaunay_sphere(neigh, n_ind)) + if (ear_alpha <= K * priority(*this, neigh, n_ind)) return 2; // label alpha coherent... return 0; //sinon oreille a rejeter... @@ -1778,7 +1782,7 @@ v1, v2, c->vertex(i), e1, e2, p1, p2); - // if e1 contain HUGE_VAL there is no candidates to + // if e1 contain infinity there is no candidates to // continue: compute_value is not valid... _ordered_border.insert(Radius_ptr_type(e1.first, p1)); @@ -1847,16 +1851,14 @@ (result12.second==result_ear1.second)) { ear1_valid = test_merge(ear1_e, result_ear1, v1, - smallest_radius_delaunay_sphere(ear1_c, - ear1.second)) != 0; + 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, - smallest_radius_delaunay_sphere(ear2_c, - ear2.second)) != 0; + priority(*this, ear2_c, ear2.second)) != 0; } if ((!ear1_valid)&&(!ear2_valid)) return NOT_VALID_CONNECTING_CASE; @@ -1994,7 +1996,7 @@ } do { - min_K = HUGE_VAL; // pour retenir le prochain K necessaire pour progresser... + min_K = infinity(); // pour retenir le prochain K necessaire pour progresser... do { @@ -2056,10 +2058,10 @@ // on augmente progressivement le K mais on a deja rempli sans // faire des betises auparavant... } - while((!_ordered_border.empty())&&(K <= K)&&(min_K != HUGE_VAL)); + while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())); #ifdef VERBOSE - if ((min_K < HUGE_VAL)&&(!_ordered_border.empty())) { + if ((min_K < infinity())&&(!_ordered_border.empty())) { std::cout << " [ next K required = " << min_K << " ]" << std::endl; } #endif // VERBOSE @@ -2420,7 +2422,7 @@ return false; } - min_K = HUGE_VAL; + min_K = infinity(); // fin-- // if (_postprocessing_counter < 5) // return true; @@ -2433,21 +2435,21 @@ namespace AFSR { template - struct Auto_count : public std::unary_function >{ - mutable int i; + struct Auto_count : public std::unary_function >{ + mutable std::size_t i; Auto_count() : i(0) {} - std::pair operator()(const T& p) const { + std::pair operator()(const T& p) const { return std::make_pair(p,i++); } }; template - struct Auto_count_cc : public std::unary_function >{ - mutable int i; + struct Auto_count_cc : public std::unary_function >{ + mutable std::size_t i; CC cc; Auto_count_cc(CC cc) @@ -2455,7 +2457,7 @@ {} template - std::pair operator()(const T2& p) const { + std::pair operator()(const T2& p) const { return std::make_pair(cc(p),i++); } }; @@ -2523,7 +2525,8 @@ 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` can be assigned. - \tparam Filter must be a functor with `bool operator()(Point,Point,Point)` where Point is `Exact_predicates_inexact_constructions_kernel::Point_3`. + \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 @@ -2533,15 +2536,15 @@ 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 filter allows the user to filter candidate triangles, for example based on their size. + \param priority allows the user to choose how candidate triangles are prioritized. */ - template + template IndicesOutputIterator advancing_front_surface_reconstruction(PointInputIterator b, PointInputIterator e, IndicesOutputIterator out, - Filter filter, + Priority priority, double radius_ratio_bound = 5, double beta = 0.52 ) { @@ -2552,7 +2555,7 @@ typedef Triangulation_data_structure_3 Tds; typedef Delaunay_triangulation_3 Triangulation_3; - typedef Advancing_front_surface_reconstruction Reconstruction; + typedef Advancing_front_surface_reconstruction Reconstruction; typedef typename std::iterator_traits::value_type InputPoint; typedef typename Kernel_traits::Kernel InputKernel; typedef Cartesian_converter CC; @@ -2562,19 +2565,19 @@ Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc(cc)), boost::make_transform_iterator(e, AFSR::Auto_count_cc(cc) ) ); - Reconstruction R(dt, filter); + Reconstruction R(dt, priority); R.run(radius_ratio_bound, beta); write_triple_indices(out, R); return out; } - template class HDS, typename Alloc,typename Filter> + template class HDS, typename Alloc,typename Priority> void advancing_front_surface_reconstruction(PointInputIterator b, PointInputIterator e, Polyhedron_3& polyhedron, - Filter filter, + Priority priority, double radius_ratio_bound = 5, double beta = 0.52) { @@ -2584,7 +2587,7 @@ typedef Triangulation_data_structure_3 Tds; typedef Delaunay_triangulation_3 Triangulation_3; - typedef Advancing_front_surface_reconstruction Reconstruction; + typedef Advancing_front_surface_reconstruction Reconstruction; typedef typename std::iterator_traits::value_type InputPoint; typedef typename Kernel_traits::Kernel InputKernel; typedef Cartesian_converter CC; @@ -2594,7 +2597,7 @@ Triangulation_3 dt( boost::make_transform_iterator(b, AFSR::Auto_count_cc(cc)), boost::make_transform_iterator(e, AFSR::Auto_count_cc(cc) ) ); - Reconstruction R(dt, filter); + Reconstruction R(dt, priority); R.run(radius_ratio_bound, beta); AFSR::construct_polyhedron(polyhedron, R); } diff -Nru cgal-4.7/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h cgal-4.8/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h --- cgal-4.7/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -91,10 +91,10 @@ //-------------------- DATA MEMBERS --------------------------------- - typedef int Info; // so that we are a model of TriangulationVertexBaseWithInfo_3 + typedef std::size_t Info; // so that we are a model of TriangulationVertexBaseWithInfo_3 private: - int m_id; + std::size_t m_id; int m_mark; int m_post_mark; Intern_successors_type* m_incident_border; @@ -144,22 +144,22 @@ public: - int& id() + std::size_t& id() { return m_id; } - const int& id() const + const std::size_t& id() const { return m_id; } - int& info() + std::size_t& info() { return m_id; } - const int& info() const + const std::size_t& info() const { return m_id; } diff -Nru cgal-4.7/include/CGAL/aff_transformation_tags.h cgal-4.8/include/CGAL/aff_transformation_tags.h --- cgal-4.7/include/CGAL/aff_transformation_tags.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/aff_transformation_tags.h 2016-04-04 19:00:11.000000000 +0000 @@ -36,12 +36,19 @@ 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; +#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 +#endif // CGAL_HEADER_ONLY #endif // CGAL_AFF_TRANSFORMATION_TAGS_H diff -Nru cgal-4.7/include/CGAL/aff_transformation_tags_impl.h cgal-4.8/include/CGAL/aff_transformation_tags_impl.h --- cgal-4.7/include/CGAL/aff_transformation_tags_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/aff_transformation_tags_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/Apollonius_site_2.h cgal-4.8/include/CGAL/Apollonius_site_2.h --- cgal-4.7/include/CGAL/Apollonius_site_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Apollonius_site_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -75,8 +75,8 @@ std::istream& operator>>(std::istream& is, Apollonius_site_2& wp) { - typename Apollonius_site_2::Weight weight; - typename Apollonius_site_2::Point_2 p; + typename Apollonius_site_2::Weight weight (0.); + typename Apollonius_site_2::Point_2 p (0., 0.); is >> p >> weight; if(is) { wp = Apollonius_site_2(p, weight); diff -Nru cgal-4.7/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h cgal-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h --- cgal-4.7/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -18,8 +18,8 @@ // // Author(s) : Kaspar Fischer -#include -#include + +#include #include @@ -150,34 +150,32 @@ { CGAL_APPEL_ASSERT(d==2); - typedef Simple_cartesian K; - typedef Vector_2 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 eigenvectors; // Note: not neces. normalized. - std::pair eigenvalues; // Note: sorted descendent. - internal::eigen_symmetric_2(matrix, eigenvectors, eigenvalues); + const CGAL::cpp11::array matrix = {{ E->matrix(0, 0), // a + E->matrix(0, 1), // b + E->matrix(1, 1) }}; // c + CGAL::cpp11::array eigenvectors; // Note: not neces. normalized. + CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (matrix, eigenvalues, eigenvectors); // 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()); + 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.first)); - lengths_.push_back(std::sqrt(factor/eigenvalues.second)); + 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.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); + 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 @@ -192,16 +190,18 @@ // 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(matrix, 3, eigenvectors, eigenvalues); + const CGAL::cpp11::array 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 eigenvectors; // Note: not necessarily normalized. + CGAL::cpp11::array eigenvalues; // Note: sorted ascendent. + + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (matrix, eigenvalues, eigenvectors); // normalize eigenvectors: double l1 = 1.0/std::sqrt(eigenvectors[0] * eigenvectors[0]+ // x^2 @@ -220,15 +220,15 @@ // 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_[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[6]*l3); - directions_[2].push_back(eigenvectors[7]*l3); - directions_[2].push_back(eigenvectors[8]*l3); + directions_[2].push_back(eigenvectors[0]*l1); + directions_[2].push_back(eigenvectors[1]*l1); + directions_[2].push_back(eigenvectors[2]*l1); } template diff -Nru cgal-4.7/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h cgal-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h --- cgal-4.7/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -28,6 +28,7 @@ #include #include +#include #include namespace CGAL { @@ -366,7 +367,7 @@ CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || tau == eps/((1+eps)*d-1)); CGAL_APPEL_ASSERT(!check_tag(Exact_flag()) || excess(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); diff -Nru cgal-4.7/include/CGAL/Arr_accessor.h cgal-4.8/include/CGAL/Arr_accessor.h --- cgal-4.7/include/CGAL/Arr_accessor.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_accessor.h 2016-04-04 19:00:11.000000000 +0000 @@ -862,6 +862,80 @@ { return (p_arr->_dcel().new_isolated_vertex()); } /*! + * Remove a range of vertices + */ + template + 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 + 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 + 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 + 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 + 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(); } diff -Nru cgal-4.7/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h cgal-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h --- cgal-4.7/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -2006,6 +2006,32 @@ } //----------------------------------------------------------------------------- +// Move all inner CCBs (holes) from one face to another. +// +template +void Arrangement_on_surface_2:: +_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 @@ -2070,6 +2096,33 @@ } //----------------------------------------------------------------------------- +// Move all isolated vertices from one face to another. +// +template +void Arrangement_on_surface_2:: +_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 @@ -4176,10 +4229,19 @@ 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)) { - + 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 @@ -4187,10 +4249,10 @@ // 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) { + // 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). @@ -4324,17 +4386,16 @@ 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); - } + } + // 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 @@ -4841,36 +4902,14 @@ 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); - } + _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 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)); - } + _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. @@ -4973,31 +5012,8 @@ 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)); - } + _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, diff -Nru cgal-4.7/include/CGAL/Arrangement_on_surface_2.h cgal-4.8/include/CGAL/Arrangement_on_surface_2.h --- cgal-4.7/include/CGAL/Arrangement_on_surface_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arrangement_on_surface_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -1514,10 +1514,8 @@ /// \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()); } @@ -1886,6 +1884,13 @@ 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. @@ -1901,6 +1906,13 @@ 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. diff -Nru cgal-4.7/include/CGAL/Arr_Bezier_curve_traits_2.h cgal-4.8/include/CGAL/Arr_Bezier_curve_traits_2.h --- cgal-4.7/include/CGAL/Arr_Bezier_curve_traits_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_Bezier_curve_traits_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 // Iddo Hanniel // Waqar Khan @@ -504,7 +500,7 @@ * \return The past-the-end iterator. */ template - OutputIterator operator() (const Curve_2& B, OutputIterator oi) + OutputIterator operator() (const Curve_2& B, OutputIterator oi) const { typedef typename Bounding_traits::Vertical_tangency_point Vertical_tangency_point; @@ -564,8 +560,10 @@ { // Create the x-monotone subcurves with approximate endpoints. typename std::list::const_iterator pit; - Point_2 p0(B, Rational(0)); // A rational start point. 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) { @@ -576,8 +574,7 @@ p0 = *pit; } - Point_2 p1(B, Rational(1)); // A rational end point. - + 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)); @@ -593,10 +590,11 @@ 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. + Point_2 p0 (B, xid, Rational(0)); + for (it = vt_list.begin(); it != vt_list.end(); ++it) { @@ -609,7 +607,7 @@ } // Create the final subcurve. - p1 = Point_2 (B, Rational(1)); + p1 = Point_2 (B, xid, Rational(1)); *oi++ = CGAL::make_object (X_monotone_curve_2 (B, xid, p0, p1, *p_cache)); @@ -679,7 +677,7 @@ template OutputIterator operator() (const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, - OutputIterator oi) + OutputIterator oi) const { return (cv1.intersect (cv2, *p_imap, *p_cache, oi)); } diff -Nru cgal-4.7/include/CGAL/Arr_dcel_base.h cgal-4.8/include/CGAL/Arr_dcel_base.h --- cgal-4.7/include/CGAL/Arr_dcel_base.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_dcel_base.h 2016-04-04 19:00:11.000000000 +0000 @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Ron Wein // (based on old version by: Iddo Hanniel and Oren Nechushtan) @@ -41,119 +41,97 @@ namespace CGAL { -inline void* _clean_pointer (const void* p) +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(p) & mask); - return (reinterpret_cast (val)); + return (reinterpret_cast(val)); } -inline void* _set_lsb (const void* p) +inline void* _set_lsb(const void* p) { const size_t mask = 1; const size_t val = (reinterpret_cast(p) | mask); - - return (reinterpret_cast (val)); + return (reinterpret_cast( val)); } -inline bool _is_lsb_set (const void* p) +inline bool _is_lsb_set(const void* p) { const size_t mask = 1; const size_t val = reinterpret_cast(p); - - return ((val & mask) != 0); + return ((val & mask) != 0); } /*! \class - * Base vertex class. + * Base vertex class. */ -template class Arr_vertex_base -{ +template class Arr_vertex_base { public: - typedef Point_ Point; /*! \struct * An auxiliary structure for rebinding the vertex with a new point class. */ - template - struct rebind - { - typedef Arr_vertex_base other; - }; + template struct rebind { typedef Arr_vertex_base 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). + 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 (CGAL::ARR_INTERIOR); - } - + p_inc(NULL), + p_pt(NULL) + { pss[0] = pss[1] = static_cast(CGAL::ARR_INTERIOR); } + /*! Destructor. */ virtual ~Arr_vertex_base() {} /*! Check if the point pointer is NULL. */ - bool has_null_point () const - { - return (p_pt == NULL); - } + bool has_null_point() const { return (p_pt == NULL); } /*! Get the point (const version). */ - const Point& point() const + const Point& point() const { - CGAL_assertion (p_pt != NULL); + CGAL_assertion(p_pt != NULL); return (*p_pt); } /*! Get the point (non-const version). */ - Point& point() - { - CGAL_assertion (p_pt != NULL); + 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; - } + 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])); - } + 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])); - } + 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) + void set_boundary(Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - pss[0] = static_cast (ps_x); - pss[1] = static_cast (ps_y); + pss[0] = static_cast(ps_x); + pss[1] = static_cast(ps_y); return; } /*! Assign from another vertex. */ - virtual void assign (const Arr_vertex_base& v) + virtual void assign(const Arr_vertex_base& v) { p_pt = v.p_pt; pss[0] = v.pss[0]; @@ -164,90 +142,77 @@ /*! \class * Base halfedge class. */ -template class Arr_halfedge_base -{ +template 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 - struct rebind - { - typedef Arr_halfedge_base other; - }; + struct rebind { typedef Arr_halfedge_base 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. - 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. + 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) + p_opp(NULL), + p_prev(NULL), + p_next(NULL), + p_v(NULL), + p_comp(NULL), + p_cv(NULL) {} /*! Destructor. */ - virtual ~Arr_halfedge_base() - {} + virtual ~Arr_halfedge_base() {} /*! Check if the curve pointer is NULL. */ - bool has_null_curve () const - { - return (p_cv == NULL); - } + bool has_null_curve() const { return (p_cv == NULL); } /*! Get the x-monotone curve (const version). */ - const X_monotone_curve& curve() const + const X_monotone_curve& curve() const { - CGAL_precondition (p_cv != NULL); + CGAL_precondition(p_cv != NULL); return (*p_cv); } /*! Get the x-monotone curve (non-const version). */ - X_monotone_curve& curve () + X_monotone_curve& curve() { - CGAL_precondition (p_cv != NULL); + CGAL_precondition(p_cv != NULL); return (*p_cv); } /*! Set the x-monotone curve. */ - void set_curve (X_monotone_curve* c) - { + void set_curve(X_monotone_curve* c) + { p_cv = c; // Set the curve for the opposite halfedge as well. Arr_halfedge_base* opp = - reinterpret_cast* > (p_opp); + reinterpret_cast* >(p_opp); opp->p_cv = c; } /*! Assign from another halfedge. */ - virtual void assign (const Arr_halfedge_base& he) - { - p_cv = he.p_cv; - } + virtual void assign(const Arr_halfedge_base& he) + { p_cv = he.p_cv; } }; /*! @@ -256,7 +221,6 @@ class Arr_face_base { public: - typedef std::list Outer_ccbs_container; typedef Outer_ccbs_container::iterator Outer_ccb_iterator; typedef Outer_ccbs_container::const_iterator Outer_ccb_const_iterator; @@ -269,11 +233,9 @@ typedef Isolated_vertices_container::iterator Isolated_vertex_iterator; typedef Isolated_vertices_container::const_iterator Isolated_vertex_const_iterator; - -protected: - enum - { +protected: + enum { IS_UNBOUNDED = 1, IS_FICTITIOUS = 2 }; @@ -283,47 +245,29 @@ 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) - {} + Arr_face_base() : flags(0) {} /*! Destructor. */ - virtual ~Arr_face_base() - {} + virtual ~Arr_face_base() {} /*! Check if the face is unbounded. */ - bool is_unbounded () const - { - return ((flags & IS_UNBOUNDED) != 0); - } + 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); - } + 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); - } + 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); - } + 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; - } + virtual void assign(const Arr_face_base& f) { flags = f.flags; } }; // Forward declarations: @@ -338,8 +282,7 @@ * The default arrangement DCEL vertex class. */ template -class Arr_vertex : public V, - public In_place_list_base > +class Arr_vertex : public V, public In_place_list_base > { public: @@ -349,57 +292,56 @@ typedef Arr_isolated_vertex Isolated_vertex; /*! Default constructor. */ - Arr_vertex() - {} + Arr_vertex() {} /*! Check if the vertex is isolated. */ - bool is_isolated () const + 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)); + return (_is_lsb_set(this->p_inc)); } /*! Get an incident halfedge (const version). */ - const Halfedge* halfedge () const + const Halfedge* halfedge() const { - CGAL_precondition (! is_isolated()); + CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } /*! Get an incident halfedge (non-const version). */ - Halfedge* halfedge () + Halfedge* halfedge() { - CGAL_precondition (! is_isolated()); + CGAL_precondition(! is_isolated()); return (reinterpret_cast(this->p_inc)); } /*! Set an incident halfedge (for non-isolated vertices). */ - void set_halfedge (Halfedge* he) - { + 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 + const Isolated_vertex* isolated_vertex() const { - CGAL_precondition (is_isolated()); - return (reinterpret_cast(_clean_pointer + CGAL_precondition(is_isolated()); + return (reinterpret_cast(_clean_pointer (this->p_inc))); } /*! Get the isolated vertex information (non-const version). */ - Isolated_vertex* isolated_vertex () + Isolated_vertex* isolated_vertex() { - CGAL_precondition (is_isolated()); - return (reinterpret_cast(_clean_pointer (this->p_inc))); + CGAL_precondition(is_isolated()); + return (reinterpret_cast(_clean_pointer(this->p_inc))); } /*! Set the isolated vertex information. */ - void set_isolated_vertex (Isolated_vertex* iv) + void set_isolated_vertex(Isolated_vertex* iv) { // Set the isolated vertex-information pointer and set its LSB. - this->p_inc = _set_lsb (iv); + this->p_inc = _set_lsb(iv); } }; @@ -411,7 +353,6 @@ public In_place_list_base > { public: - typedef H Base; typedef Arr_vertex Vertex; typedef Arr_halfedge Halfedge; @@ -420,179 +361,139 @@ typedef Arr_inner_ccb Inner_ccb; /*! Default constructor. */ - Arr_halfedge() - {} + Arr_halfedge() {} /*! Get the opposite halfedge (const version). */ const Halfedge* opposite () const - { - return (reinterpret_cast(this->p_opp)); - } - + { return (reinterpret_cast(this->p_opp)); } + /*! Get the opposite halfedge (non-const version). */ - Halfedge* opposite () - { - return (reinterpret_cast(this->p_opp)); - } + Halfedge* opposite() { return (reinterpret_cast(this->p_opp)); } /*! Sets the opposite halfedge. */ - void set_opposite (Halfedge* he) - { - this->p_opp = he; - } + void set_opposite(Halfedge* he) { this->p_opp = he; } /*! Get the direction of the halfedge. */ - Arr_halfedge_direction direction () const + 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); + 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) + void set_direction(Arr_halfedge_direction dir) { - Halfedge* opp = reinterpret_cast (this->p_opp); + Halfedge* opp = reinterpret_cast(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); + 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); + 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(this->p_prev)); - } + const Halfedge* prev() const + { return (reinterpret_cast(this->p_prev)); } /*! Get the previous halfedge along the chain (const version). */ - Halfedge* prev () - { - return (reinterpret_cast(this->p_prev)); - } + Halfedge* prev() { return (reinterpret_cast(this->p_prev)); } /*! Set the previous halfedge along the chain. */ - void set_prev (Halfedge* he) + 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(this->p_next)); - } + const Halfedge* next() const + { return (reinterpret_cast(this->p_next)); } /*! Get the next halfedge along the chain (const version). */ - Halfedge* next () - { - return (reinterpret_cast(this->p_next)); - } + Halfedge* next() { return (reinterpret_cast(this->p_next)); } /*! Set the next halfedge along the chain. */ - void set_next (Halfedge* he) + 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(_clean_pointer (this->p_v))); - } + const Vertex* vertex() const + { return (reinterpret_cast(_clean_pointer(this->p_v))); } /*! Get the target vertex (non-const version). */ - Vertex* vertex () - { - return (reinterpret_cast(_clean_pointer (this->p_v))); - } + Vertex* vertex() + { return (reinterpret_cast(_clean_pointer(this->p_v))); } /*! Set the target vertex. */ - void set_vertex (Vertex* v) + 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; + 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)); - } + bool is_on_outer_ccb() const { return (!_is_lsb_set(this->p_comp)); } - - /*! - * Get an incident outer CCB (const version). + /*! Get an incident outer CCB (const version). * \pre The edge does not lie on an inner CCB. */ - const Outer_ccb* outer_ccb () const + const Outer_ccb* outer_ccb() const { - CGAL_precondition (! is_on_inner_ccb()); + CGAL_precondition(! is_on_inner_ccb()); return (reinterpret_cast(this->p_comp)); } - /*! - * Get an incident outer CCB (non-const version). + /*! Get an incident outer CCB (non-const version). * \pre The edge does not lie on an inner CCB. */ - Outer_ccb* outer_ccb () + Outer_ccb* outer_ccb() { - CGAL_precondition (! is_on_inner_ccb()); + CGAL_precondition(! is_on_inner_ccb()); return (reinterpret_cast(this->p_comp)); } /*! Set the incident outer CCB. */ - void set_outer_ccb (Outer_ccb *oc) - { + 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)); - } + bool is_on_inner_ccb() const { return (_is_lsb_set(this->p_comp)); } - /*! - * Get an incident inner CCB (const version). + /*! 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(_clean_pointer (this->p_comp))); + const Inner_ccb* inner_ccb() const + { + CGAL_precondition(is_on_inner_ccb()); + return (reinterpret_cast(_clean_pointer(this->p_comp))); } - /*! - * Get an incident inner CCB (non-const version). + /*! Get an incident inner CCB (non-const version). * \pre The edge lies on an inner CCB. */ - Inner_ccb* inner_ccb () + Inner_ccb* inner_ccb() { - CGAL_precondition (is_on_inner_ccb()); - return (reinterpret_cast (_clean_pointer (this->p_comp))); + CGAL_precondition(is_on_inner_ccb()); + return (reinterpret_cast(_clean_pointer(this->p_comp))); } /*! Set the incident inner CCB. */ - void set_inner_ccb (Inner_ccb *ic) - { + void set_inner_ccb(Inner_ccb *ic) + { // Set the component pointer and set its LSB. - this->p_comp = _set_lsb (ic); + this->p_comp = _set_lsb(ic); } }; @@ -604,7 +505,6 @@ public In_place_list_base > { public: - typedef F Base; typedef Arr_vertex Vertex; typedef Arr_halfedge Halfedge; @@ -614,14 +514,12 @@ typedef Arr_isolated_vertex Isolated_vertex; typedef Inner_ccb Hole; - -private: - typedef Cast_function_object _Ccb_to_halfedge_cast; - // typedef Cast_function_object _Const_ccb_to_halfedge_cast; - typedef _Ccb_to_halfedge_cast _Const_ccb_to_halfedge_cast; +private: + typedef Cast_function_object _Ccb_to_halfedge_cast; + // typedef Cast_function_object + // _Const_ccb_to_halfedge_cast; + typedef _Ccb_to_halfedge_cast _Const_ccb_to_halfedge_cast; public: @@ -630,112 +528,96 @@ {} // Definition of the outer CCB iterators: - typedef Iterator_project Outer_ccb_iterator; typedef Iterator_project + _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()); - } + 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()); - } + 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()); - } + 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()); - } + { 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()); - } + { 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; - } + 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()); - } + void erase_outer_ccb(Outer_ccb *oc) + { this->outer_ccbs.erase(oc->iterator().current_iterator()); } // Definition of the inner CCB iterators: - typedef Iterator_project Inner_ccb_iterator; typedef Iterator_project + _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()); - } + 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()); - } + 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()); - } + 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()); - } + { 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()); - } + { 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; - } + 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) + 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) { - this->inner_ccbs.erase (ic->iterator().current_iterator()); + 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(*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(); } + 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(); } @@ -748,7 +630,7 @@ 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, @@ -759,144 +641,116 @@ /*! Get the number of isloated vertices inside the face. */ size_t number_of_isolated_vertices() const - { - return (this->iso_verts.size()); - } + { 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()); - } + { 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()); - } + { 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()); - } + { 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()); - } + { 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; - } + 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) + 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) { - this->iso_verts.erase (iv->iterator().current_iterator()); - return; + 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(*it)->isolated_vertex(); + iv->set_iterator(it); + iv->set_face(this); + } + return previous; } - }; /*! \class * Representation of an outer CCB. */ template -class Arr_outer_ccb : public In_place_list_base > -{ +class Arr_outer_ccb : public In_place_list_base > { public: - typedef Arr_outer_ccb Self; typedef Arr_halfedge Halfedge; typedef Arr_face Face; typedef typename Face::Outer_ccb_iterator Outer_ccb_iterator; private: - - Face *p_f; // The face the contains the CCB in its interior. + 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) - {} + 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; - } - } + 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); - } + const Halfedge* halfedge() const { return (*iter); } /*! Get a halfedge along the component (non-const version). */ - Halfedge* halfedge () - { - return (*iter); - } + Halfedge* halfedge() { return (*iter); } /*! Set a representative halfedge for the component. */ - void set_halfedge (Halfedge *he) - { - *iter = he; - return; - } + void set_halfedge(Halfedge* he) { *iter = he; } /*! Get the incident face (const version). */ - const Face* face () const - { - return (p_f); - } + const Face* face() const { return (p_f); } /*! Get the incident face (non-const version). */ - Face* face () - { - return (p_f); - } + Face* face() { return (p_f); } /*! Set the incident face. */ - void set_face (Face* f) - { - p_f = f; - return; - } + void set_face(Face* f) { p_f = f; } /*! Get the iterator (const version). */ - Outer_ccb_iterator iterator () const + Outer_ccb_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iter); } /*! Get the iterator (non-const version). */ - Outer_ccb_iterator iterator () + Outer_ccb_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iter); } /*! Set the outer CCB iterator. */ - void set_iterator (Outer_ccb_iterator it) + void set_iterator(Outer_ccb_iterator it) { iter = it; iter_is_not_singular = true; - return; } }; @@ -907,92 +761,62 @@ class Arr_inner_ccb : public In_place_list_base > { public: - typedef Arr_inner_ccb Self; typedef Arr_halfedge Halfedge; typedef Arr_face Face; typedef typename Face::Inner_ccb_iterator Inner_ccb_iterator; private: - - Face *p_f; // The face the contains the CCB in its interior. + 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) - {} + 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; - } - } + 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); - } + const Halfedge* halfedge() const { return (*iter); } /*! Get a halfedge along the component (non-const version). */ - Halfedge* halfedge () - { - return (*iter); - } + Halfedge* halfedge() { return (*iter); } /*! Set a representative halfedge for the component. */ - void set_halfedge (Halfedge *he) - { - *iter = he; - return; - } + void set_halfedge(Halfedge *he) { *iter = he; } /*! Get the incident face (const version). */ - const Face* face () const - { - return (p_f); - } + const Face* face() const { return (p_f); } /*! Get the incident face (non-const version). */ - Face* face () - { - return (p_f); - } + Face* face() { return (p_f); } /*! Set the incident face. */ - void set_face (Face* f) - { - p_f = f; - return; - } + void set_face(Face* f) { p_f = f; } /*! Get the iterator (const version). */ - Inner_ccb_iterator iterator () const + Inner_ccb_iterator iterator() const { CGAL_assertion(iter_is_not_singular); return (iter); } /*! Get the iterator (non-const version). */ - Inner_ccb_iterator iterator () + Inner_ccb_iterator iterator() { CGAL_assertion(iter_is_not_singular); return (iter); } /*! Set the inner CCB iterator. */ - void set_iterator (Inner_ccb_iterator it) + void set_iterator(Inner_ccb_iterator it) { iter = it; iter_is_not_singular = true; - return; } }; @@ -1000,76 +824,55 @@ * Representation of an isolated vertex. */ template -class Arr_isolated_vertex : -public In_place_list_base > -{ +class Arr_isolated_vertex : +public In_place_list_base > { public: - typedef Arr_isolated_vertex Self; typedef Arr_face Face; typedef typename Face::Isolated_vertex_iterator Isolated_vertex_iterator; private: - - Face *p_f; // The containing face. + 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) - {} + 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; - } - } + 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); - } + const Face* face() const { return (p_f); } /*! Get the containing face (non-const version). */ - Face* face () - { - return (p_f); - } + 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; - } + void set_face(Face* f) { p_f = f; } /*! Get the isolated vertex iterator (const version). */ - Isolated_vertex_iterator iterator () const + 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 () + 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) + void set_iterator(Isolated_vertex_iterator iv) { iv_it = iv; iter_is_not_singular = true; - return; } }; @@ -1078,10 +881,8 @@ */ template -class Arr_dcel_base -{ +class Arr_dcel_base { public: - // Define the vertex, halfedge and face types. typedef Arr_dcel_base Self; typedef Arr_vertex Vertex; @@ -1092,9 +893,8 @@ typedef Arr_isolated_vertex Isolated_vertex; typedef Inner_ccb Hole; - -protected: +protected: // The vetices, halfedges and faces are stored in three in-place lists. typedef In_place_list Vertex_list; typedef In_place_list Halfedge_list; @@ -1114,7 +914,7 @@ // Face allocator. typedef typename Allocator::template rebind Face_alloc_rebind; typedef typename Face_alloc_rebind::other Face_allocator; - + // Outer CCB allocator. typedef typename Allocator::template rebind Out_ccb_alloc_rebind; typedef typename Out_ccb_alloc_rebind::other Outer_ccb_allocator; @@ -1129,7 +929,6 @@ 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; @@ -1153,14 +952,13 @@ 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 Edge_iterator; - + // Definitions of const iterators. typedef typename Vertex_list::const_iterator Vertex_const_iterator; typedef typename Halfedge_list::const_iterator Halfedge_const_iterator; @@ -1169,64 +967,41 @@ Edge_const_iterator; private: - // Copy constructor - not supported. - Arr_dcel_base (const Self&) ; + Arr_dcel_base(const Self&); // Assignment operator - not supported. - Self& operator= (const Self&); + Self& operator=(const Self&); public: /// \name Construction and destruction. //@{ /*! Default constructor. */ - Arr_dcel_base () - {} - + Arr_dcel_base() {} + /*! Destructor. */ - ~Arr_dcel_base () - { - delete_all(); - } + ~Arr_dcel_base() { delete_all(); } //@} /// \name The DCEL size. //@{ /*! Get the number of DCEL vertices. */ - Size size_of_vertices () const - { - return (vertices.size()); - } + 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()); - } + Size size_of_halfedges() const { return (halfedges.size()); } /*! Get the number of DCEL faces. */ - Size size_of_faces() const - { - return (faces.size()); - } + Size size_of_faces() const { return (faces.size()); } /*! Get the number of outer CCBs. */ - Size size_of_outer_ccbs() const - { - return (out_ccbs.size()); - } + 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()); - } + 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()); - } + Size size_of_isolated_vertices() const { return (iso_verts.size()); } //@} /// \name Obtaining iterators. @@ -1258,23 +1033,23 @@ /*! Create a new vertex. */ Vertex* new_vertex() { - Vertex *v = vertex_alloc.allocate (1); + Vertex* v = vertex_alloc.allocate(1); - vertex_alloc.construct (v, Vertex()); - vertices.push_back (*v); + vertex_alloc.construct(v, Vertex()); + vertices.push_back(*v); return v; } - + /*! Create a new pair of opposite halfedges. */ - Halfedge* new_edge() + Halfedge* new_edge() { // Create two new halfedges. - Halfedge *h1 = _new_halfedge (); - Halfedge *h2 = _new_halfedge (); + Halfedge* h1 = _new_halfedge(); + Halfedge* h2 = _new_halfedge(); // Pair them together. - h1->set_opposite (h2); - h2->set_opposite (h1); + h1->set_opposite(h2); + h2->set_opposite(h1); return (h1); } @@ -1282,39 +1057,37 @@ /*! Create a new face. */ Face* new_face() { - Face *f = face_alloc.allocate (1); - - face_alloc.construct (f, Face()); + Face* f = face_alloc.allocate(1); + + face_alloc.construct(f, Face()); faces.push_back (*f); - return (f); + return(f); } /*! Create a new outer CCB. */ - Outer_ccb* 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); + 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* new_inner_ccb() { - Inner_ccb *ic = in_ccb_alloc.allocate (1); - - in_ccb_alloc.construct (ic, Inner_ccb()); - in_ccbs.push_back (*ic); + 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* new_isolated_vertex() { - Isolated_vertex *iv = iso_vert_alloc.allocate (1); - - iso_vert_alloc.construct (iv, Isolated_vertex()); - iso_verts.push_back (*iv); + Isolated_vertex* iv = iso_vert_alloc.allocate(1); + iso_vert_alloc.construct(iv, Isolated_vertex()); + iso_verts.push_back(*iv); return (iv); } //@} @@ -1322,123 +1095,109 @@ /// \name Deletion of DCEL features. //@{ /*! Delete an existing vertex. */ - void delete_vertex (Vertex *v) + void delete_vertex(Vertex* v) { - vertices.erase (v); - vertex_alloc.destroy (v); - vertex_alloc.deallocate (v,1); + vertices.erase(v); + vertex_alloc.destroy(v); + vertex_alloc.deallocate(v,1); } - + /*! Delete an existing pair of opposite halfedges. */ - void delete_edge (Halfedge *h) + void delete_edge(Halfedge *h) { - Halfedge *h_opp = h->opposite(); - - _delete_halfedge (h); - _delete_halfedge (h_opp); + Halfedge* h_opp = h->opposite(); + _delete_halfedge(h); + _delete_halfedge(h_opp); } /*! Delete an existing face. */ - void delete_face(Face *f) + void delete_face(Face* f) { - faces.erase (f); - face_alloc.destroy (f); - face_alloc.deallocate (f, 1); + faces.erase(f); + face_alloc.destroy(f); + face_alloc.deallocate(f, 1); } /*! Delete an existing outer CCB. */ - void delete_outer_ccb (Outer_ccb *oc) + void delete_outer_ccb(Outer_ccb* oc) { - out_ccbs.erase (oc); - out_ccb_alloc.destroy (oc); - out_ccb_alloc.deallocate (oc, 1); + 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) + void delete_inner_ccb(Inner_ccb* ic) { - in_ccbs.erase (ic); - in_ccb_alloc.destroy (ic); - in_ccb_alloc.deallocate (ic, 1); + 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) + void delete_isolated_vertex(Isolated_vertex* iv) { - iso_verts.erase (iv); - iso_vert_alloc.destroy (iv); - iso_vert_alloc.deallocate (iv, 1); + iso_verts.erase(iv); + iso_vert_alloc.destroy(iv); + iso_vert_alloc.deallocate(iv, 1); } - + /*! Delete all DCEL features. */ - void delete_all() + void delete_all() { // Free all vertices. - Vertex_iterator vit = vertices.begin(), v_curr; - - while (vit != vertices.end()) - { + Vertex_iterator vit = vertices.begin(), v_curr; + while (vit != vertices.end()) { v_curr = vit; ++vit; - delete_vertex (&(*v_curr)); + delete_vertex(&(*v_curr)); } // Free all halfedges. Halfedge_iterator hit = halfedges.begin(), h_curr; - - while (hit != halfedges.end()) - { + while (hit != halfedges.end()) { h_curr = hit; ++hit; - _delete_halfedge (&(*h_curr)); + _delete_halfedge(&(*h_curr)); } // Free all faces. - Face_iterator fit = faces.begin(), f_curr; - - while (fit != faces.end()) - { + Face_iterator fit = faces.begin(), f_curr; + while (fit != faces.end()) { f_curr = fit; ++fit; - delete_face (&(*f_curr)); + delete_face(&(*f_curr)); } // Free all outer CCBs. - typename Outer_ccb_list::iterator ocit = out_ccbs.begin(), oc_curr; - - while (ocit != out_ccbs.end()) - { + 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)); + 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()) - { + 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)); + 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()) - { + 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)); + delete_isolated_vertex(&(*iv_curr)); } } //@} - /*! - * Assign our DCEL the contents of another DCEL. + /*! Assign our DCEL the contents of another DCEL. */ - void assign (const Self& dcel) + void assign(const Self& dcel) { // Clear the current contents of the DCEL. delete_all(); @@ -1452,156 +1211,147 @@ typedef std::map Inner_ccb_map; typedef std::map Iso_vert_map; - Vertex_map v_map; - Vertex_const_iterator vit; - Vertex *dup_v; + Vertex_map v_map; + Vertex_const_iterator vit; + Vertex* dup_v; - for (vit = dcel.vertices_begin(); vit != dcel.vertices_end(); ++vit) - { + 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)); + 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; + Halfedge_map he_map; + Halfedge_const_iterator hit; + Halfedge* dup_h; - for (hit = dcel.halfedges_begin(); hit != dcel.halfedges_end(); ++hit) - { + 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)); + 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; + Face_map f_map; + Face_const_iterator fit; + Face* dup_f; - for (fit = dcel.faces_begin(); fit != dcel.faces_end(); ++fit) - { + 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)); + 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; + 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) - { + 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)); + 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; + 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) - { + 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)); + 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; + 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) - { + 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)); + 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) - { + 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; + dup_v = (v_map.find(v))->second; - if (v->is_isolated()) - { + if (v->is_isolated()) { // Isolated vertex - set its information. iv = v->isolated_vertex(); - dup_iv = (iv_map.find (iv))->second; + dup_iv = (iv_map.find(iv))->second; - dup_v->set_isolated_vertex (dup_iv); + dup_v->set_isolated_vertex(dup_iv); } - else - { + else { // Regular vertex - set its incident halfedge. h = v->halfedge(); - dup_h = (he_map.find (h))->second; + dup_h = (he_map.find(h))->second; - dup_v->set_halfedge (dup_h); + dup_v->set_halfedge(dup_h); } } // Update the halfedge records. - const Halfedge *opp, *prev, *next; - Halfedge *dup_opp, *dup_prev, *dup_next; + 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) - { + 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()); + 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()) - { + 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); + dup_ic = (ic_map.find(ic))->second; + dup_h->set_inner_ccb(dup_ic); } - else - { + 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); + 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; + 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) - { + 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()); + 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(); @@ -1609,11 +1359,11 @@ { hccb = *out_ccb_it; - dup_hccb = (he_map.find (hccb))->second; + 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); + dup_oc->set_face(dup_f); + dup_f->add_outer_ccb(dup_oc, dup_hccb); } // Assign the inner CCBs of the face. @@ -1622,11 +1372,11 @@ { hccb = *in_ccb_it; - dup_hccb = (he_map.find (hccb))->second; + 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); + dup_ic->set_face(dup_f); + dup_f->add_inner_ccb(dup_ic, dup_hccb); } // Assign the isolated vertices. @@ -1635,38 +1385,34 @@ { iso_vert = &(*iso_vert_it); - dup_iso_vert = (v_map.find (iso_vert))->second; + 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); + 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* _new_halfedge() { - Halfedge *h = halfedge_alloc.allocate (1); - - halfedge_alloc.construct (h, Halfedge()); - halfedges.push_back (*h); + 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) + void _delete_halfedge(Halfedge* h) { - halfedges.erase (h); - halfedge_alloc.destroy (h); - halfedge_alloc.deallocate (h, 1); + halfedges.erase(h); + halfedge_alloc.destroy(h); + halfedge_alloc.deallocate(h, 1); } }; } //namespace CGAL -#endif +#endif diff -Nru cgal-4.7/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h cgal-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h --- cgal-4.7/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 #ifndef CGAL_ARR_GEODESIC_ARC_ON_SPHERE_TRAITS_2_H @@ -568,7 +564,8 @@ */ Comparison_result operator()(const X_monotone_curve_2& xc1, const X_monotone_curve_2& xc2, - const Point_2& p) const + const Point_2& + CGAL_precondition_code(p)) const { CGAL_precondition(!xc1.is_degenerate()); CGAL_precondition(!xc2.is_degenerate()); @@ -942,7 +939,7 @@ */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, - Arr_curve_end ce) const + Arr_curve_end CGAL_precondition_code(ce)) const { CGAL_precondition(point.is_no_boundary()); CGAL_precondition_code @@ -985,9 +982,9 @@ * \pre xcv2 does not coincide with the vertical identification curve. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, - Arr_curve_end ce1, + Arr_curve_end CGAL_precondition_code(ce1), const X_monotone_curve_2& xcv2, - Arr_curve_end ce2) const + Arr_curve_end CGAL_precondition_code(ce2)) const { CGAL_precondition_code (const Point_2& p1 = (ce1 == ARR_MIN_END) ? xcv1.left() : xcv1.right();); @@ -1071,9 +1068,11 @@ * \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 + 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();); diff -Nru cgal-4.7/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h cgal-4.8/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h --- cgal-4.7/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 // Iddo Hanniel @@ -100,7 +96,7 @@ { private: Bezier_cache *p_cache; - + public: Less_intersection_point (Bezier_cache& cache) : @@ -605,23 +601,27 @@ * EQUAL if p lies on the curve. */ Comparison_result _exact_vertical_position (const Point_2& p, - bool force_exact) const; + bool +#if !defined(CGAL_NO_ASSERTIONS) + force_exact +#endif + ) const; }; /*! * Exporter for Bezier curves. */ -template -std::ostream& -operator<< (std::ostream& os, - const _Bezier_x_monotone_2& cv) { os << cv.supporting_curve() << " [" << cv.xid() - << "] | " << cv.source() + << "] | " << cv.source() << " --> " << cv.target(); return (os); @@ -645,11 +645,11 @@ // 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()); - + 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); @@ -663,12 +663,12 @@ { _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, @@ -676,7 +676,7 @@ { // Perform the comparison assuming that the possible parameter // values do not overlap. - t_res = CGAL::compare (ps_org->point_bound().t_min, + t_res = CGAL::compare (ps_org->point_bound().t_min, pt_org->point_bound().t_min); } else @@ -684,7 +684,7 @@ // 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()); } @@ -700,7 +700,7 @@ // Get the approximate parameter range defining the curve. // template -std::pair +std::pair _Bezier_x_monotone_2::parameter_range () const { // First try to use the approximate representation of the endpoints. @@ -728,14 +728,14 @@ 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 (! _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; @@ -746,7 +746,7 @@ 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); @@ -755,10 +755,10 @@ if (p.identical(_ps)) { return EQUAL; } - - // Then check whether the bezier is an horizontal segment or + + // 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) @@ -778,13 +778,13 @@ // 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. @@ -802,13 +802,13 @@ // 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 @@ -838,7 +838,7 @@ 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; @@ -848,10 +848,10 @@ 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; @@ -949,28 +949,28 @@ 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 roots; std::pair 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. @@ -978,7 +978,7 @@ 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()); @@ -1000,20 +1000,20 @@ 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 (p); @@ -1023,7 +1023,7 @@ 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.) @@ -1039,7 +1039,7 @@ if (! _ps.is_exact()) _ps.make_exact (cache); - + if (! _pt.is_exact()) _pt.make_exact (cache); @@ -1074,7 +1074,7 @@ CGAL_precondition_msg (false, "p is not on cv1"); } } - + if (! p.equals (cv.left(), cache)) { if (cv.point_position (p, cache) != EQUAL) @@ -1090,14 +1090,14 @@ 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; @@ -1118,7 +1118,7 @@ { // 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 = + const typename Bounding_traits::Control_points& cp = org->point_bound().ctrl; if (_inc_to_right) @@ -1130,21 +1130,21 @@ 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 @@ -1163,7 +1163,7 @@ // 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, @@ -1175,10 +1175,10 @@ right_res = cv._compare_to_side (*this, p, true, // Compare to p's right. cache); - + right_res = CGAL::opposite (right_res); } - + return (right_res); } @@ -1218,7 +1218,7 @@ 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()) @@ -1226,14 +1226,14 @@ 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; @@ -1246,16 +1246,16 @@ 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 = + const typename Bounding_traits::Control_points& cp = org->point_bound().ctrl; - + if (_inc_to_right) { return (CGAL::compare(cp.front().y(), cp.back().y())); @@ -1265,21 +1265,21 @@ 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 @@ -1292,14 +1292,14 @@ // 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, @@ -1313,7 +1313,7 @@ cache); left_res = CGAL::opposite (left_res); } - + return (left_res); } @@ -1334,11 +1334,11 @@ 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(); @@ -1378,13 +1378,13 @@ 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) { @@ -1410,7 +1410,7 @@ return (_curve.is_same (cv._curve) && _xid == cv._xid && (right().is_same (cv.left()) || left().is_same (cv.right()))); - + return (false); } @@ -1438,7 +1438,7 @@ else { CGAL_precondition (left().is_same (cv.right())); - + // Extend the subcurve to the left. if (_dir_right) res._ps = cv.left(); @@ -1467,7 +1467,7 @@ Nt_traits nt_traits; bool p_lt_ps = - (CGAL::compare (t, nt_traits.convert (s_org->point_bound().t_min)) == + (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)) == @@ -1485,7 +1485,7 @@ // 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, @@ -1493,15 +1493,15 @@ // (or greater than both of them). return (false); } - + // Obtain the exact t-range of the curve and peform an exact comparison. std::pair 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); } @@ -1514,7 +1514,7 @@ 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; @@ -1534,14 +1534,14 @@ 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, @@ -1567,14 +1567,14 @@ // (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(); } @@ -1634,7 +1634,7 @@ 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. @@ -1670,9 +1670,9 @@ } } is_endpoint = false; - return (false); + return (false); } - + _curve.get_t_at_x (rat_p.x(), std::back_inserter(t_vals)); CGAL_assertion (! t_vals.empty() ); @@ -1745,7 +1745,7 @@ 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); @@ -1772,7 +1772,7 @@ nt_traits.convert (_curve.y_norm())); } } - + // If we reached here, x0 is not in the x-range of our subcurve. CGAL_error(); return (0); @@ -1808,7 +1808,7 @@ 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)); } @@ -1903,7 +1903,7 @@ // 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); @@ -1922,7 +1922,7 @@ // template std::pair::Algebraic, + BndTrt>::Algebraic, typename _Bezier_x_monotone_2::Algebraic> _Bezier_x_monotone_2::_t_range @@ -1930,17 +1930,17 @@ { 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())); } @@ -1981,10 +1981,10 @@ // 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. @@ -1998,14 +1998,14 @@ 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))) || @@ -2032,7 +2032,7 @@ } } } - + // If the next intersection point occurs before the right (left) endpoint // of the subcurve, keep it. Otherwise, take the parameter value at // the endpoint. @@ -2043,7 +2043,7 @@ else res = CGAL::compare (t_src, next_t); } - + if (! found || (to_right && ((_inc_to_right && res == SMALLER) || (! _inc_to_right && res == LARGER))) || @@ -2052,7 +2052,7 @@ { 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. @@ -2217,25 +2217,25 @@ // Construct the approximated points. typename std::list::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; - + 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); + 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; @@ -2356,10 +2356,10 @@ if (app_ok) { - // Approximations are computed using de Casteljau subdivision and + // 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 + // 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 @@ -2369,7 +2369,7 @@ // 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::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 @@ -2388,10 +2388,10 @@ { 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); } @@ -2414,13 +2414,13 @@ { 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 @@ -2662,9 +2662,13 @@ // template Comparison_result -_Bezier_x_monotone_2::_exact_vertical_position - (const Point_2& p, - bool force_exact) const +_Bezier_x_monotone_2:: +_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; @@ -2676,17 +2680,17 @@ 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) @@ -2709,9 +2713,9 @@ if (can_refine_s) can_refine_s = _ps.refine(); - + if (can_refine_t) - can_refine_t = _pt.refine(); + can_refine_t = _pt.refine(); } while(can_refine_s || can_refine_t); @@ -2745,7 +2749,7 @@ 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); @@ -2781,7 +2785,7 @@ 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); @@ -2818,7 +2822,7 @@ // If we got here without entering one of the clauses above, // then iter has not been incremented yet. - ++iter; + ++iter; } } diff -Nru cgal-4.7/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h cgal-4.8/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h --- cgal-4.7/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_geometry_traits/IO/Polycurve_2_iostream.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifndef CGAL_POLYCURVE_2_IOSTREAM_H +#define CGAL_POLYCURVE_2_IOSTREAM_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace internal { + +/*! Output operator for a polyline. */ +template +void write_polyline(OutputStream& os, + const Polycurve_2& xcv) +{ + typedef SubcurveType_2 Subcurve_type_2; + typedef PointType_2 Point_type_2; + typedef Polycurve_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. */ +template +void write_polycurve(OutputStream& os, + const Polycurve_2, PointType_2>& xcv) +{ write_polyline(os, xcv); } + +/*! Output operator for a polyline of type CGAL::Segment_2. */ +template +void write_polycurve(OutputStream& os, + const Polycurve_2, PointType_2>& xcv) +{ write_polyline(os, xcv); } + +/*! Output operator for a polycurve. */ +template +void write_polycurve(OutputStream& os, + const Polycurve_2& xcv) +{ + typedef SubcurveType_2 Subcurve_type_2; + typedef PointType_2 Point_type_2; + typedef Polycurve_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 +OutputStream& operator<<(OutputStream& os, + const Polycurve_2& xcv) +{ + write_polycurve(os, xcv); + return os; +} + +/*! Input operator for a polyline. */ +template +void read_polyline(InputStream& is, + Polycurve_2& xcv) +{ + typedef SubcurveType_2 Subcurve_type_2; + typedef PointType_2 Point_type_2; + typedef Polycurve_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 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. */ +template +void read_polycurve(InputStream& is, + Polycurve_2, PointType_2>& xcv) +{ read_polyline(is, xcv); } + +/*! Input operator for a polyline of type CGAL::Segment_2. */ +template +void read_polycurve(InputStream& is, + Polycurve_2, PointType_2>& xcv) +{ read_polyline(is, xcv); } + +/*! Input operator for a polycurve. */ +template +void read_polycurve(InputStream& is, + Polycurve_2& xcv) +{ + typedef SubcurveType_2 Subcurve_type_2; + typedef PointType_2 Point_type_2; + typedef Polycurve_2 Curve_2; + + std::size_t num; // read the number of subcurves. + is >> num; + + // Read the subcurves. + std::list 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 +InputStream& operator>>(InputStream& is, + Polycurve_2& xcv) +{ + read_polycurve(is, xcv); + return is; +} + +} +} + +#endif diff -Nru cgal-4.7/include/CGAL/Arr_geometry_traits/Polycurve_2.h cgal-4.8/include/CGAL/Arr_geometry_traits/Polycurve_2.h --- cgal-4.7/include/CGAL/Arr_geometry_traits/Polycurve_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_geometry_traits/Polycurve_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -16,8 +16,8 @@ // Efi Fogel // Dror Atariah -#ifndef CGAL_ARR_POLYCURVE_2_H -#define CGAL_ARR_POLYCURVE_2_H +#ifndef CGAL_POLYCURVE_2_H +#define CGAL_POLYCURVE_2_H /*! \file * Header file for the polyline classes used by the @@ -26,9 +26,10 @@ */ #include -#include #include #include +#include + #include namespace CGAL { @@ -196,13 +197,13 @@ return bbox; } - class const_iterator; - friend class const_iterator; - typedef std::reverse_iterator - const_reverse_iterator; + class Point_const_iterator; + friend class Point_const_iterator; + typedef std::reverse_iterator + Point_const_reverse_iterator; /*! An iterator for the polycurve points. */ - class CGAL_DEPRECATED const_iterator { + class Point_const_iterator { public: // Type definitions: typedef std::bidirectional_iterator_tag iterator_category; @@ -215,32 +216,33 @@ private: // The polycurve curve. const Polycurve_2* m_cvP; - int m_num_pts; // Its number of points. - int m_index; // The current point. + 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. */ - const_iterator(const Polycurve_2* cvP, - int index) : + Point_const_iterator(const Polycurve_2* cvP, + size_type index) : m_cvP(cvP), m_index(index) - { - if (m_cvP == NULL) - m_num_pts = 0; - else - m_num_pts = (m_cvP->number_of_subcurves() == 0) ? - 0 : (m_cvP->number_of_subcurves() + 1); - } + { + 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::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } public: /*! Default constructor. */ - const_iterator() : + Point_const_iterator() : m_cvP(NULL), m_num_pts(0), - m_index(-1) - {} + m_index(std::numeric_limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) + {} /*! Dereference operator. * \return The current point. @@ -248,7 +250,7 @@ const Point_type_2& operator*() const { CGAL_assertion(m_cvP != NULL); - CGAL_assertion((m_index >= 0) && (m_index < m_num_pts)); + 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. @@ -262,65 +264,82 @@ const Point_type_2* operator->() const { return (&(this->operator* ())); } /*! Increment operators. */ - const_iterator& operator++() + Point_const_iterator& operator++() { if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index; return (*this); } - const_iterator operator++(int) + Point_const_iterator operator++(int) { - const_iterator temp = *this; + Point_const_iterator temp = *this; if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index; return temp; } /*! Decrement operators. */ - const_iterator& operator--() + Point_const_iterator& operator--() { - if ((m_cvP != NULL) && (m_index >= 0)) --m_index; + if ((m_cvP != NULL) && (is_index_valid())) --m_index; return (*this); } - const_iterator operator--(int) + Point_const_iterator operator--(int) { - const_iterator temp = *this; - if ((m_cvP != NULL) && (m_index >= 0)) - --m_index; + Point_const_iterator temp = *this; + if ((m_cvP != NULL) && (is_index_valid())) --m_index; return temp; } /*! Equality operators. */ - bool operator==(const const_iterator& it) const + bool operator==(const Point_const_iterator& it) const { return ((m_cvP == it.m_cvP) && (m_index == it.m_index)); } - bool operator!=(const const_iterator& it) const + bool operator!=(const Point_const_iterator& it) const { return ((m_cvP != it.m_cvP) || (m_index != it.m_index)); } friend class Polycurve_2; }; - /* ! Obtain an iterator for the polycurve points.*/ - CGAL_DEPRECATED const_iterator begin() const + // 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 (const_iterator(NULL, -1)); - else return (const_iterator(this, 0)); + 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.*/ - CGAL_DEPRECATED const_iterator end() const + Point_const_iterator points_end() const { - if (number_of_subcurves() == 0) return (const_iterator(NULL, -1)); - else return (const_iterator(this, number_of_subcurves() + 1)); + 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 const_reverse_iterator rbegin() const - { return (const_reverse_iterator(end())); } + CGAL_DEPRECATED Point_const_reverse_iterator rbegin() const + { return points_rbegin(); } /*! Obtain a reverse past-the-end iterator for the polycurve points. */ - CGAL_DEPRECATED const_reverse_iterator rend() const - { return (const_reverse_iterator(begin())); } + 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 @@ -329,23 +348,31 @@ Subcurve_const_reverse_iterator; /*! Obtain an iterator for the polycurve subcurves. */ - Subcurve_const_iterator begin_subcurves() const + 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 end_subcurves() const + 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 rbegin_subcurves() const - { return (Subcurve_const_reverse_iterator(end_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 rend_subcurves() const - { return (Subcurve_const_reverse_iterator(begin_subcurves())); } + Subcurve_const_reverse_iterator subcurves_rend() const + { return (Subcurve_const_reverse_iterator(subcurves_begin())); } /*! Deprecated! - * Get the number of points contained in the polycurve. + * 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. @@ -354,21 +381,17 @@ CGAL_DEPRECATED std::size_t points() const { return (number_of_subcurves() == 0) ? 0 : number_of_subcurves() + 1; } - /*! Deprecated! Replaced by number_of_subcurves() - * Get the number of subcurves that comprise the poyline. - * \return The number of subcurves. - */ - CGAL_DEPRECATED size_type size() const - { return m_subcurves.size(); } - /*! 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 i The subcurve index(from 0 to size()-1). + * \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 @@ -436,69 +459,6 @@ {} }; -/*! Output operator for a polycurve. */ -template -std::ostream& operator<<(std::ostream & os, - const Polycurve_2& cv) -{ - typedef SubcurveType_2 Subcurve_type_2; - typedef PointType_2 Point_type_2; - - typedef Polycurve_2 Curve_2; - - typename Curve_2::Subcurve_const_iterator iter = cv.begin_subcurves(); - while (iter != cv.end_subcurves()) { - if (iter == cv.begin_subcurves()) { - os << " " << *iter; - ++iter; - } - else { - os << " <-> " << *iter; - ++iter; - } - } - return (os); -} - -/*! Input operator for a polycurve. */ -template -std::istream& operator>>(std::istream& is, - Polycurve_2& pl) -{ - typedef SubcurveType_2 Subcurve_type_2; - typedef PointType_2 Point_type_2; - - typedef Polycurve_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 pts; - for (unsigned int i = 0; i < n_pts; ++i) { - is >> p; - pts.push_back(p); - } - - std::list subcurves; - typename std::list::iterator curr = pts.begin(); - typename std::list::iterator next = pts.begin(); - ++next; - while (next != pts.end()) { - subcurves.push_back(Subcurve_type_2(*curr, *next)); - ++curr; - ++next; - } - - // Create the polycurve curve. - pl = Curve_2(subcurves.begin(), subcurves.end()); - - return (is); -} - } // namespace polycurve } //namespace CGAL diff -Nru cgal-4.7/include/CGAL/Arr_geometry_traits/Polyline_2.h cgal-4.8/include/CGAL/Arr_geometry_traits/Polyline_2.h --- cgal-4.7/include/CGAL/Arr_geometry_traits/Polyline_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_geometry_traits/Polyline_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -62,19 +62,19 @@ /*! Obtain an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const - { return this->begin_subcurves(); } + { return this->subcurves_begin(); } /*! Obtain a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const - { return this->end_subcurves(); } + { return this->subcurves_end(); } /*! Obtain a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const - { return this->rbegin_subcurves(); } + { return this->subcurves_rbegin(); } /*! Obtain a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const - { this->returnrend_subcurves() ; } + { return this->subcurves_rend() ; } /*! Obtain the number of subcurves that comprise the poyline. * \return The number of subcurves. @@ -118,19 +118,19 @@ /*! Obtain an iterator for the polycurve subcurves. */ Segment_const_iterator begin_segments() const - { return this->begin_subcurves(); } + { return this->subcurves_begin(); } /*! Obtain a past-the-end iterator for the polycurve subcurves. */ Segment_const_iterator end_segments() const - { return this->end_subcurves(); } + { return this->subcurves_end(); } /*! Obtain a reverse iterator for the polycurve subcurves. */ Segment_const_reverse_iterator rbegin_segments() const - { return this->rbegin_subcurves(); } + { return this->subcurves_rbegin(); } /*! Obtain a reverse past-the-end iterator for the polycurve points. */ Segment_const_reverse_iterator rend_segments() const - { this->returnrend_subcurves() ; } + { return this->subcurves_rend() ; } /*! Obtain the number of subcurves that comprise the poyline. * \return The number of subcurves. diff -Nru cgal-4.7/include/CGAL/Arr_non_caching_segment_basic_traits_2.h cgal-4.8/include/CGAL/Arr_non_caching_segment_basic_traits_2.h --- cgal-4.7/include/CGAL/Arr_non_caching_segment_basic_traits_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_non_caching_segment_basic_traits_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 // Ron Wein // (based on old version by: Iddo Hanniel, @@ -58,8 +54,8 @@ typedef typename Kernel::FT FT; private: - typedef Algebraic_structure_traits AST; - typedef typename AST::Is_exact FT_is_exact; + typedef Algebraic_structure_traits AST; + typedef typename AST::Is_exact FT_is_exact; public: typedef Boolean_tag Has_exact_division; @@ -71,16 +67,16 @@ // 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 //@{ @@ -100,13 +96,13 @@ /*! 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; @@ -115,13 +111,13 @@ /// \name Functor introduced here (based on the kernel) //@{ - /*! \class - * A functor for comparing two segments to the left of a point + /*! \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. @@ -132,9 +128,9 @@ * \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 + 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; @@ -156,10 +152,10 @@ 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 @@ -173,14 +169,14 @@ { return Compare_y_at_x_left_2(); } - + /*! \class - * A functor for comparing two segments to the right of a point. + * 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. @@ -194,7 +190,7 @@ Comparison_result operator()(const X_monotone_curve_2 & cv1, const X_monotone_curve_2 & cv2, - const Point_2 & p) const + const Point_2 & CGAL_precondition_code(p)) const { Kernel kernel; @@ -246,7 +242,7 @@ * \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 + * \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, diff -Nru cgal-4.7/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h cgal-4.8/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h --- cgal-4.7/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Ron Wein // (based on old version by Eyal Flato) @@ -49,9 +49,9 @@ // 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 = + 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 = + 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; @@ -72,10 +72,10 @@ } 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. + // from "6 o'clock", and to return its incident face. const Vertex_const_handle* vh = Result().template assign(obj); if (vh) { Halfedge_const_handle hh = _first_around_vertex(*vh); @@ -120,7 +120,7 @@ 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 = + 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(); @@ -128,7 +128,7 @@ 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 res = EQUAL; Comparison_result y_res; bool in_x_range; const typename Dcel::Halfedge* closest_he = NULL; // The closest so far. @@ -175,12 +175,12 @@ 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(), + 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())) @@ -189,10 +189,10 @@ 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(), + 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(), + compare_y_at_x_right(closest_he->curve(), eit->curve(), cl_vt->point()); } else { @@ -204,7 +204,7 @@ ((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) { @@ -306,7 +306,7 @@ closest_he = *p_hh; } } - + // Set the result for comparison according to the ray direction. const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); @@ -359,7 +359,7 @@ // 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) || @@ -396,8 +396,8 @@ bool found_lowest_left = false; bool found_top_right = false; - - typename Arrangement::Halfedge_around_vertex_const_circulator first = + + typename Arrangement::Halfedge_around_vertex_const_circulator first = v->incident_halfedges(); typename Arrangement::Halfedge_around_vertex_const_circulator curr = first; @@ -409,7 +409,7 @@ // of v. if (! found_lowest_left || (! curr->is_fictitious() && - compare_y_at_x_left(curr->curve(), lowest_left->curve(), + compare_y_at_x_left(curr->curve(), lowest_left->curve(), v->point()) == SMALLER)) { lowest_left = curr; @@ -421,7 +421,7 @@ // of v. if (! found_top_right || (! curr->is_fictitious() && - compare_y_at_x_right(curr->curve(), top_right->curve(), + compare_y_at_x_right(curr->curve(), top_right->curve(), v->point()) == LARGER)) { top_right = curr; @@ -433,7 +433,7 @@ } 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 + // 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(); diff -Nru cgal-4.7/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h cgal-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h --- cgal-4.7/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,17 +12,13 @@ // This file is provided 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 // Iddo Hanniel #ifndef CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H #define CGAL_TRAPEZOIDAL_DECOMPOSITION_2_H -//#define CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION +//#define CGAL_NO_TRAPEZOIDAL_DECOMPOSITION_2_OPTIMIZATION #include #include @@ -49,7 +45,7 @@ * Description Implementation for a planar trapezoidal map also known as * trapezoidal decomposition and vertical decomposition. * - * For requirements on Traits and X_curve classes see + * For requirements on Traits and X_curve classes see * Trapezoidal_decomposition_2 documentation. */ template < class Td_traits> @@ -67,7 +63,7 @@ class Base_map_item_iterator; class In_face_iterator; friend class In_face_iterator; - + //type of trapezoidal decomposition traits typedef Td_traits Traits; @@ -78,24 +74,24 @@ 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 + 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; @@ -110,7 +106,7 @@ //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; @@ -124,14 +120,14 @@ typedef typename Traits::Td_active_vertex Td_active_vertex; //type of Td_active_fictitious_vertex - typedef typename Traits::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 + typedef typename Traits::Td_inactive_fictitious_vertex Td_inactive_fictitious_vertex; //type of Curve end pair @@ -151,15 +147,15 @@ typedef std::map< int,Dag_node > Nodes_map; //type of trapezoids comparison function - for the map - typedef Td_map_item_handle_less + typedef Td_map_item_handle_less Td_map_item_ptr_less; - + //type of trapezoids ptr map - typedef std::map + typedef std::map Td_map_item_ptr_map; public: - + /*! \class Base_map_item_iterator * member of Trapezoidal_decomposition_2 * Description Implements a basic Trapezoid iterator @@ -194,7 +190,7 @@ { return !operator==(it); } - + Td_map_item& operator*() //const { CGAL_precondition(!traits->is_empty_item(m_cur_item)); @@ -205,7 +201,7 @@ { 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) @@ -230,29 +226,29 @@ public: //constructors - In_face_iterator(const Traits* traits_, Halfedge_const_handle sep, - boost::optional curr = boost::none) - :Base_map_item_iterator(traits_,curr), m_sep(sep->curve()) + In_face_iterator(const Traits* traits_, Halfedge_const_handle sep, + boost::optional 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 curr = boost::none) - :Base_map_item_iterator(traits_,curr), m_sep(sep) + In_face_iterator(const Traits* traits_, const X_monotone_curve_2& sep, + boost::optional curr = boost::none) + :Base_map_item_iterator(traits_,curr), m_sep(sep) { } - In_face_iterator(const In_face_iterator &it) + In_face_iterator(const In_face_iterator &it) :Base_map_item_iterator((Base_map_item_iterator&)it), - m_sep(it.m_sep) + m_sep(it.m_sep) { } //operatoror overloading bool operator==(const In_face_iterator &it) const { - return ( Base_map_item_iterator::operator==(it) && + 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 @@ -268,9 +264,9 @@ */ In_face_iterator& operator++() { - if (traits->is_empty_item(m_cur_item)) + if (traits->is_empty_item(m_cur_item)) return *this;// end reached, do nothing! - + #ifndef CGAL_TD_DEBUG CGAL_warning(traits != NULL); #else @@ -279,10 +275,10 @@ //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 + //if the map item is a trapezoid Td_active_trapezoid tr (boost::get(m_cur_item)); #ifndef CGAL_TD_DEBUG @@ -293,14 +289,14 @@ CGAL_assertion(tt); CGAL_assertion(!tt->is_inner_node()); #endif - + // handle degeneracies - typename Traits::Compare_curve_end_xy_2 compare_xy = + 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 + //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); } @@ -308,10 +304,10 @@ { //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 + //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 = + 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)) { @@ -325,13 +321,13 @@ // end reached m_cur_item = Td_map_item(0); break; - default: + default: m_cur_item = Td_map_item(0); break; } } } - else + else { //if the map item is an edge @@ -341,7 +337,7 @@ CGAL_assertion(tt->is_inner_node()); //go to next() of the current edge. - // as long as there is an edge fragment of the same + // 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(); @@ -351,18 +347,18 @@ // (skip points) while(traits->is_td_vertex(m_cur_item)) { - Dag_node* node = + 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; @@ -378,21 +374,21 @@ Td_active_trapezoid& trp() { CGAL_precondition (!traits->is_empty_item(m_cur_item)); - CGAL_precondition (traits->is_active(m_cur_item) && + CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_trapezoid(m_cur_item)); return boost::get(m_cur_item); } - Td_active_edge& e() + Td_active_edge& e() { CGAL_precondition (!traits->is_empty_item(m_cur_item)); - CGAL_precondition (traits->is_active(m_cur_item) && + CGAL_precondition (traits->is_active(m_cur_item) && traits->is_td_edge(m_cur_item)); return boost::get(m_cur_item); } }; - + /*! Visitors for accessing td map items methods */ class rb_visitor : public boost::static_visitor { @@ -401,7 +397,7 @@ { return t.rb(); } - + template < typename T > Td_map_item operator()(T& /* t */) const { @@ -414,19 +410,19 @@ { 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; }; @@ -438,7 +434,7 @@ { return t.rt(); } - + template < typename T > Td_map_item operator()(T& /* t */) const { @@ -451,12 +447,12 @@ { 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 { @@ -466,7 +462,7 @@ private: const Td_map_item& m_rt; }; - + class lb_visitor : public boost::static_visitor { public: @@ -487,18 +483,18 @@ { 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; }; @@ -512,7 +508,7 @@ { t.set_lt(m_lt); } - + template < typename T > void operator()(T& /*t*/) const { @@ -530,7 +526,7 @@ { return t.bottom(); } - + template < typename T > Halfedge_const_handle operator()(T& /*t*/) const { @@ -538,17 +534,17 @@ 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 { @@ -565,7 +561,7 @@ { return t.top(); } - + template < typename T > Halfedge_const_handle operator()(T& /* t */) const { @@ -573,17 +569,17 @@ return Halfedge_const_handle(); } }; - + class set_top_he_visitor : public boost::static_visitor { 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 { @@ -604,7 +600,7 @@ { return t.cw_he(); } - + template < typename T > Halfedge_const_handle operator()(T& /*t*/) const { @@ -612,12 +608,12 @@ return Halfedge_const_handle(); } }; - + class set_cw_he_visitor : public boost::static_visitor { 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); @@ -626,7 +622,7 @@ { t.set_cw_he(m_cw_he); } - + template < typename T > void operator()(T& /*t*/) const { @@ -661,7 +657,7 @@ { public: set_dag_node_visitor(Dag_node* node):m_node(node) {} - + void operator()(Td_nothing& /*t*/) const { CGAL_assertion(false); @@ -676,7 +672,7 @@ { t.set_dag_node(m_node); } - + private: Dag_node* m_node; }; @@ -716,15 +712,15 @@ { 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 > { @@ -794,7 +790,7 @@ }; ////MICHAL: currently not in use since split is implemented as removed and insert two - //struct Before_split_data + //struct Before_split_data //{ // X_monotone_curve_2 m_cv_before_split; // Td_map_item* m_p_old_t; @@ -803,61 +799,61 @@ // 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 + 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 = + 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 = + 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 = + 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 */ @@ -865,7 +861,7 @@ { 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); @@ -880,25 +876,25 @@ { return (traits->compare_curve_end_xy_2_object()(ce1, ce2) == SMALLER); } - + template bool is_end_point_left_low(const T& t, const Dag_node& node) const { - typename Traits::Compare_curve_end_xy_2 compare = + 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, + 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(), + 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 */ @@ -906,7 +902,7 @@ { 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); @@ -916,7 +912,7 @@ { 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); @@ -925,18 +921,18 @@ template bool is_end_point_right_top(const T& t, const Dag_node& node) const { - typename Traits::Compare_curve_end_xy_2 compare = + 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, + 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(), + return (compare(t, + boost::apply_visitor(point_for_vertex_visitor(), vtx_item)) == LARGER); } } @@ -949,47 +945,47 @@ 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, + 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(), + 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 + * \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) + * \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, + 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), + 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 - //{ + //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 + //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) ) { @@ -1008,10 +1004,10 @@ /*! * 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 + * \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) + * \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, @@ -1020,7 +1016,7 @@ { 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 @@ -1030,7 +1026,7 @@ // 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 @@ -1041,16 +1037,16 @@ // 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) && + 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) && + 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(left_item)); Td_active_trapezoid& right (boost::get(right_item)); @@ -1065,15 +1061,15 @@ 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 + // 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: @@ -1088,12 +1084,12 @@ Dag_node* node); //--------------------------------------------------------------------------- // Description: - // the opposite operation for spliting the trapezoid with - // vertical line through ce + // the opposite operation for spliting the trapezoid with + // vertical line through ce // Precondition: - // The root trapezoid is degenerate point (ce) and is active + // 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; @@ -1107,10 +1103,10 @@ // 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, + 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, + Td_map_item& prev_bottom_tr, + Td_map_item& prev_top_tr, Halfedge_const_handle he); @@ -1121,38 +1117,38 @@ // 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 + // 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 + // 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 he1, // Halfedge_const_handle he2); - + //----------------------------------------------------------------------------- // Description: // update map items traveled along an iterator till end reached @@ -1167,11 +1163,11 @@ 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 + // 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) @@ -1189,7 +1185,7 @@ ////------------------------------------------------------------------------- //// Description: - //// advances input Data structure using data structure,input point p and + //// 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) @@ -1199,16 +1195,16 @@ //// 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, + //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 + // 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) @@ -1223,10 +1219,10 @@ 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 + // 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) @@ -1241,10 +1237,10 @@ 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 + // 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) @@ -1258,19 +1254,19 @@ const Traits* traits, const Point& p, const X_monotone_curve_2* p_cv, - Comparison_result up = EQUAL) const; - - + 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), @@ -1283,7 +1279,7 @@ 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), @@ -1299,14 +1295,14 @@ } //MICHAL: problematic, should not be used - //Trapezoidal_decomposition_2(const Self& td) + //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)), + // 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) //{ @@ -1322,7 +1318,7 @@ // //! \todo Reduce the 3 iterations to 1 (or 2) iterator. // // First iteration: filter out the active trapezoids. // typename std::vector::const_iterator it; - // for (it = vtr.begin(); it != vtr.end(); ++it) + // for (it = vtr.begin(); it != vtr.end(); ++it) // { // Dag_node* ds_copy = new Dag_node(*it); // const Td_map_item* cur = &*it; @@ -1334,55 +1330,55 @@ // 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) + // + // 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() ? + // 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() ? + // tr_copy->set_lt(cur->lt() ? // htr.find(cur->lt())->second : NULL); - // tr_copy->set_lb(cur->lb() ? + // tr_copy->set_lb(cur->lb() ? // htr.find(cur->lb())->second : NULL); - // if (cur->dag_node()->is_inner_node()) + // 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))) + // 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 + // // 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 + 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. @@ -1393,29 +1389,29 @@ // 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 + // First it randomly shuffles the container and then it inserts the Halfedges // according to the new order // Precondition: the data structure is empty template void insert(Halfedge_iterator begin, Halfedge_iterator end) { - //Precondition: the data structure is empty + //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 + + //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) { @@ -1423,12 +1419,12 @@ //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()) + if (do_rebuild && not_within_limits()) { std::cout << "starting over after " << number_of_curves() << std::flush; start_over = true; @@ -1437,11 +1433,11 @@ } he_cst = *it; - insert(he_cst); + 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)? @@ -1451,18 +1447,18 @@ } } - //enable the rebuild from within the halfedge insert + //enable the rebuild from within the halfedge insert set_with_guarantees(do_rebuild); } - + // removal functions - + //--------------------------------------------------------------------------- // Description: // void remove(Halfedge_const_handle he); - + ////------------------------------------------------------------------------- //// Description: //// @@ -1471,24 +1467,24 @@ //{ // if(begin == end) // return; - // + // // std::random_shuffle(begin,end); - // + // // curve_iterator it=begin,next=it; - // while(it!=end) + // while(it!=end) // { // ++next; // remove(*it); // it=next; // } //} - + void clear() { delete m_dag_root; init(); } - + // //------------------------------------------------------------------------- // // Description: @@ -1501,32 +1497,32 @@ // // 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 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; // } @@ -1543,39 +1539,39 @@ { //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 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. @@ -1587,37 +1583,37 @@ // 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, + + //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. @@ -1635,16 +1631,16 @@ //--------------------------------------------------------------------------- // 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& cv1, // const X_monotone_curve_2& cv2); ////MICHAL: commented due to inefficient depth update, remove and insert instead @@ -1656,53 +1652,54 @@ //// 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 + //// 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 + //// 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, + //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) + + 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 || + 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 = + m_trts_adaptor = static_cast (arr->geometry_traits()); - + if (allocate_traits) traits = new Td_traits(*m_trts_adaptor); } - - - + + + #ifdef CGAL_TD_DEBUG /*------------------------------------------------------------------ description: @@ -1712,7 +1709,7 @@ { if ( !ds ) return true; if (ds->is_valid(traits) && ds->dag_node() && - is_valid(ds.left_child()) && is_valid(ds.right_child())) + is_valid(ds.left_child()) && is_valid(ds.right_child())) return true; CGAL_warning(ds->is_valid(traits)); CGAL_warning(ds->dag_node()); @@ -1736,12 +1733,12 @@ // x.debug(); //MICHAL: will not work! //} #endif - + /*------------------------------------------------------------------ description: - Rebuilds the trapezoid data structure by reinserting the curves + 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. ------------------------------------------------------------------*/ @@ -1757,17 +1754,17 @@ #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::iterator + // typename std::vector::iterator // it = container.begin(), // it_end = container.end(); - // while(it!=it_end) + // while(it!=it_end) // { // insert(*it); // ++it; @@ -1778,7 +1775,7 @@ //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(); @@ -1789,21 +1786,21 @@ CGAL_assertion(number_of_curves() == rep); } #endif - + container.clear(); return *this; } - - /* - Input: + + /* + Input: a list of pointers to Td_map_items and a Td_map_item boolean predicate. - Output: + Output: void Postcondition: the list pointers correspond to all the Td_map_items in the data - structure for which the predicate value is true. + structure for which the predicate value is true. */ - + template void filter(Container& c, const Predicate& pr, const Dag_node * ds) const { @@ -1819,7 +1816,7 @@ ////MICHAL: not in use //template - //unsigned long Td_map_item_filter(Container& container, + //unsigned long Td_map_item_filter(Container& container, // const Dag_node* ds) const ///* Return a container for all active map items */ //{ @@ -1828,7 +1825,7 @@ //} template - unsigned long Halfedge_filter(Halfedge_container& container, + unsigned long Halfedge_filter(Halfedge_container& container, const Dag_node* ds) const /* Return a container for all active curves */ { @@ -1836,13 +1833,13 @@ std::list 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) { @@ -1850,9 +1847,9 @@ std::cerr << "\nrepresentatives.size()=" << rep; CGAL_assertion(number_of_curves()==representatives.size()); } - + #endif - + if (sz > 0) { typename std::list::iterator it = representatives.begin(), @@ -1871,9 +1868,9 @@ } return sz; } - - - + + + /*------------------------------------------------------------------ Input: None Output: bool @@ -1883,7 +1880,7 @@ 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 + size is more then SizeThreshold times the log of the last count. */ bool set_with_guarantees(bool u) @@ -1893,14 +1890,14 @@ return old; } - //This method occasionaly(!) checks the guarantees + //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() + 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(std::rand()) > + if (static_cast(std::rand()) > RAND_MAX / ( num_of_cv + 1)) return false; /* INTERNAL COMPILER ERROR overide @@ -1909,10 +1906,10 @@ #ifdef CGAL_TD_REBUILD_DEBUG std::cout << "\n|heavy!" << std::flush; #endif - + return not_within_limits(); } - + /*------------------------------------------------------------------ input: None output: bool @@ -1926,55 +1923,55 @@ bool update() { //if the structure violates the guarantees - rebuild - if (not_within_limits()) //needs_update()) + if (not_within_limits()) //needs_update()) { - rebuild(); + 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() > + 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 + + /* 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 + + /* sets the internal size threshold constant to the parameter and returns its reference */ void size_threshold(const double& size_th) { @@ -2007,35 +2004,35 @@ 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; + 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, + Dag_node& min_node, bool plus_inf, Dag_node& max_node, Dag_node& node); - + void init() { // traits may be initialized later @@ -2043,21 +2040,21 @@ //(*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_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; @@ -2091,10 +2088,10 @@ // { // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); // } - // else - // { + // 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); @@ -2109,28 +2106,28 @@ // { // res = traits->equal_curve_end_2_object()(ce, *(boost::apply_visitor(curve_end_for_fict_vertex_visitor(),item))); // } - // else - // { + // 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)) + if (traits->is_td_vertex(item)) lt=POINT; else { - Td_active_trapezoid tr (boost::get(item)); + Td_active_trapezoid tr (boost::get(item)); lt = tr.is_on_boundaries()? UNBOUNDED_TRAPEZOID : TRAPEZOID; } } else item = locate(ce,lt); } - + #endif @@ -2155,7 +2152,7 @@ { 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) @@ -2197,27 +2194,27 @@ out << " , y -> +oo " << std::endl; else out << " , y -> -oo " << std::endl; - + } } void print_dag_addresses(const Dag_node& curr) const { - + std::cout << "----------------- DAG ----------------" <is_td_vertex(item)) - { + { out << " POINT : " ; - + // if the map item represents a fictitious vertex if (traits->is_fictitious_vertex(item)) { @@ -2251,13 +2248,13 @@ 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 + // 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())) @@ -2285,17 +2282,17 @@ } } -public: +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: diff -Nru cgal-4.7/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h cgal-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h --- cgal-4.7/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -221,6 +221,8 @@ { 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(&trpz_node.get_data()) ) + trap->clear_neighbors(); trpz_node.set_data(Td_inactive_trapezoid()); if (active_node) trpz_node.set_left_child(*active_node); diff -Nru cgal-4.7/include/CGAL/Arr_polycurve_basic_traits_2.h cgal-4.8/include/CGAL/Arr_polycurve_basic_traits_2.h --- cgal-4.7/include/CGAL/Arr_polycurve_basic_traits_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_polycurve_basic_traits_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -91,7 +92,19 @@ * 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){ } + 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 @@ -721,14 +734,23 @@ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv) const { - // 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. const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - return geom_traits->compare_y_at_x_2_object()(p, xcv[i]); + 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 @@ -1037,7 +1059,7 @@ std::vector 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.begin_subcurves(); sit != xcv.end_subcurves(); ++sit) + 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()); } @@ -1779,7 +1801,7 @@ { const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); typename X_monotone_curve_2::Subcurve_const_iterator it; - for (it = xcv.begin_subcurves(); it != xcv.end_subcurves(); ++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; } @@ -1824,7 +1846,7 @@ { const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); typename X_monotone_curve_2::Subcurve_const_iterator it; - for (it = xcv.begin_subcurves(); it != xcv.end_subcurves(); ++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; } diff -Nru cgal-4.7/include/CGAL/Arr_polycurve_traits_2.h cgal-4.8/include/CGAL/Arr_polycurve_traits_2.h --- cgal-4.7/include/CGAL/Arr_polycurve_traits_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_polycurve_traits_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -208,7 +208,7 @@ // that each Object wraps an x-monotone subcurve. std::vector x_seg_objects; const_seg_iterator it_segs; - for (it_segs = cv.begin_subcurves(); it_segs != cv.end_subcurves(); + 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::iterator it = x_seg_objects.begin(); @@ -349,7 +349,7 @@ // that each Object wraps an x-monotone subcurve. std::vector x_seg_objects; const_seg_iterator it_segs; - for (it_segs = cv.begin_subcurves(); it_segs != cv.end_subcurves(); + 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::iterator it = x_seg_objects.begin(); diff -Nru cgal-4.7/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h cgal-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h --- cgal-4.7/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,9 +12,6 @@ // This file is provided 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 // Ron Wein @@ -523,7 +520,12 @@ Arr_spherical_topology_traits_2:: 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) + 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) { @@ -560,7 +562,11 @@ locate_around_boundary_vertex(Vertex* v, const X_monotone_curve_2& xc, Arr_curve_end ind, - Arr_parameter_space ps_x, + 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; @@ -583,7 +589,12 @@ template CGAL::Object Arr_spherical_topology_traits_2:: locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind, - Arr_parameter_space ps_x, Arr_parameter_space ps_y) + 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) { diff -Nru cgal-4.7/include/CGAL/assertions.h cgal-4.8/include/CGAL/assertions.h --- cgal-4.7/include/CGAL/assertions.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/assertions.h 2016-04-04 19:00:12.000000000 +0000 @@ -80,6 +80,7 @@ #if defined(CGAL_NO_ASSERTIONS) # define CGAL_assertion(EX) (static_cast(0)) +# define CGAL_destructor_assertion(EX) (static_cast(0)) # define CGAL_assertion_msg(EX,MSG) (static_cast(0)) # define CGAL_assertion_code(CODE) # ifdef CGAL_ASSUME @@ -92,6 +93,8 @@ #else // no CGAL_NO_ASSERTIONS # define CGAL_assertion(EX) \ (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) +# define CGAL_destructor_assertion(EX) \ + (CGAL::possibly(EX)||std::uncaught_exception()?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__)) # define CGAL_assertion_msg(EX,MSG) \ (CGAL::possibly(EX)?(static_cast(0)): ::CGAL::assertion_fail( # EX , __FILE__, __LINE__, MSG)) # define CGAL_assertion_code(CODE) CODE @@ -343,4 +346,8 @@ // But the macros need CGAL::possibly(). #include +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_ASSERTIONS_H diff -Nru cgal-4.7/include/CGAL/assertions_impl.h cgal-4.8/include/CGAL/assertions_impl.h --- cgal-4.7/include/CGAL/assertions_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/assertions_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include + +#include +#include + +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 -Nru cgal-4.7/include/CGAL/atomic.h cgal-4.8/include/CGAL/atomic.h --- cgal-4.7/include/CGAL/atomic.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/atomic.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HAS_THREADS + +# ifdef CGAL_CAN_USE_CXX11_ATOMIC +# include +# define CGAL_ATOMIC_NS std +# else // not CGAL_CAN_USE_CXX11_ATOMIC +# if BOOST_VERSION >= 105300 +# include +# 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 -Nru cgal-4.7/include/CGAL/auto_link/auto_link.h cgal-4.8/include/CGAL/auto_link/auto_link.h --- cgal-4.7/include/CGAL/auto_link/auto_link.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/auto_link/auto_link.h 2016-04-04 19:00:11.000000000 +0000 @@ -83,6 +83,7 @@ ***************************************************************************/ #ifndef CGAL_NO_AUTOLINK +#ifndef CGAL_HEADER_ONLY // header only = no CGAL library #ifdef __cplusplus # ifndef BOOST_CONFIG_HPP @@ -411,6 +412,7 @@ #endif // _MSC_VER || __BORLANDC__ +#endif // CGAL_HEADER_ONLY #endif // CGAL_NO_AUTOLINK // diff -Nru cgal-4.7/include/CGAL/auto_link/CGALQt3.h cgal-4.8/include/CGAL/auto_link/CGALQt3.h --- cgal-4.7/include/CGAL/auto_link/CGALQt3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/auto_link/CGALQt3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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@geometryfactry.com) - -#ifndef CGAL_AUTO_LINK_CGALQT_H -#define CGAL_AUTO_LINK_CGALQT_H - -#include - -#ifndef CGAL_NO_AUTOLINK_CGALQT - -#define CGAL_LIB_NAME CGAL_Qt3 -#include - -#endif // CGAL_NO_AUTOLINK_CGALQT - -#endif // CGAL_AUTO_LINK_CGALQT_H diff -Nru cgal-4.7/include/CGAL/Barycentric_mapping_parameterizer_3.h cgal-4.8/include/CGAL/Barycentric_mapping_parameterizer_3.h --- cgal-4.7/include/CGAL/Barycentric_mapping_parameterizer_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Barycentric_mapping_parameterizer_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include /// \file Barycentric_mapping_parameterizer_3.h @@ -58,7 +59,7 @@ \sa `CGAL::Fixed_border_parameterizer_3` \sa `CGAL::Discrete_authalic_parameterizer_3` \sa `CGAL::Discrete_conformal_map_parameterizer_3` -\sa `CGAL::LSCM_parameterizer_3` +\sa `CGAL::LSCM_parameterizer_3` \sa `CGAL::Mean_value_coordinates_parameterizer_3` */ @@ -68,7 +69,7 @@ class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Barycentric_mapping_parameterizer_3 : public Fixed_border_parameterizer_3 // (based on old version by Tali Zvi) @@ -44,8 +44,8 @@ #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_NEW_EVENT(p, e) +#define CGAL_PRINT_UPDATE_EVENT(p, e) #define CGAL_PRINT(a) #else @@ -56,7 +56,7 @@ #define CGAL_PRINT_INSERT(a) { std::cout << "+++ inserting "; \ (a)->Print(); \ std::cout << " currentPos = "; \ - PrintEvent(this->m_currentEvent); \ + this->PrintEvent(this->m_currentEvent); \ std::cout << std::endl; \ } #define CGAL_PRINT_ERASE(a) { std::cout << "--- erasing "; \ @@ -73,7 +73,7 @@ namespace CGAL { -/*! \class Basic_Sweep_line_2 +/*! \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). @@ -103,20 +103,20 @@ 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, + (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, + 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 Compare_events; - typedef Multiset Event_queue; + typedef Multiset Event_queue; typedef typename Event_queue::iterator Event_queue_iterator; typedef typename Event::Subcurve_iterator @@ -124,11 +124,11 @@ typedef Sweep_line_event Base_event; typedef typename Base_event::Attribute Attribute; - + typedef Sweep_line_subcurve Base_subcurve; typedef class Curve_comparer Compare_curves; typedef Multiset Status_line; typedef typename Status_line::iterator Status_line_iterator; @@ -180,7 +180,7 @@ // 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 + // the interior of existing curve. This // may happen only with events that are // associated with isolated query points. @@ -231,7 +231,7 @@ m_visitor ->after_sweep(); } - /*! Run the sweep-line algorithm on a range of x-monotone curves and a range + /*! 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 @@ -258,7 +258,7 @@ m_visitor ->after_sweep(); } - /*! Run the sweep-line alogrithm on a range of x-monotone curves, a range + /*! 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). @@ -267,8 +267,8 @@ * \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 + * \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 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)) {} + Bbox_2() + : rep(CGAL::make_array(std::numeric_limits::infinity(), + std::numeric_limits::infinity(), + - std::numeric_limits::infinity(), + - std::numeric_limits::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; @@ -166,7 +172,7 @@ std::ostream& operator<<(std::ostream &os, const Bbox_2 &b) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : os << b.xmin() << ' ' << b.ymin() << ' ' << b.xmax() << ' ' << b.ymax(); @@ -177,6 +183,7 @@ write(os, b.xmax()); write(os, b.ymax()); break; + case IO::PRETTY : default: os << "Bbox_2(" << b.xmin() << ", " << b.ymin() << ", " << b.xmax() << ", " << b.ymax() << ")"; @@ -189,9 +196,12 @@ std::istream& operator>>(std::istream &is, Bbox_2 &b) { - double xmin, ymin, xmax, ymax; - - switch(is.iword(IO::mode)) { + 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; @@ -201,6 +211,8 @@ read(is, xmax); read(is, ymax); break; + case IO::PRETTY : + break; } if (is) b = Bbox_2(xmin, ymin, xmax, ymax); diff -Nru cgal-4.7/include/CGAL/Bbox_2_Line_2_intersection.h cgal-4.8/include/CGAL/Bbox_2_Line_2_intersection.h --- cgal-4.7/include/CGAL/Bbox_2_Line_2_intersection.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Bbox_2_Line_2_intersection.h 2016-04-04 19:00:11.000000000 +0000 @@ -96,4 +96,8 @@ } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif diff -Nru cgal-4.7/include/CGAL/Bbox_2_Line_2_intersection_impl.h cgal-4.8/include/CGAL/Bbox_2_Line_2_intersection_impl.h --- cgal-4.7/include/CGAL/Bbox_2_Line_2_intersection_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Bbox_2_Line_2_intersection_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +typedef CGAL::Simple_cartesian 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 -Nru cgal-4.7/include/CGAL/Bbox_3.h cgal-4.8/include/CGAL/Bbox_3.h --- cgal-4.7/include/CGAL/Bbox_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Bbox_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -45,11 +45,19 @@ typedef Simple_cartesian 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)) {} + Bbox_3() + : rep(CGAL::make_array( std::numeric_limits::infinity(), + std::numeric_limits::infinity(), + std::numeric_limits::infinity(), + - std::numeric_limits::infinity(), + - std::numeric_limits::infinity(), + - std::numeric_limits::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; @@ -184,7 +192,7 @@ std::ostream& operator<<(std::ostream &os, const Bbox_3& b) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << b.xmin() << ' ' << b.ymin() << ' ' << b.zmin() @@ -197,6 +205,7 @@ write(os, b.ymax()); write(os, b.zmax()); return os; + case IO::PRETTY : default: os << "Bbox_3((" << b.xmin() << ", " << b.ymin() @@ -212,9 +221,14 @@ std::istream& operator>>(std::istream &is, Bbox_3& b) { - double xmin, ymin, zmin, xmax, ymax, zmax; + double xmin = 0; + double ymin = 0; + double zmin = 0; + double xmax = 0; + double ymax = 0; + double zmax = 0; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> iformat(xmin) >> iformat(ymin) >> iformat(zmin) @@ -228,6 +242,8 @@ read(is, ymax); read(is, zmax); break; + case IO::PRETTY : + break; } if (is) b = Bbox_3(xmin, ymin, zmin, xmax, ymax, zmax); diff -Nru cgal-4.7/include/CGAL/bilateral_smooth_point_set.h cgal-4.8/include/CGAL/bilateral_smooth_point_set.h --- cgal-4.7/include/CGAL/bilateral_smooth_point_set.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/bilateral_smooth_point_set.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include @@ -469,7 +469,7 @@ Tree tree(treeElements.begin(), treeElements.end()); // Guess spacing #ifdef CGAL_PSP3_VERBOSE - CGAL::Timer task_timer; + CGAL::Real_timer task_timer; task_timer.start(); #endif FT guess_neighbor_radius = 0.0; @@ -499,7 +499,10 @@ std::vector > pwns_neighbors; pwns_neighbors.resize(nb_points); -#ifdef CGAL_LINKED_WITH_TBB +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else if (boost::is_convertible::value) { Compute_pwns_neighbors f(k, tree, pwns, pwns_neighbors); diff -Nru cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h --- cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h 2016-04-04 19:00:11.000000000 +0000 @@ -115,8 +115,9 @@ this->m_visitor->before_sweep(); // Allocate all of the Subcurve objects as one block. this->m_num_of_subCurves = static_cast(std::distance (curves_begin, curves_end)); - this->m_subCurves = - this->m_subCurveAlloc.allocate (this->m_num_of_subCurves); + 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); diff -Nru cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h --- cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h 2016-04-04 19:00:11.000000000 +0000 @@ -32,23 +32,44 @@ namespace CGAL { +template +class Gps_halfedge_base : public Arr_halfedge_base +{ + int _flag; +public: + + typedef Arr_halfedge_base 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) + m_info(0), + _id(-1) {} /*! Assign from another face. */ @@ -86,14 +107,41 @@ 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 Gps_default_dcel : public Arr_dcel_base, - Arr_halfedge_base, - Gps_face_base> + Gps_halfedge_base, + Gps_face_base > { public: /*! Default constructor. */ diff -Nru cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h --- cgal-4.7/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -36,6 +36,9 @@ #include #include #include +#include + +#include /*! \file Gps_on_surface_base_2.h @@ -928,23 +931,329 @@ 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) { - for (Edge_iterator itr = arr->edges_begin(); itr != arr->edges_end(); ) + // 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 UF_faces; + std::vector 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; - if (he->face()->contained() == he->twin()->face()->contained()) + 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) ) { - Edge_iterator next = itr; - ++next; - arr->remove_edge(he); - itr = next; + 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 - ++itr; + 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 halfedges_that_was_on_an_outer_ccb; + // bitset indicating if the outer_ccb of a face was already set + std::vector 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 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; inext()->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(ptr)->outer_ccb() ); + BOOST_FOREACH(void* ptr, (*it)->_inner_ccbs()) + inner_ccbs_to_remove.push_back( static_cast(ptr)->inner_ccb() ); + (*it)->_outer_ccbs().clear(); + (*it)->_inner_ccbs().clear(); + } + + // accessor for low-level arrangement fonctionalities + CGAL::Arr_accessor 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; diff -Nru cgal-4.7/include/CGAL/boost/graph/convert_surface_mesh.h cgal-4.8/include/CGAL/boost/graph/convert_surface_mesh.h --- cgal-4.7/include/CGAL/boost/graph/convert_surface_mesh.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/convert_surface_mesh.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include + +namespace CGAL { + + template + void convert_surface_mesh(const SourceMesh& sm, TargetMesh& tm, V2V& v2v, H2H& h2h) +{ + typedef typename boost::graph_traits::vertex_descriptor sm_vertex_descriptor; + typedef typename boost::graph_traits::vertex_descriptor tm_vertex_descriptor; + + typedef typename boost::graph_traits::face_descriptor sm_face_descriptor; + typedef typename boost::graph_traits::face_descriptor tm_face_descriptor; + + typedef typename boost::graph_traits::halfedge_descriptor sm_halfedge_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor tm_halfedge_descriptor; + + typedef typename boost::property_map::const_type sm_PMap; + typedef typename boost::property_map::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 f2f; + BOOST_FOREACH(sm_face_descriptor sfd, faces(sm)){ + std::vector 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::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 -Nru cgal-4.7/include/CGAL/boost/graph/dijkstra_shortest_paths.h cgal-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.h --- cgal-4.7/include/CGAL/boost/graph/dijkstra_shortest_paths.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.h 2016-04-04 19:00:11.000000000 +0000 @@ -21,6 +21,9 @@ #ifndef CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H #define CGAL_BOOST_GRAPH_DIJKSTRA_SHORTEST_PATHS_H +// This will push/pop a VC15 warning +#include + #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp cgal-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp --- cgal-4.7/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp 2016-04-04 19:00:11.000000000 +0000 @@ -75,7 +75,8 @@ template struct DijkstraVisitorConcept { void constraints() { - BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept )); +// commented to avoid an unused vaiable warning +// BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept )); vis.initialize_vertex(u, g); vis.discover_vertex(u, g); vis.examine_vertex(u, g); diff -Nru cgal-4.7/include/CGAL/boost/graph/Euler_operations.h cgal-4.8/include/CGAL/boost/graph/Euler_operations.h --- cgal-4.7/include/CGAL/boost/graph/Euler_operations.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/Euler_operations.h 2016-04-04 19:00:11.000000000 +0000 @@ -146,6 +146,12 @@ 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); @@ -926,7 +932,6 @@ 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); @@ -934,16 +939,16 @@ 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); + internal::set_border(he1,g); + internal::set_border(he2,g); CGAL::Halfedge_around_face_iterator hafib,hafie; - for(boost::tie(hafib, hafie) = halfedges_around_face(he1, g); + for(boost::tie(hafib, hafie) = halfedges_around_face(ohe1, g); hafib != hafie; ++hafib){ set_face(*hafib, f, g); } - set_halfedge(f, he1, g); + set_halfedge(f, ohe1, g); return ohe2; } diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_concepts.h cgal-4.8/include/CGAL/boost/graph/graph_concepts.h --- cgal-4.7/include/CGAL/boost/graph/graph_concepts.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_concepts.h 2016-04-04 19:00:11.000000000 +0000 @@ -33,9 +33,9 @@ BOOST_CONCEPT_USAGE(HalfedgeGraph) { - BOOST_CONCEPT_ASSERT((boost::DefaultConstructible)); - BOOST_CONCEPT_ASSERT((boost::EqualityComparable)); - BOOST_CONCEPT_ASSERT((boost::Assignable)); + BOOST_CONCEPT_ASSERT((boost::DefaultConstructible)) CGAL_UNUSED; + BOOST_CONCEPT_ASSERT((boost::EqualityComparable)) CGAL_UNUSED; + BOOST_CONCEPT_ASSERT((boost::Assignable)) CGAL_UNUSED; e = edge(h, g); @@ -105,9 +105,9 @@ BOOST_CONCEPT_USAGE(FaceGraph) { - BOOST_CONCEPT_ASSERT((boost::DefaultConstructible)); - BOOST_CONCEPT_ASSERT((boost::EqualityComparable)); - BOOST_CONCEPT_ASSERT((boost::Assignable)); + BOOST_CONCEPT_ASSERT((boost::DefaultConstructible)) CGAL_UNUSED; + BOOST_CONCEPT_ASSERT((boost::EqualityComparable)) CGAL_UNUSED; + BOOST_CONCEPT_ASSERT((boost::Assignable)) CGAL_UNUSED; f = face(h, g); h = halfedge(f, g); diff -Nru cgal-4.7/include/CGAL/boost/graph/Graph_geometry.h cgal-4.8/include/CGAL/boost/graph/Graph_geometry.h --- cgal-4.7/include/CGAL/boost/graph/Graph_geometry.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/Graph_geometry.h 2016-04-04 19:00:11.000000000 +0000 @@ -199,7 +199,7 @@ typename boost::graph_traits::halfedge_descriptor h, const PositionMap& pm) { - BOOST_CONCEPT_ASSERT((HalfedgeGraphConcept)); + BOOST_CONCEPT_ASSERT((HalfedgeGraphConcept)) CGAL_UNUSED; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h cgal-4.8/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_CombinatorialMap.h 2016-04-04 19:00:11.000000000 +0000 @@ -22,6 +22,9 @@ #include #include +// include this to avoid a VC15 warning +#include + #include #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h cgal-4.8/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -20,6 +20,9 @@ #ifndef CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H #define CGAL_GRAPH_TRAITS_DELAUNAY_TRIANGULATION_2_H +// include this to avoid a VC15 warning +#include + #include #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h cgal-4.8/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_HalfedgeDS.h 2016-04-04 19:00:11.000000000 +0000 @@ -22,6 +22,9 @@ #include +// include this to avoid a VC15 warning +#include + #include #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h cgal-4.8/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h 2016-04-04 19:00:11.000000000 +0000 @@ -20,6 +20,9 @@ #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 + #include #include @@ -355,6 +358,9 @@ halfedge(typename boost::graph_traits >::vertex_descriptor v, const OpenMesh::PolyMesh_ArrayKernelT& sm) { + if(sm.halfedge_handle(v) == boost::graph_traits >::null_halfedge()){ + return boost::graph_traits >::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)); @@ -612,7 +618,7 @@ sm.status(f).set_deleted(true); } - +#if 0 // conflits with function in Euler_operations.h template std::pair >::edge_descriptor, bool> @@ -622,6 +628,7 @@ return sm.new_edge(v1, v2); } +#endif template typename boost::graph_traits >::face_descriptor @@ -647,6 +654,25 @@ } // 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 +void clear(OpenMesh::PolyMesh_ArrayKernelT& 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 diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_Surface_mesh.h cgal-4.8/include/CGAL/boost/graph/graph_traits_Surface_mesh.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_Surface_mesh.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_Surface_mesh.h 2016-04-04 19:00:11.000000000 +0000 @@ -20,6 +20,9 @@ #ifndef CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H #define CGAL_BOOST_GRAPH_TRAITS_SURFACE_MESH_H +// include this to avoid a VC15 warning +#include + #include #include @@ -512,7 +515,7 @@ } template -bool is_valid(CGAL::Surface_mesh

    & sm, bool verbose = false) +bool is_valid(const CGAL::Surface_mesh

    & sm, bool verbose = false) { return sm.is_valid(verbose); } diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_Triangulation_2.h cgal-4.8/include/CGAL/boost/graph/graph_traits_Triangulation_2.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_Triangulation_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_Triangulation_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -22,6 +22,9 @@ #include +// include this to avoid a VC15 warning +#include + #include #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h cgal-4.8/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h --- cgal-4.7/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +// 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 +struct graph_traits< OpenMesh::TriMesh_ArrayKernelT > +{ +private: + typedef OpenMesh::TriMesh_ArrayKernelT 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 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::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 in_edge_iterator; + + typedef CGAL::Out_edge_iterator 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 +struct graph_traits< const OpenMesh::TriMesh_ArrayKernelT > + : public graph_traits< OpenMesh::TriMesh_ArrayKernelT > +{ }; + +} // namespace boost + +namespace OpenMesh { + +template +typename boost::graph_traits >::vertices_size_type +num_vertices(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.n_vertices(); +} + + +template +typename boost::graph_traits >::edges_size_type +num_edges(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.n_edges(); +} + + +template +typename boost::graph_traits >::degree_size_type +degree(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.valence(v); +} + + +template +typename boost::graph_traits >::degree_size_type +out_degree(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.valence(v); +} + + +template +typename boost::graph_traits >::degree_size_type +in_degree(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.valence(v); +} + + +template +typename boost::graph_traits >::vertex_descriptor +source(typename boost::graph_traits >::edge_descriptor e, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.from_vertex_handle(e.halfedge()); +} + +template +typename boost::graph_traits >::vertex_descriptor +source(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.from_vertex_handle(h); +} + + +template +typename boost::graph_traits >::vertex_descriptor +target(typename boost::graph_traits >::edge_descriptor e, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.to_vertex_handle(e.halfedge()); +} + +template +typename boost::graph_traits >::vertex_descriptor +target(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.to_vertex_handle(h); +} + +template +CGAL::Iterator_range >::vertex_iterator> +vertices(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return CGAL::make_range(sm.vertices_sbegin(), sm.vertices_end()); +} + + +template +CGAL::Iterator_range >::edge_iterator> +edges(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typedef typename boost::graph_traits >::edge_iterator iterator; + iterator beg(sm.edges_sbegin()); + iterator end(sm.edges_end()); + return CGAL::make_range(beg,end); +} + + +template +CGAL::Iterator_range >::in_edge_iterator> +in_edges(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typedef typename boost::graph_traits >::in_edge_iterator Iter; + + return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1)); +} + + +template +CGAL::Iterator_range >::out_edge_iterator> +out_edges(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typedef typename boost::graph_traits >::out_edge_iterator Iter; + return CGAL::make_range(Iter(halfedge(v,sm),sm), Iter(halfedge(v,sm),sm,1)); +} + + +template +std::pair >::edge_descriptor, + bool> +edge(typename boost::graph_traits >::vertex_descriptor u, + typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) { + typename boost::graph_traits >::edge_descriptor + he(sm.find_halfedge(u, v)); + return std::make_pair(he, he.is_valid()); +} + + +// +// HalfedgeGraph +// +template +typename boost::graph_traits >::halfedge_descriptor +next(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.next_halfedge_handle(h); +} + +template +typename boost::graph_traits >::halfedge_descriptor +prev(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.prev_halfedge_handle(h); +} + +template +typename boost::graph_traits >::halfedge_descriptor +opposite(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.opposite_halfedge_handle(h); +} + +template +typename boost::graph_traits >::edge_descriptor +edge(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& /*sm*/) +{ + return typename boost::graph_traits >::edge_descriptor(h); +} + +template +typename boost::graph_traits >::halfedge_descriptor +halfedge(typename boost::graph_traits >::edge_descriptor e, + const OpenMesh::TriMesh_ArrayKernelT&) +{ + return e.halfedge(); +} + +template +typename boost::graph_traits >::halfedge_descriptor +halfedge(typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + if(sm.halfedge_handle(v) == boost::graph_traits >::null_halfedge()){ + return boost::graph_traits >::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 +std::pair< + typename boost::graph_traits >::halfedge_descriptor, + bool +> +halfedge(typename boost::graph_traits >::vertex_descriptor u, + typename boost::graph_traits >::vertex_descriptor v, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typename boost::graph_traits >::halfedge_descriptor h = sm.find_halfedge(u, v); + return std::make_pair(h, h.is_valid()); +} + + + +// +// HalfedgeListGraph +// +template +CGAL::Iterator_range >::halfedge_iterator> +halfedges(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return CGAL::make_range(sm.halfedges_sbegin(), sm.halfedges_end()); +} + +template +typename boost::graph_traits >::halfedges_size_type +num_halfedges(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.n_halfedges(); +} + + + +// +// MutableHalfedgeGraph +// +template +void +set_next(typename boost::graph_traits >::halfedge_descriptor h1, + typename boost::graph_traits >::halfedge_descriptor h2, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.set_next_halfedge_handle(h1, h2); +} + + + +template +void +set_target(typename boost::graph_traits >::halfedge_descriptor h, + typename boost::graph_traits >::vertex_descriptor v, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.set_vertex_handle(h, v); +} + + +template +void +set_halfedge(typename boost::graph_traits >::vertex_descriptor v, + typename boost::graph_traits >::halfedge_descriptor h, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.set_halfedge_handle(v, sm.opposite_halfedge_handle(h)); +} + + +template +void +adjust_border_halfedge(typename boost::graph_traits >::vertex_descriptor v, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.adjust_outgoing_halfedge(v); +} + +template +void +garbage_collection(OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.garbage_collection(); +} + +template +typename boost::graph_traits >::edge_descriptor +add_edge(OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return edge(sm.new_edge(boost::graph_traits >::null_vertex(), + boost::graph_traits >::null_vertex() ), sm); +} + + +// +// FaceGraph +// +template +typename boost::graph_traits >::halfedge_descriptor +halfedge(typename boost::graph_traits >::face_descriptor f, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.halfedge_handle(f); +} + +template +typename boost::graph_traits >::face_descriptor +face(typename boost::graph_traits >::halfedge_descriptor h, + const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.face_handle(h); +} + + + +// +// MutableFaceGraph +// +template +void +set_face(typename boost::graph_traits >::halfedge_descriptor h, + typename boost::graph_traits >::face_descriptor f, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.set_face_handle(h, f); +} + + +template +void +set_halfedge(typename boost::graph_traits >::face_descriptor f, + typename boost::graph_traits >::halfedge_descriptor h, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.set_halfedge_handle(f, h); +} + + +// +// FaceListGraph +// +template +typename boost::graph_traits >::faces_size_type +num_faces(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.n_faces(); +} + +template +CGAL::Iterator_range >::face_iterator> +faces(const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return CGAL::make_range(sm.faces_sbegin(), sm.faces_end()); +} + + +template +typename boost::graph_traits >::vertex_descriptor +add_vertex(OpenMesh::TriMesh_ArrayKernelT& sm) { + return sm.new_vertex(); +} + + /* + +// MutableGraph +// add a vertex with a default constructed property +template +typename boost::graph_traits >::vertex_descriptor +add_vertex(OpenMesh::TriMesh_ArrayKernelT& sm) { + return sm.add_vertex(typename boost::graph_traits >::vertex_property_type()); +} + +template +typename boost::graph_traits >::vertex_descriptor +add_vertex(const typename boost::graph_traits >::vertex_property_type& p, OpenMesh::TriMesh_ArrayKernelT& sm) { + return sm.add_vertex(p); +} + +template +void +clear_vertex(typename boost::graph_traits >::vertex_descriptor, + OpenMesh::TriMesh_ArrayKernelT&) { + CGAL_assert(false); +} + + */ + +template +void +remove_vertex(typename boost::graph_traits >::vertex_descriptor v, + OpenMesh::TriMesh_ArrayKernelT& sm) { + + sm.request_face_status(); + sm.request_vertex_status(); + sm.request_halfedge_status(); + sm.set_halfedge_handle(v, typename boost::graph_traits >::halfedge_descriptor()); + sm.status(v).set_deleted(true); +} + + +template +void +remove_edge(typename boost::graph_traits >::vertex_descriptor u, + typename boost::graph_traits >::vertex_descriptor v, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typename boost::graph_traits >::edge_descriptor e = edge(u, v, sm); + remove_edge(e,sm); +} + +template +void +remove_edge(typename boost::graph_traits >::edge_descriptor e, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + sm.request_face_status(); + sm.request_vertex_status(); + sm.request_halfedge_status(); + sm.request_edge_status(); + + typedef typename boost::graph_traits >::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 +void +remove_edge(typename boost::graph_traits >::edge_iterator eiter, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + remove_edge(*eiter, sm); +} + +template +void +remove_face(typename boost::graph_traits >::face_descriptor f, + OpenMesh::TriMesh_ArrayKernelT& sm) +{ + + sm.request_face_status(); + sm.request_vertex_status(); + sm.request_halfedge_status(); + + set_halfedge(f, typename boost::graph_traits >::halfedge_descriptor(), sm); + sm.status(f).set_deleted(true); +} + +#if 0 // conflits with function in Euler_operations.h +template +std::pair >::edge_descriptor, + bool> +add_edge(typename boost::graph_traits >::vertex_descriptor v1, + typename boost::graph_traits >::vertex_descriptor v2, + OpenMesh::TriMesh_ArrayKernelT& sm) { + + return sm.new_edge(v1, v2); +} +#endif + +template +typename boost::graph_traits >::face_descriptor +add_face(OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return sm.new_face(); +} + +template +typename boost::graph_traits >::face_descriptor +add_face(InputIterator begin, InputIterator end, OpenMesh::TriMesh_ArrayKernelT& sm) +{ + typedef typename boost::graph_traits >::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 +bool is_valid(OpenMesh::TriMesh_ArrayKernelT& sm, bool /* verbose */ = false) +{ + return CGAL::is_valid_polygon_mesh(sm); +} + +} // namespace OpenMesh + + +#ifndef CGAL_NO_DEPRECATED_CODE +#include + +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 -Nru cgal-4.7/include/CGAL/boost/graph/helpers.h cgal-4.8/include/CGAL/boost/graph/helpers.h --- cgal-4.7/include/CGAL/boost/graph/helpers.h 2015-10-17 19:00:10.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/helpers.h 2016-04-04 19:00:11.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include - +#include namespace CGAL { @@ -614,6 +614,9 @@ 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); @@ -660,6 +663,60 @@ } +namespace internal { + +template +inline +typename boost::enable_if, void>::type +clear_impl(FaceGraph& g) +{ g.clear(); } + +template +inline +typename boost::disable_if, void>::type +clear_impl(FaceGraph& g) +{ + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::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 +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 -Nru cgal-4.7/include/CGAL/boost/graph/internal/Has_member_clear.h cgal-4.8/include/CGAL/boost/graph/internal/Has_member_clear.h --- cgal-4.7/include/CGAL/boost/graph/internal/Has_member_clear.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/internal/Has_member_clear.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 Has_member_clear +{ +private: + template + class check {}; + + template + static char f(check*); + + template + static int f(...); +public: + static const bool value = (sizeof(f(0)) == sizeof(char)); +}; + +} // internal +} // cgal + +#endif /* CGAL_HAS_MEMBER_CLEAR_H */ diff -Nru cgal-4.7/include/CGAL/boost/graph/internal/helpers.h cgal-4.8/include/CGAL/boost/graph/internal/helpers.h --- cgal-4.7/include/CGAL/boost/graph/internal/helpers.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/internal/helpers.h 2016-04-04 19:00:11.000000000 +0000 @@ -196,7 +196,7 @@ } do { - if(is_border(h, g)) + if(face(h, g)==boost::graph_traits::null_face()) { set_halfedge(v, h, g); return; diff -Nru cgal-4.7/include/CGAL/boost/graph/iterator.h cgal-4.8/include/CGAL/boost/graph/iterator.h --- cgal-4.7/include/CGAL/boost/graph/iterator.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/iterator.h 2016-04-04 19:00:11.000000000 +0000 @@ -524,7 +524,7 @@ {} Halfedge_around_source_circulator(halfedge_descriptor hd, const Graph& g) - : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator(hd,g)), opp(g) + : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator(opposite(hd,g),g)), opp(g) {} Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g) @@ -855,7 +855,7 @@ */ template Iterator_range > -halfedges_around_target(typename boost::graph_traits::vertex_descriptor v, Graph& g) +halfedges_around_target(typename boost::graph_traits::vertex_descriptor v, const Graph& g) { return halfedges_around_target(halfedge(v,g),g); } diff -Nru cgal-4.7/include/CGAL/boost/graph/named_function_params.h cgal-4.8/include/CGAL/boost/graph/named_function_params.h --- cgal-4.7/include/CGAL/boost/graph/named_function_params.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/named_function_params.h 2016-04-04 19:00:11.000000000 +0000 @@ -48,8 +48,20 @@ #define CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H #include + #include +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4172) // returning address of local variable or temporary +#endif + #include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + #include #include diff -Nru cgal-4.7/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h cgal-4.8/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h --- cgal-4.7/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h 2016-04-04 19:00:11.000000000 +0000 @@ -85,17 +85,17 @@ }; -template +template class OM_edge_weight_pmap - : public boost::put_get_helper::Scalar , OM_edge_weight_pmap > + : public boost::put_get_helper > { public: typedef boost::readable_property_map_tag category; - typedef typename OpenMesh::PolyMesh_ArrayKernelT::Scalar value_type; + typedef typename OpenMesh::Scalar value_type; typedef value_type reference; - typedef typename boost::graph_traits >::edge_descriptor key_type; + typedef typename boost::graph_traits::edge_descriptor key_type; - OM_edge_weight_pmap(const OpenMesh::PolyMesh_ArrayKernelT& sm) + OM_edge_weight_pmap(const OpenMesh& sm) : sm_(sm) {} @@ -105,7 +105,7 @@ } private: - const OpenMesh::PolyMesh_ArrayKernelT& sm_; + const OpenMesh& sm_; }; template @@ -124,25 +124,25 @@ }; - template -class OM_point_pmap //: public boost::put_get_helper > +template +class OM_point_pmap //: public boost::put_get_helper > { public: typedef boost::read_write_property_map_tag category; #if defined(CGAL_USE_OM_POINTS) - typedef typename OpenMesh::PolyMesh_ArrayKernelT::Point value_type; - typedef const typename OpenMesh::PolyMesh_ArrayKernelT::Point& reference; + 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::PolyMesh_ArrayKernelT >::vertex_descriptor key_type; + typedef typename boost::graph_traits::vertex_descriptor key_type; OM_point_pmap() : sm_(NULL) {} - OM_point_pmap(const OpenMesh::PolyMesh_ArrayKernelT& sm) + OM_point_pmap(const OpenMesh& sm) : sm_(&sm) {} @@ -156,36 +156,36 @@ return sm_->point(v); #else CGAL_assertion(sm_!=NULL); - typename OpenMesh::PolyMesh_ArrayKernelT::Point const& omp = sm_->point(v); + 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& pm, key_type v) + inline friend reference get(const OM_point_pmap& 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::Point const& omp = pm.sm_->point(v); + 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& pm, key_type v, const value_type& p) + inline friend void put(const OM_point_pmap& pm, key_type v, const value_type& p) { CGAL_precondition(pm.sm_!=NULL); #if defined(CGAL_USE_OM_POINTS) - const_cast&>(*pm.sm_).set_point(v,p); + const_cast(*pm.sm_).set_point(v,p); #else - const_cast&>(*pm.sm_).set_point - (v, typename OpenMesh::PolyMesh_ArrayKernelT::Point((float)p[0], (float)p[1], (float)p[2])); + const_cast(*pm.sm_).set_point + (v, typename OpenMesh::Point((float)p[0], (float)p[1], (float)p[2])); #endif } private: - const OpenMesh::PolyMesh_ArrayKernelT* sm_; + const OpenMesh* sm_; }; @@ -202,8 +202,9 @@ template struct property_map, boost::edge_weight_t > { - typedef CGAL::OM_edge_weight_pmap type; - typedef CGAL::OM_edge_weight_pmap const_type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_edge_weight_pmap type; + typedef CGAL::OM_edge_weight_pmap const_type; }; @@ -215,8 +216,9 @@ template struct property_map, boost::vertex_index_t > { - typedef CGAL::OM_index_pmap >::vertex_descriptor> type; - typedef CGAL::OM_index_pmap >::vertex_descriptor> const_type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_index_pmap::vertex_descriptor> type; + typedef CGAL::OM_index_pmap::vertex_descriptor> const_type; }; @@ -227,8 +229,9 @@ template struct property_map, boost::face_index_t > { - typedef CGAL::OM_index_pmap >::face_descriptor> type; - typedef CGAL::OM_index_pmap >::face_descriptor> const_type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_index_pmap::face_descriptor> type; + typedef CGAL::OM_index_pmap::face_descriptor> const_type; }; // @@ -238,8 +241,9 @@ template struct property_map, boost::edge_index_t > { - typedef CGAL::OM_index_pmap >::edge_descriptor> type; - typedef CGAL::OM_index_pmap >::edge_descriptor> const_type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_index_pmap::edge_descriptor> type; + typedef CGAL::OM_index_pmap::edge_descriptor> const_type; }; // @@ -249,8 +253,9 @@ template struct property_map, boost::halfedge_index_t > { - typedef CGAL::OM_index_pmap >::halfedge_descriptor> type; - typedef CGAL::OM_index_pmap >::halfedge_descriptor> const_type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_index_pmap::halfedge_descriptor> type; + typedef CGAL::OM_index_pmap::halfedge_descriptor> const_type; }; @@ -258,20 +263,22 @@ struct property_map, boost::vertex_point_t > { typedef CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P; - typedef CGAL::OM_point_pmap type; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + typedef CGAL::OM_point_pmap type; typedef type const_type; }; } // namespace boost -namespace boost { +namespace OpenMesh { template typename boost::property_map, boost::edge_weight_t>::const_type get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT& sm) { - return CGAL::OM_edge_weight_pmap(sm); + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + return CGAL::OM_edge_weight_pmap(sm); } template @@ -279,7 +286,8 @@ get(boost::edge_weight_t, const OpenMesh::PolyMesh_ArrayKernelT& sm, const typename boost::graph_traits >::edge_descriptor& e) { - return CGAL::OM_edge_weight_pmap(sm)[e]; + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + return CGAL::OM_edge_weight_pmap(sm)[e]; } @@ -287,14 +295,16 @@ CGAL::OM_index_pmap >::vertex_descriptor> get(const boost::vertex_index_t&, const OpenMesh::PolyMesh_ArrayKernelT&) { - return CGAL::OM_index_pmap >::vertex_descriptor>(); + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + return CGAL::OM_index_pmap::vertex_descriptor>(); } template typename boost::property_map, boost::face_index_t>::const_type get(const boost::face_index_t&, const OpenMesh::PolyMesh_ArrayKernelT&) { - return CGAL::OM_index_pmap >::face_descriptor>(); + typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; + return CGAL::OM_index_pmap::face_descriptor>(); } template @@ -312,11 +322,12 @@ } template -CGAL::OM_point_pmap +CGAL::OM_point_pmap, + typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3> get(boost::vertex_point_t, const OpenMesh::PolyMesh_ArrayKernelT& g) { typedef typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P; - return CGAL::OM_point_pmap(g); + return CGAL::OM_point_pmap, P>(g); } // get for intrinsic properties @@ -349,7 +360,7 @@ } -} // namespace boost +} // namespace OpenMesh diff -Nru cgal-4.7/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h cgal-4.8/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h --- cgal-4.7/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include + + +// overloads and specializations in the boost namespace +namespace boost { + +// +// edge_weight +// +template +struct property_map, boost::edge_weight_t > +{ + typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + typedef CGAL::OM_edge_weight_pmap type; + typedef CGAL::OM_edge_weight_pmap const_type; +}; + + + +// +// vertex_index +// +template +struct property_map, boost::vertex_index_t > +{ + typedef CGAL::OM_index_pmap >::vertex_descriptor> type; + typedef CGAL::OM_index_pmap >::vertex_descriptor> const_type; +}; + + +// +// face_index +// + +template +struct property_map, boost::face_index_t > +{ + typedef CGAL::OM_index_pmap >::face_descriptor> type; + typedef CGAL::OM_index_pmap >::face_descriptor> const_type; +}; + +// +// edge_index +// + +template +struct property_map, boost::edge_index_t > +{ + typedef CGAL::OM_index_pmap >::edge_descriptor> type; + typedef CGAL::OM_index_pmap >::edge_descriptor> const_type; +}; + +// +// halfedge_index +// + +template +struct property_map, boost::halfedge_index_t > +{ + typedef CGAL::OM_index_pmap >::halfedge_descriptor> type; + typedef CGAL::OM_index_pmap >::halfedge_descriptor> const_type; +}; + + +template +struct property_map, boost::vertex_point_t > +{ + typedef CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P; + typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + typedef CGAL::OM_point_pmap type; + typedef type const_type; +}; + +} // namespace boost + +namespace OpenMesh { + + +template +typename boost::property_map, boost::edge_weight_t>::const_type +get(boost::edge_weight_t, const OpenMesh::TriMesh_ArrayKernelT& sm) +{ + return CGAL::OM_edge_weight_pmap(sm); +} + +template +typename OpenMesh::TriMesh_ArrayKernelT::Scalar +get(boost::edge_weight_t, const OpenMesh::TriMesh_ArrayKernelT& sm, + const typename boost::graph_traits >::edge_descriptor& e) +{ + return CGAL::OM_edge_weight_pmap(sm)[e]; +} + + +template +CGAL::OM_index_pmap >::vertex_descriptor> +get(const boost::vertex_index_t&, const OpenMesh::TriMesh_ArrayKernelT&) +{ + return CGAL::OM_index_pmap >::vertex_descriptor>(); +} + +template +typename boost::property_map, boost::face_index_t>::const_type +get(const boost::face_index_t&, const OpenMesh::TriMesh_ArrayKernelT&) +{ + return CGAL::OM_index_pmap >::face_descriptor>(); +} + +template +CGAL::OM_index_pmap >::edge_descriptor> +get(const boost::edge_index_t&, const OpenMesh::TriMesh_ArrayKernelT&) +{ + return CGAL::OM_index_pmap >::edge_descriptor>(); +} + +template +CGAL::OM_index_pmap >::halfedge_descriptor> +get(const boost::halfedge_index_t&, const OpenMesh::TriMesh_ArrayKernelT&) +{ + return CGAL::OM_index_pmap >::halfedge_descriptor>(); +} + +template +CGAL::OM_point_pmap, + typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3> +get(boost::vertex_point_t, const OpenMesh::TriMesh_ArrayKernelT& g) +{ + typedef typename CGAL::Exact_predicates_inexact_constructions_kernel::Point_3 P; + typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + return CGAL::OM_point_pmap(g); +} + +// get for intrinsic properties +#define CGAL_OM_INTRINSIC_PROPERTY(RET, PROP, TYPE) \ + template \ + RET \ + get(PROP p, const OpenMesh::TriMesh_ArrayKernelT& sm, \ + typename boost::graph_traits< OpenMesh::TriMesh_ArrayKernelT >::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 +void +put(boost::vertex_point_t p, OpenMesh::TriMesh_ArrayKernelT& g, + typename boost::graph_traits< OpenMesh::TriMesh_ArrayKernelT >::vertex_descriptor vd, + const typename K::Point& point) +{ + put(get(p,g), vd, point); +} + + +} // namespace OpenMesh + + + +#endif /* CGAL_PROPERTIES_TRIMESH_ARRAYKERNELT_H */ diff -Nru cgal-4.7/include/CGAL/boost/graph/selection.h cgal-4.8/include/CGAL/boost/graph/selection.h --- cgal-4.7/include/CGAL/boost/graph/selection.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/selection.h 2016-04-04 19:00:11.000000000 +0000 @@ -34,7 +34,7 @@ OutputIterator extract_selection_boundary( FaceRange& face_range, - FaceGraph& graph, + FaceGraph& fg, IsFaceSelectedPMap is_selected, OutputIterator out) { @@ -45,18 +45,18 @@ BOOST_FOREACH(face_descriptor fd, face_range) { BOOST_FOREACH( halfedge_descriptor h, - halfedges_around_face(halfedge(fd, graph), graph) ) + halfedges_around_face(halfedge(fd, fg), fg) ) { - halfedge_descriptor opp_hd = opposite(h, graph); - face_descriptor opp_fd = face( opp_hd, graph ); + 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, graph), graph ); - if ( !get( is_selected, face(opp_hd, graph) ) ) + opp_hd=opposite( next( opp_hd, fg), fg ); + if ( !get( is_selected, face(opp_hd, fg) ) ) *out++=opp_hd; } } @@ -65,11 +65,32 @@ } } //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::%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 OutputIterator -dilate_face_selection( +expand_face_selection( const FaceRange& selection, - FaceGraph& graph, + FaceGraph& fg, unsigned int k, IsFaceSelectedPMap is_selected, OutputIterator out) @@ -83,7 +104,7 @@ { //extract faces on the boundary of the selection std::vector selection_boundary_halfedges; - internal::extract_selection_boundary(current_selection, graph, is_selected, + internal::extract_selection_boundary(current_selection, fg, is_selected, std::back_inserter(selection_boundary_halfedges)); if (selection_boundary_halfedges.empty()) break; @@ -92,13 +113,13 @@ std::set new_selection_set; BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges) { - face_descriptor fd=face(hd, graph); + face_descriptor fd=face(hd, fg); 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; + hd=opposite( next(hd, fg), fg ); + fd=face(hd, fg); + if ( face(hd, fg)==GT::null_face() ) break; } } @@ -115,11 +136,30 @@ 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::%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 OutputIterator -erode_face_selection( +reduce_face_selection( const FaceRange& selection, - FaceGraph& graph, + FaceGraph& fg, unsigned int k, IsFaceSelectedPMap is_selected, OutputIterator out) @@ -133,7 +173,7 @@ { //extract faces on the boundary of the selection std::vector selection_boundary_halfedges; - internal::extract_selection_boundary(current_selection, graph, is_selected, + internal::extract_selection_boundary(current_selection, fg, is_selected, std::back_inserter(selection_boundary_halfedges)); if (selection_boundary_halfedges.empty()) break; @@ -143,13 +183,13 @@ std::set 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) ) + 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, graph), graph ); - fd=face(hd, graph); + hd=opposite( next(hd, fg), fg ); + fd=face(hd, fg); } } @@ -170,12 +210,24 @@ return out; } -// select all faces incident to the target vertex of halfedges in `hedges` + +/*! +\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 OutputIterator select_incident_faces( const HalfedgeRange& hedges, - FaceGraph& graph, + FaceGraph& fg, OutputIterator out) { typedef boost::graph_traits GT; @@ -187,13 +239,13 @@ BOOST_FOREACH(halfedge_descriptor hd, hedges) { halfedge_descriptor first = hd; - face_descriptor fd=face(hd, graph); + face_descriptor fd=face(hd, fg); do { - if ( face(hd, graph)!=GT::null_face() && selection_set.insert(fd).second) + if ( face(hd, fg)!=GT::null_face() && selection_set.insert(fd).second) *out++=fd; - hd=opposite( next(hd, graph), graph ); - fd=face(hd, graph); + hd=opposite( next(hd, fg), fg ); + fd=face(hd, fg); }while( hd!=first ); } @@ -201,11 +253,31 @@ } /// 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::%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 OutputIterator -dilate_edge_selection( +expand_edge_selection( const EdgeRange& selection, - HalfedgeGraph& graph, + HalfedgeGraph& fg, unsigned int k, IsEdgeSelectedPMap is_selected, OutputIterator out) @@ -222,15 +294,15 @@ std::set new_selection_set; BOOST_FOREACH(edge_descriptor ed, current_selection) { - halfedge_descriptor hdi=halfedge(ed,graph); - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hdi, graph)) + halfedge_descriptor hdi=halfedge(ed,fg); + BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hdi, fg)) { - edge_descriptor ned=edge(hd, graph); + 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, graph)) + BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( hdi, fg)) { - edge_descriptor ned=edge(hd, graph); + edge_descriptor ned=edge(hd, fg); if (!get(is_selected, ned)) new_selection_set.insert(ned); } } @@ -248,11 +320,30 @@ 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::%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 OutputIterator -erode_edge_selection( +reduce_edge_selection( const EdgeRange& selection , - HalfedgeGraph& graph, + HalfedgeGraph& fg, unsigned int k, IsEdgeSelectedPMap is_selected, OutputIterator out) @@ -266,20 +357,20 @@ std::set 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)) + halfedge_descriptor hd=halfedge(ed,fg); + BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_source( hd, fg)) { - edge_descriptor ned=edge(nhd, graph); + edge_descriptor ned=edge(nhd, fg); if (!get(is_selected, ned)){ - unique_vertex_set.insert(source(hd,graph)); + unique_vertex_set.insert(source(hd,fg)); break; } } - BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, graph)) + BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, fg)) { - edge_descriptor ned=edge(nhd, graph); + edge_descriptor ned=edge(nhd, fg); if (!get(is_selected, ned)){ - unique_vertex_set.insert(target(hd,graph)); + unique_vertex_set.insert(target(hd,fg)); break; } } @@ -294,12 +385,12 @@ std::set 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)) + BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( halfedge(vd,fg), fg)) { - edge_descriptor ed = edge(hd, graph); + edge_descriptor ed = edge(hd, fg); if (get(is_selected, ed)){ edges_to_deselect.insert(ed); - unique_vertex_set.insert(source(hd, graph)); + unique_vertex_set.insert(source(hd, fg)); } } @@ -316,11 +407,31 @@ } /// 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::%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 OutputIterator -dilate_vertex_selection( +expand_vertex_selection( const VertexRange& selection, - HalfedgeGraph& graph, + HalfedgeGraph& fg, unsigned int k, IsVertexSelectedPMap is_selected, OutputIterator out) @@ -335,7 +446,7 @@ //collect adjacent vertices not already selected std::set new_selection_set; BOOST_FOREACH(vertex_descriptor vd, current_selection) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph)) + 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 @@ -351,11 +462,30 @@ 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::%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 OutputIterator -erode_vertex_selection( +reduce_vertex_selection( const VertexRange& selection, - HalfedgeGraph& graph, + HalfedgeGraph& fg, unsigned int k, IsVertexSelectedPMap is_selected, OutputIterator out) @@ -366,7 +496,7 @@ // collect vertices incident to a selected one std::set unique_vertex_set; BOOST_FOREACH(vertex_descriptor vd, selection) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph)) + BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd); std::vector current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end()); @@ -377,7 +507,7 @@ //collect adjacent vertices selected std::set vertices_to_deselect; BOOST_FOREACH(vertex_descriptor vd, current_selection_border) - BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,graph), graph)) + 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 diff -Nru cgal-4.7/include/CGAL/boost/graph/split_graph_into_polylines.h cgal-4.8/include/CGAL/boost/graph/split_graph_into_polylines.h --- cgal-4.7/include/CGAL/boost/graph/split_graph_into_polylines.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/split_graph_into_polylines.h 2016-04-04 19:00:11.000000000 +0000 @@ -29,6 +29,7 @@ namespace CGAL { +namespace internal{ struct IsTerminalDefault { template @@ -45,6 +46,7 @@ void add_node(typename boost::graph_traits::vertex_descriptor){} void end_polyline(){} }; +} //end of namespace internal namespace internal { @@ -105,10 +107,25 @@ } // 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 +/*! +\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: + - void start_new_polyline() + called when starting the description of a polyline. + - void add_node(typename boost::graph_traits::%vertex_descriptor v) + called for each vertex `v` of the polyline currently described. + - void end_polyline() + called when the description of a polyline is finished. +\tparam IsTerminal A functor providing `bool operator()(boost::graph_traits::%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 @@ -235,6 +252,7 @@ } } +/// \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 @@ -244,9 +262,9 @@ split_graph_into_polylines(const Graph& graph, Visitor& polyline_visitor) { - split_graph_into_polylines(graph, polyline_visitor, IsTerminalDefault()); + split_graph_into_polylines(graph, polyline_visitor, internal::IsTerminalDefault()); } - +/// \endcond } //end of namespace CGAL diff -Nru cgal-4.7/include/CGAL/boost/graph/visitor.h cgal-4.8/include/CGAL/boost/graph/visitor.h --- cgal-4.7/include/CGAL/boost/graph/visitor.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/boost/graph/visitor.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include + +namespace boost +{ + template + struct graph_traits< + boost::tuple, boost::reference_wrapper > > + : boost::graph_traits< Graph > + { + typedef boost::graph_traits Base; + typedef typename Base::vertex_property_type vertex_property_type; + }; + + template + struct graph_traits< + boost::tuple, boost::reference_wrapper > const > + : boost::graph_traits< Graph > + {}; + + template + struct property_map< + boost::tuple, boost::reference_wrapper >, + PropertyTag> + : public property_map + {}; + + template + struct property_map< + const boost::tuple, boost::reference_wrapper >, + PropertyTag> + : public property_map + {}; + +} // namespace boost + +namespace CGAL +{ +template +boost::tuple, + boost::reference_wrapper > +make_graph_with_visitor(V& v, Graph& g) +{ + return boost::make_tuple(boost::ref(v), boost::ref(g)); +} + +template +class Visitor_base +{ +public: + typedef typename boost::graph_traits 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 +void num_vertices(Visitor_base& w) +{} +template +void num_edges(Visitor_base& w) +{} +template +void degree(typename boost::graph_traits::vertex_descriptor v + , const Visitor_base& w) +{} +template +void out_degree(typename boost::graph_traits::vertex_descriptor v + , const Visitor_base& w) +{} +template +void in_degree(typename boost::graph_traits::vertex_descriptor v + , const Visitor_base& w) +{} +template +void source(typename boost::graph_traits::edge_descriptor e + , const Visitor_base & w) +{} +template +void target(typename boost::graph_traits::edge_descriptor e + , const Visitor_base & w) +{} +template +void edge(typename boost::graph_traits::vertex_descriptor u + , typename boost::graph_traits::vertex_descriptor v + , const Visitor_base & w) +{} +template +inline void vertices(const Visitor_base & w) +{} +template +inline void edges(const Visitor_base & w) +{} +template +inline void in_edges(typename boost::graph_traits::vertex_descriptor u + , const Visitor_base & w) +{} +template +inline void out_edges(typename boost::graph_traits::vertex_descriptor u + , const Visitor_base & w) +{} + +// +// MutableHalfedgeGraph +// +template +void add_vertex(Visitor_base & w) +{} +template +void add_vertex(const typename boost::graph_traits::vertex_property_type& p + , Visitor_base & w) +{} +template +void remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v + , Visitor_base & w) +{} +template +void add_edge(Visitor_base & w) +{} +template +void remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e + , Visitor_base & w) +{} +template +void set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1 + , typename boost::graph_traits< Graph >::vertex_descriptor v + , Visitor_base & w) +{} +template +void set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 + , typename boost::graph_traits< Graph >::halfedge_descriptor h2 + , Visitor_base & w) +{} + +// +// MutableFaceGraph +// +template +void add_face(Visitor_base & w) +{} +template +void add_face(InputIterator begin, InputIterator end, + Visitor_base & w) +{} +template +void remove_face(typename boost::graph_traits< Graph >::face_descriptor f + , Visitor_base & w) +{} +template +void set_face(typename boost::graph_traits< Graph >::halfedge_descriptor h + , typename boost::graph_traits< Graph >::face_descriptor f + , const Visitor_base & w) +{} +template +void set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f + , typename boost::graph_traits< Graph >::halfedge_descriptor h + , Visitor_base & w) +{} +template +void set_halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v + , typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} + +// +// HalfedgeGraph +// +template +void edge(typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} +template +void halfedge(typename boost::graph_traits< Graph >::edge_descriptor e + , const Visitor_base & w) +{} +template +void halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v + , const Visitor_base & w) +{} +template +void halfedge(typename boost::graph_traits< Graph >::vertex_descriptor u + , typename boost::graph_traits< Graph >::vertex_descriptor v + , const Visitor_base & w) +{} +template +void opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} +template +void source(typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} +template +void target(typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} +template +void next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge + , const Visitor_base & w) +{} +template +void prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge + , const Visitor_base & w) +{} + +// +// HalfedgeListGraph +// +template +void halfedges(const Visitor_base & w) +{} +template +void num_halfedges(const Visitor_base & w) +{} + +// Graph +template +void face(typename boost::graph_traits< Graph >::halfedge_descriptor h + , const Visitor_base & w) +{} +template +void halfedge(typename boost::graph_traits< Graph >::face_descriptor f + , const Visitor_base & w) +{} +template +void faces(const Visitor_base & w) +{} +template +void num_faces(const Visitor_base & w) +{} +template +void is_valid(const Visitor_base & w, bool verbose = false) +{} +template +void get(PropertyTag ptag, const Visitor_base& w) +{} + + +//// OVERLOADS FOR TUPLE + +template +typename boost::graph_traits::vertices_size_type +num_vertices(const boost::tuple, + boost::reference_wrapper >& w) +{ + num_vertices(boost::unwrap_ref(w.get<0>())); + return num_vertices(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::edges_size_type +num_edges(const boost::tuple, + boost::reference_wrapper >& w) +{ + num_edges(boost::unwrap_ref(w.get<0>())); + return num_edges(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::degree_size_type +degree(typename boost::graph_traits::vertex_descriptor v + , const boost::tuple, + boost::reference_wrapper >& w) +{ + degree(v, boost::unwrap_ref(w.get<0>())); + return degree(v, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::degree_size_type +out_degree(typename boost::graph_traits::vertex_descriptor v + , const boost::tuple, + boost::reference_wrapper >& w) +{ + out_degree(v, boost::unwrap_ref(w.get<0>())); + return out_degree(v, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::degree_size_type +in_degree(typename boost::graph_traits::vertex_descriptor v + , const boost::tuple, + boost::reference_wrapper >& w) +{ + in_degree(v, boost::unwrap_ref(w.get<0>())); + return in_degree(v, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::vertex_descriptor +source(typename boost::graph_traits::edge_descriptor e + , const boost::tuple, + boost::reference_wrapper > & w) +{ + source(e, boost::unwrap_ref(w.get<0>())); + return source(e, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::vertex_descriptor +target(typename boost::graph_traits::edge_descriptor e + , const boost::tuple, + boost::reference_wrapper > & w) +{ + target(e, boost::unwrap_ref(w.get<0>())); + return target(e, boost::unwrap_ref(w.get<1>())); +} + +template +std::pair::edge_descriptor, bool> +edge(typename boost::graph_traits::vertex_descriptor u + , typename boost::graph_traits::vertex_descriptor v + , const boost::tuple, + boost::reference_wrapper > & w) +{ + edge(u, v, boost::unwrap_ref(w.get<0>())); + return edge(u, v, boost::unwrap_ref(w.get<1>())); +} + +template +inline CGAL::Iterator_range::vertex_iterator> +vertices(const boost::tuple, + boost::reference_wrapper >& w) +{ + vertices(boost::unwrap_ref(w.get<0>())); + return vertices(boost::unwrap_ref(w.get<1>())); +} + +template +inline CGAL::Iterator_range::edge_iterator> +edges(const boost::tuple, + boost::reference_wrapper >& w) +{ + edges(boost::unwrap_ref(w.get<0>())); + return edges(boost::unwrap_ref(w.get<1>())); +} + +template +inline CGAL::Iterator_range::in_edge_iterator> +in_edges(typename boost::graph_traits::vertex_descriptor u + , const boost::tuple, + boost::reference_wrapper >& w) +{ + in_edges(u, boost::unwrap_ref(w.get<0>())); + return in_edges(u, boost::unwrap_ref(w.get<1>())); +} + +template +inline CGAL::Iterator_range::out_edge_iterator> +out_edges(typename boost::graph_traits::vertex_descriptor u + , const boost::tuple, + boost::reference_wrapper >& w) +{ + out_edges(u, boost::unwrap_ref(w.get<0>())); + return out_edges(u, boost::unwrap_ref(w.get<1>())); +} + +// +// MutableHalfedgeGraph +// + +template +typename boost::graph_traits< Graph >::vertex_descriptor +add_vertex(boost::tuple, + boost::reference_wrapper >& w) +{ + add_vertex(boost::unwrap_ref(w.get<0>())); + return add_vertex(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::vertex_descriptor +add_vertex(const typename boost::graph_traits::vertex_property_type& p + , boost::tuple, + boost::reference_wrapper >& w) +{ + add_vertex(p, boost::unwrap_ref(w.get<0>())); + return add_vertex(p, boost::unwrap_ref(w.get<1>())); +} + +template +void +remove_vertex(typename boost::graph_traits< Graph >::vertex_descriptor v + , boost::tuple, + boost::reference_wrapper >& w) +{ + remove_vertex(v, boost::unwrap_ref(w.get<0>())); + remove_vertex(v, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::edge_descriptor +add_edge(boost::tuple, + boost::reference_wrapper >& w) +{ + add_edge(boost::unwrap_ref(w.get<0>())); + return add_edge(boost::unwrap_ref(w.get<1>())); +} + +template +void +remove_edge(typename boost::graph_traits< Graph >::edge_descriptor e +, boost::tuple, + boost::reference_wrapper >& w) +{ + remove_edge(e, boost::unwrap_ref(w.get<0>())); + remove_edge(e, boost::unwrap_ref(w.get<1>())); +} + +template +void +set_target(typename boost::graph_traits< Graph >::halfedge_descriptor h1 +, typename boost::graph_traits< Graph >::vertex_descriptor v +, boost::tuple, + boost::reference_wrapper >& w) +{ + set_target(h1, v, boost::unwrap_ref(w.get<0>())); + set_target(h1, v, boost::unwrap_ref(w.get<1>())); +} + +template +void +set_next(typename boost::graph_traits< Graph >::halfedge_descriptor h1 + , typename boost::graph_traits< Graph >::halfedge_descriptor h2 + , boost::tuple, + boost::reference_wrapper >& w) +{ + set_next(h1, h2, boost::unwrap_ref(w.get<0>())); + set_next(h1, h2, boost::unwrap_ref(w.get<1>())); +} + +// +// MutableFaceGraph +// +template +typename boost::graph_traits< Graph >::face_descriptor +add_face(boost::tuple, + boost::reference_wrapper >& w) +{ + add_face(boost::unwrap_ref(w.get<0>())); + return add_face(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::face_descriptor +add_face(InputIterator begin, + InputIterator end, + boost::tuple, + boost::reference_wrapper >& w) +{ + add_face(begin, end, boost::unwrap_ref(w.get<0>())); + return add_face(begin, end, boost::unwrap_ref(w.get<1>())); +} + +template +void +remove_face(typename boost::graph_traits< Graph >::face_descriptor f +, boost::tuple, +boost::reference_wrapper >& w) +{ + remove_face(f, boost::unwrap_ref(w.get<0>())); + return remove_face(f, boost::unwrap_ref(w.get<1>())); +} + +template +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 >& w) +{ + set_face(h, f, boost::unwrap_ref(w.get<0>())); + set_face(h, f, boost::unwrap_ref(w.get<1>())); +} + +template +void +set_halfedge(typename boost::graph_traits< Graph >::face_descriptor f +, typename boost::graph_traits< Graph >::halfedge_descriptor h +, boost::tuple, +boost::reference_wrapper >& w) +{ + set_halfedge(f, h, boost::unwrap_ref(w.get<0>())); + set_halfedge(f, h, boost::unwrap_ref(w.get<1>())); +} + +template +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 >& w) +{ + set_halfedge(v, h, boost::unwrap_ref(w.get<0>())); + set_halfedge(v, h, boost::unwrap_ref(w.get<1>())); +} + +// +// HalfedgeGraph +// +template +typename boost::graph_traits< Graph >::edge_descriptor +edge(typename boost::graph_traits< Graph >::halfedge_descriptor h +, const boost::tuple, + boost::reference_wrapper >& w) +{ + edge(h, boost::unwrap_ref(w.get<0>())); + return edge(h, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +halfedge(typename boost::graph_traits< Graph >::edge_descriptor e +, const boost::tuple, + boost::reference_wrapper >& w) +{ + halfedge(e, boost::unwrap_ref(w.get<0>())); + return halfedge(e, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +halfedge(typename boost::graph_traits< Graph >::vertex_descriptor v +, const boost::tuple, + boost::reference_wrapper >& w) +{ + halfedge(v, boost::unwrap_ref(w.get<0>())); + return halfedge(v, boost::unwrap_ref(w.get<1>())); +} + +template +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 >& w) +{ + halfedge(u, v, boost::unwrap_ref(w.get<0>())); + return halfedge(u, v, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +opposite(typename boost::graph_traits< Graph >::halfedge_descriptor h +, const boost::tuple, + boost::reference_wrapper >& w) +{ + opposite(h, boost::unwrap_ref(w.get<0>())); + return opposite(h, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::vertex_descriptor +source(typename boost::graph_traits< Graph >::halfedge_descriptor h +, const boost::tuple, + boost::reference_wrapper >& w) +{ + source(h, boost::unwrap_ref(w.get<0>())); + return source(h, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::vertex_descriptor +target(typename boost::graph_traits< Graph >::halfedge_descriptor h +, const boost::tuple, boost::reference_wrapper >& w) +{ + target(h, boost::unwrap_ref(w.get<0>())); + return target(h, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +next(typename boost::graph_traits< Graph >::halfedge_descriptor outedge +, const boost::tuple, boost::reference_wrapper >& w) +{ + next(outedge, boost::unwrap_ref(w.get<0>())); + return next(outedge, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +prev(typename boost::graph_traits< Graph >::halfedge_descriptor outedge +, const boost::tuple, boost::reference_wrapper >& w) +{ + prev(outedge, boost::unwrap_ref(w.get<0>())); + return prev(outedge, boost::unwrap_ref(w.get<1>())); +} + +// +// HalfedgeListGraph +// +template +CGAL::Iterator_range::halfedge_iterator> +halfedges(const boost::tuple, boost::reference_wrapper >& w) +{ + halfedges(boost::unwrap_ref(w.get<0>())); + return halfedges(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedges_size_type +num_halfedges(const boost::tuple, boost::reference_wrapper >& w) +{ + num_halfedges(boost::unwrap_ref(w.get<0>())); + return num_halfedges(boost::unwrap_ref(w.get<1>())); +} + +// Graph +template +typename boost::graph_traits< Graph >::face_descriptor +face(typename boost::graph_traits< Graph >::halfedge_descriptor h +, const boost::tuple, boost::reference_wrapper >& w) +{ + face(h, boost::unwrap_ref(w.get<0>())); + return face(h, boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits< Graph >::halfedge_descriptor +halfedge(typename boost::graph_traits< Graph >::face_descriptor f +, const boost::tuple, boost::reference_wrapper >& w) +{ + halfedge(f, boost::unwrap_ref(w.get<0>())); + return halfedge(f, boost::unwrap_ref(w.get<1>())); +} + +template +inline CGAL::Iterator_range::face_iterator > +faces(const boost::tuple, boost::reference_wrapper >& w) +{ + faces(boost::unwrap_ref(w.get<0>())); + return faces(boost::unwrap_ref(w.get<1>())); +} + +template +typename boost::graph_traits::faces_size_type +num_faces(const boost::tuple, + boost::reference_wrapper >& w) +{ + num_faces(boost::unwrap_ref(w.get<0>())); + return num_faces(boost::unwrap_ref(w.get<1>())); +} + +template +bool is_valid(const boost::tuple, + boost::reference_wrapper >& w + , bool verbose = false) +{ + is_valid(boost::unwrap_ref(w.get<0>()), verbose); + return is_valid(boost::unwrap_ref(w.get<1>()), verbose); +} + +template +typename boost::property_map< Graph, PropertyTag >::type +get(PropertyTag ptag, + const boost::tuple, + boost::reference_wrapper >& 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 -Nru cgal-4.7/include/CGAL/Cartesian/Line_3.h cgal-4.8/include/CGAL/Cartesian/Line_3.h --- cgal-4.7/include/CGAL/Cartesian/Line_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Cartesian/Line_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -25,7 +25,6 @@ #ifndef CGAL_CARTESIAN_LINE_3_H #define CGAL_CARTESIAN_LINE_3_H -#include #include namespace CGAL { @@ -42,7 +41,14 @@ typedef typename R_::Line_3 Line_3; typedef typename R_::Segment_3 Segment_3; - typedef std::pair Rep; + 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::type Base; Base base; diff -Nru cgal-4.7/include/CGAL/Cell_iterators.h cgal-4.8/include/CGAL/Cell_iterators.h --- cgal-4.7/include/CGAL/Cell_iterators.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Cell_iterators.h 2016-04-04 19:00:11.000000000 +0000 @@ -105,8 +105,8 @@ 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. + 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. @@ -163,7 +163,7 @@ private: /// A mark used to mark treated cells. - int mcell_mark_number; + typename Map::size_type mcell_mark_number; }; //**************************************************************************** /* Class CMap_cell_iterator: to iterate onto the @@ -217,7 +217,7 @@ 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. + this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts. } /// Copy constructor. @@ -268,7 +268,7 @@ private: /// A mark used to mark treated cells. - int mmark_number; + typename Map::size_type mmark_number; }; //**************************************************************************** /* Class CMap_cell_iterator, @@ -333,7 +333,7 @@ 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. + this->mmark_number = Map::INVALID_MARK; // To avoid basic class to try to unmark darts. } /// Copy constructor. @@ -384,7 +384,7 @@ private: /// A mark used to mark treated cells. - int mmark_number; + typename Map::size_type mmark_number; }; //**************************************************************************** /* Class CMap_one_dart_per_incident_cell_iterator: to iterate diff -Nru cgal-4.7/include/CGAL/Circle_2.h cgal-4.8/include/CGAL/Circle_2.h --- cgal-4.7/include/CGAL/Circle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Circle_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -228,7 +228,7 @@ std::ostream& insert(std::ostream& os, const Circle_2& c) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); @@ -271,7 +271,7 @@ typename R::Point_2 center; typename R::FT squared_radius; int o; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> center >> iformat(squared_radius) >> o; break; diff -Nru cgal-4.7/include/CGAL/Circulator/Circulator_adapters.h cgal-4.8/include/CGAL/Circulator/Circulator_adapters.h --- cgal-4.7/include/CGAL/Circulator/Circulator_adapters.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Circulator/Circulator_adapters.h 2016-04-04 19:00:11.000000000 +0000 @@ -26,6 +26,7 @@ #define CGAL_CIRCULATOR_IMPL_H 1 #include +#include namespace CGAL { @@ -68,6 +69,7 @@ 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); } @@ -111,6 +113,7 @@ 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); } @@ -158,6 +161,7 @@ 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); } @@ -210,6 +214,7 @@ 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); } @@ -269,6 +274,7 @@ 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); } @@ -307,6 +313,7 @@ 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); } @@ -344,6 +351,7 @@ 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); } @@ -393,6 +401,7 @@ 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); } @@ -465,6 +474,7 @@ 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); } @@ -589,6 +599,7 @@ 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); } diff -Nru cgal-4.7/include/CGAL/Circulator_identity.h cgal-4.8/include/CGAL/Circulator_identity.h --- cgal-4.7/include/CGAL/Circulator_identity.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Circulator_identity.h 2016-04-04 19:00:12.000000000 +0000 @@ -61,6 +61,7 @@ bool operator==( Nullptr_t p) const { CGAL_assertion( p == 0); + CGAL_USE(p); return ( nt == 0); //###// } bool operator!=( Nullptr_t p) const { diff -Nru cgal-4.7/include/CGAL/Circulator_on_node.h cgal-4.8/include/CGAL/Circulator_on_node.h --- cgal-4.7/include/CGAL/Circulator_on_node.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Circulator_on_node.h 2016-04-04 19:00:12.000000000 +0000 @@ -63,6 +63,7 @@ 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); } diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_basic_operations.h cgal-4.8/include/CGAL/Combinatorial_map_basic_operations.h --- cgal-4.7/include/CGAL/Combinatorial_map_basic_operations.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_basic_operations.h 2016-04-04 19:00:11.000000000 +0000 @@ -61,7 +61,7 @@ template < class Map, class Iterator > bool is_whole_orbit_marked(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { CGAL_static_assertion( (boost::is_same::value) ); @@ -84,7 +84,7 @@ template < class Map, class Iterator > bool is_whole_orbit_unmarked(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { amap.negate_mark(amark); bool res=CGAL::is_whole_orbit_marked(amap, adart, amark); @@ -102,7 +102,7 @@ template < class Map, class Iterator > typename Map::size_type mark_orbit(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { CGAL_static_assertion( (boost::is_same::value) ); @@ -130,7 +130,7 @@ template < class Map, class Iterator > typename Map::size_type unmark_orbit(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { amap.negate_mark(amark); typename Map::size_type @@ -173,7 +173,7 @@ 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) + typename Map::size_type amark) { return CGAL::is_whole_orbit_marked::const_iterator> @@ -183,7 +183,7 @@ template < class Map, unsigned int i> bool is_whole_cell_marked(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { return CGAL::is_whole_cell_marked(amap,adart,amark); } @@ -197,7 +197,7 @@ 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) + typename Map::size_type amark) { return CGAL::is_whole_orbit_unmarked::iterator> @@ -207,7 +207,7 @@ template < class Map, unsigned int i> bool is_whole_cell_unmarked(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { return CGAL::is_whole_cell_unmarked (amap,adart,amark); @@ -223,7 +223,7 @@ 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) + typename Map::size_type amark) { return CGAL::mark_orbit::const_iterator> (amap, adart, amark); } @@ -231,7 +231,7 @@ template < class Map, unsigned int i> typename Map::size_type mark_cell(const Map & amap, typename Map::Dart_const_handle adart, - int amark) + typename Map::size_type amark) { return CGAL::mark_cell(amap, adart, amark);} /** Unmark a given orbit with a given mark. @@ -244,7 +244,7 @@ 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) + typename Map::size_type amark) { return CGAL::unmark_orbit::const_iterator> (amap, adart, amark);} @@ -252,7 +252,7 @@ template < class Map, unsigned int i > typename Map::size_type unmark_cell(const Map & amap, typename Map::Dart_handle adart, - int amark) + typename Map::size_type amark) { return CGAL::unmark_cell(amap, adart, amark); } /** Compute the degree of a given i-cell c. @@ -268,9 +268,10 @@ 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::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::const_iterator it(amap, adart, mark); @@ -316,9 +317,10 @@ 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::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::const_iterator it(amap, adart, mark); diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_functors.h cgal-4.8/include/CGAL/Combinatorial_map_functors.h --- cgal-4.7/include/CGAL/Combinatorial_map_functors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_functors.h 2016-04-04 19:00:11.000000000 +0000 @@ -65,8 +65,10 @@ template struct Reserve_mark_functor { + typedef typename CMap::size_type size_type; + template - static void run(const CMap* amap, std::vector* marks) + static void run(const CMap* amap, std::vector* marks) { (*marks)[i] = amap->get_new_mark(); } }; // **************************************************************************** @@ -94,7 +96,9 @@ static bool run(const CMap* amap, typename CMap::Dart_const_handle adart) { - int mark=amap->get_new_mark(); + typedef typename CMap::size_type size_type; + + size_type mark=amap->get_new_mark(); bool res = true; CGAL::internal::Test_is_valid_attribute_functor:: run(amap, adart, mark, &res); diff -Nru cgal-4.7/include/CGAL/Combinatorial_map.h cgal-4.8/include/CGAL/Combinatorial_map.h --- cgal-4.7/include/CGAL/Combinatorial_map.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map.h 2016-04-04 19:00:11.000000000 +0000 @@ -40,12 +40,18 @@ #include +#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 @@ -94,11 +100,13 @@ 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; - static Null_handle_type null_handle; + using Base::null_handle; using Base::null_dart_handle; using Base::mdarts; using Base::get_beta; @@ -142,6 +150,8 @@ public Base::template Attribute_const_range {}; + class Exception_no_more_available_mark {}; + public: /** Default Combinatorial_map constructor. * The map is empty. @@ -160,7 +170,7 @@ for ( size_type i = 0; i < NB_MARKS; ++i) { - this->mfree_marks_stack[i] = (int)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; @@ -335,7 +345,7 @@ void clear() { mdarts.clear(); - for ( unsigned int i = 0; i < NB_MARKS; ++i) + for ( size_type i = 0; i < NB_MARKS; ++i) this->mnb_marked_darts[i] = 0; internal::Clear_all::run(mattribute_containers); @@ -465,7 +475,7 @@ void erase_dart(Dart_handle adart) { // 1) We update the number of marked darts. - for ( unsigned int i = 0; i < mnb_used_marks; ++i) + 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]]; @@ -757,31 +767,29 @@ /** Test if a given mark is reserved. * @return true iff the mark is reserved (ie in used). */ - bool is_reserved(int amark) const + bool is_reserved(size_type amark) const { - CGAL_assertion(amark>=0 && (size_type)amark1 ) { @@ -1003,14 +1002,14 @@ // 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[mindex_marks[amark]] = mused_marks_stack[--mnb_used_marks]; mindex_marks[mused_marks_stack[mnb_used_marks]] = - mindex_marks[(size_type)amark]; + 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[(size_type)amark] = mnb_used_marks; + mindex_marks[amark] = mnb_used_marks; mnb_times_reserved_marks[amark]=0; } @@ -1099,9 +1098,9 @@ { bool valid = true; unsigned int i = 0, j = 0; - std::vector marks(dimension+1); + std::vector marks(dimension+1); for ( i=0; i<=dimension; ++i) - marks[i] = -1; + marks[i] = INVALID_MARK; Helper::template Foreach_enabled_attributes >:: @@ -1113,7 +1112,7 @@ 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]); + if (marks[i]!=INVALID_MARK) mark(it,marks[i]); } else { @@ -1186,7 +1185,7 @@ } } for ( i=0; i<=dimension; ++i) - if ( marks[i]!=-1 ) + if ( marks[i]!=INVALID_MARK ) { CGAL_assertion( is_whole_map_marked(marks[i]) ); free_mark(marks[i]); @@ -1198,9 +1197,9 @@ /// correct invalid attributes in the map void correct_invalid_attributes() { - std::vector marks(dimension+1); + std::vector marks(dimension+1); for ( unsigned int i=0; i<=dimension; ++i) - marks[i] = -1; + marks[i] = INVALID_MARK; Helper::template Foreach_enabled_attributes >:: @@ -1215,7 +1214,7 @@ } for ( unsigned int i=0; i<=dimension; ++i) - if ( marks[i]!=-1 ) + if ( marks[i]!=INVALID_MARK ) { CGAL_assertion( is_whole_map_marked(marks[i]) ); free_mark(marks[i]); @@ -1272,7 +1271,7 @@ CGAL_static_assertion( (boost::is_same::value) ); unsigned int nb = 0; - int amark = get_new_mark(); + size_type amark = get_new_mark(); for ( typename Dart_range::const_iterator it1(darts().begin()), itend(darts().end()); it1!=itend; ++it1) { @@ -1589,6 +1588,7 @@ */ 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); } @@ -1868,7 +1868,7 @@ } else { - int m = get_new_mark(); + size_type m = get_new_mark(); std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) @@ -1962,7 +1962,7 @@ return; } - int m = get_new_mark(); + size_type m = get_new_mark(); std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) @@ -1971,8 +1971,7 @@ dartv.push_back(it); } - int mark = get_new_mark(); - CGAL_assertion( mark!=-1 ); + size_type mark = get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution I1(*this, adart1, mark); @@ -2034,7 +2033,7 @@ return; } - int m = get_new_mark(); + size_type m = get_new_mark(); std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart1, m); it.cont(); ++it ) @@ -2043,8 +2042,7 @@ dartv.push_back(it); } - int mark = get_new_mark(); - CGAL_assertion( mark!=-1 ); + size_type mark = get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution I1(*this, adart1, mark); @@ -2100,8 +2098,7 @@ CGAL_assertion( 2<=i && i<=dimension ); CGAL_assertion( (is_sewable(adart1,adart2)) ); - int mark=get_new_mark(); - CGAL_assertion( mark!=-1 ); + size_type mark=get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution I1(*this, adart1, mark); @@ -2175,7 +2172,7 @@ { CGAL_assertion( !this->template is_free<1>(adart) ); - int m = get_new_mark(); + size_type m = get_new_mark(); std::deque dartv; for ( CGAL::CMap_dart_iterator_basic_of_cell it(*this, adart, m); it.cont(); ++it ) @@ -2253,7 +2250,7 @@ { CGAL_assertion( !this->template is_free<0>(adart) ); - int m=get_new_mark(); + size_type m=get_new_mark(); std::deque dartv; std::deque modified_darts; std::deque modified_darts2; @@ -2307,7 +2304,7 @@ { CGAL_assertion( !this->template is_free<1>(adart) ); - int m = get_new_mark(); + size_type m = get_new_mark(); std::deque dartv; std::deque modified_darts; std::deque modified_darts2; @@ -2442,23 +2439,23 @@ * @return a vector containing the number of cells. */ std::vector - count_marked_cells(int amark, const std::vector& acells) const + count_marked_cells(size_type amark, const std::vector& acells) const { std::vector res(dimension+2); - std::vector marks(dimension+2); + std::vector marks(dimension+2); // Initialization of the result for ( unsigned int i=0; i tounmark; + std::vector tounmark; for ( unsigned int i=0; i& acells) const { std::vector res; - int m = get_new_mark(); + size_type m = get_new_mark(); negate_mark(m); // We mark all the cells. res = count_marked_cells(m, acells); @@ -2561,10 +2558,10 @@ * @param amark the mark. * @return the mask associated to mark amark. */ - bool get_mask_mark(int amark) const + bool get_mask_mark(size_type amark) const { - CGAL_assertion(amark>=0 && (size_type)amark=0 && amark, CGAL::CMap_dart_const_iterator_basic_of_orbit > Base; - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, int amark=-1): + Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -2621,7 +2618,7 @@ Base; Dart_of_orbit_basic_const_range(const Self &amap, Dart_const_handle - adart, int amark=-1): + adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -2665,12 +2662,12 @@ //-------------------------------------------------------------------------- template Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - int amark=-1) + size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** #else @@ -2691,7 +2688,7 @@ B6,B7,B8,B9> > Base; Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, - int /*amark*/=-1): + size_type /*amark*/=INVALID_MARK): Base(amap, adart) {} }; @@ -2709,7 +2706,7 @@ > Base; Dart_of_orbit_basic_const_range(const Self &amap, - Dart_const_handle adart, int amark=-1): + Dart_const_handle adart, size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -2855,104 +2852,104 @@ //-------------------------------------------------------------------------- // Basic versions Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart, - int amark=-1) + 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,int amark=-1) const + (Dart_const_handle adart,size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - int amark=-1) + size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, int amark=-1) const + (Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - int amark=-1) + size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, int amark=-1) const + (Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - int amark=-1) + size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, int amark=-1) const + (Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, int amark=-1) + (Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + 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 Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, int amark=-1) + (Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + 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 Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, int amark=-1) + (Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + 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 Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, int amark=-1) + (Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + 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 Dart_of_orbit_basic_range darts_of_orbit - (Dart_handle adart, int amark=-1) + (Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range (*this,adart,amark); } //-------------------------------------------------------------------------- @@ -2960,7 +2957,7 @@ unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8, unsigned int B9> Dart_of_orbit_basic_range - darts_of_orbit_basic(Dart_handle adart, int amark=-1) + darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_orbit_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- @@ -2968,7 +2965,7 @@ unsigned int B5,unsigned int B6,unsigned int B7,unsigned int B8, unsigned int B9> Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, int amark=-1) const + darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -2984,7 +2981,7 @@ , CGAL::CMap_dart_const_iterator_basic_of_cell > Base; - Dart_of_cell_basic_range(Self &amap, Dart_handle adart, int amark=-1) : + Dart_of_cell_basic_range(Self &amap, Dart_handle adart, size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; @@ -2998,7 +2995,7 @@ > Base; Dart_of_cell_basic_const_range(const Self &amap, Dart_const_handle adart, - int amark=-1) : + size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; @@ -3034,22 +3031,22 @@ /// @return a range on all the darts of the given i-cell template Dart_of_cell_basic_range darts_of_cell_basic(Dart_handle adart, - int amark=-1) + size_type amark=INVALID_MARK) { return Dart_of_cell_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range darts_of_cell_basic - (Dart_const_handle adart, int amark=-1) const + (Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_cell_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_range - darts_of_cell_basic(Dart_handle adart, int amark=-1) + darts_of_cell_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template Dart_of_cell_basic_const_range - darts_of_cell_basic(Dart_const_handle adart, int amark=-1) const + darts_of_cell_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return darts_of_cell_basic(adart,amark); } //-------------------------------------------------------------------------- template @@ -3080,7 +3077,7 @@ CGAL::CMap_dart_const_iterator_basic_of_involution > Base; Dart_of_involution_basic_range(Self &amap, Dart_handle adart, - int amark=-1): + size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -3096,30 +3093,30 @@ Dart_of_involution_basic_const_range(const Self &amap, Dart_const_handle adart, - int amark=-1) : + size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; //************************************************************************** template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, int amark=-1) + darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const + darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_range - darts_of_involution_basic(Dart_handle adart, int amark=-1) + darts_of_involution_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_involution_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_basic_const_range - darts_of_involution_basic(Dart_const_handle adart, int amark=-1) const + darts_of_involution_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -3135,7 +3132,7 @@ Base; Dart_of_involution_inv_basic_range(Self &amap, Dart_handle adart, - int amark=-1): + size_type amark=INVALID_MARK): Base(amap, adart, amark) {} }; @@ -3152,31 +3149,31 @@ Dart_of_involution_inv_basic_const_range(const Self &amap, Dart_const_handle adart, - int amark=-1) : + size_type amark=INVALID_MARK) : Base(amap, adart, amark) {} }; //************************************************************************** template Dart_of_involution_inv_basic_range - darts_of_involution_inv_basic(Dart_handle adart, int amark=-1) + darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_involution_inv_basic_range(*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_const_range - darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const + darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_inv_basic_const_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_range - darts_of_involution_inv_basic(Dart_handle adart, int amark=-1) + darts_of_involution_inv_basic(Dart_handle adart, size_type amark=INVALID_MARK) { return Dart_of_involution_inv_basic_range (*this,adart,amark); } //-------------------------------------------------------------------------- template Dart_of_involution_inv_basic_const_range - darts_of_involution_inv_basic(Dart_const_handle adart, int amark=-1) const + darts_of_involution_inv_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_involution_inv_basic_const_range (*this,adart,amark); } //************************************************************************** @@ -3535,8 +3532,8 @@ 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(); + size_type m1 = get_new_mark(); + size_type m2 = map2.get_new_mark(); toTreat1.push_back(dh1); toTreat2.push_back(dh2); @@ -3752,10 +3749,10 @@ mutable size_type mindex_marks[NB_MARKS]; /// "Stack" of free marks. - mutable int mfree_marks_stack[NB_MARKS]; + mutable size_type mfree_marks_stack[NB_MARKS]; /// "Stack" of used marks. - mutable int mused_marks_stack[NB_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]; @@ -3769,13 +3766,6 @@ typename Helper::Merge_functors m_onmerge_functors; }; - template < unsigned int d_, class Refs, class Items_, class Alloc_, - class Storage_ > - typename Combinatorial_map_base:: - Base::Null_handle_type - Combinatorial_map_base::null_handle = - Combinatorial_map_base::Base::null_handle; - template < unsigned int d_, class Items_=Combinatorial_map_min_items, class Alloc_=CGAL_ALLOCATOR(int), @@ -3792,6 +3782,8 @@ 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() {} @@ -3817,5 +3809,6 @@ } // namespace CGAL + #endif // CGAL_COMBINATORIAL_MAP_H // // EOF // diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_insertions.h cgal-4.8/include/CGAL/Combinatorial_map_insertions.h --- cgal-4.7/include/CGAL/Combinatorial_map_insertions.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_insertions.h 2016-04-04 19:00:11.000000000 +0000 @@ -43,11 +43,11 @@ bool update_attributes=true ) { typename CMap::Dart_handle d1, d2; - int mark=amap.get_new_mark(); + typename CMap::size_type mark=amap.get_new_mark(); // 1) We store all the darts of the edge. std::deque vect; - int m=amap.get_new_mark(); + 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(); @@ -144,7 +144,7 @@ first = amap.template beta<0>(first); // Mark used to mark darts already treated. - int treated = amap.get_new_mark(); + typename CMap::size_type treated = amap.get_new_mark(); // Stack of marked darts std::deque tounmark; @@ -296,7 +296,7 @@ Attribute_handle<0>::type ah=CMap::null_handle, bool update_attributes=true ) { - int mark1 = amap.get_new_mark(); + typename CMap::size_type mark1 = amap.get_new_mark(); std::deque to_unmark; { for ( CMap_dart_iterator_basic_of_cell it(amap,adart1,mark1); @@ -311,7 +311,7 @@ typename CMap::Dart_handle d2 = amap.null_handle; unsigned int s1 = 0; - int treated=amap.get_new_mark(); + typename CMap::size_type treated=amap.get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution it1(amap, adart1, treated); @@ -426,13 +426,13 @@ CGAL_assertion(is_insertable_cell_1_in_cell_2(amap, adart1, adart2)); - int m1=amap.get_new_mark(); + typename CMap::size_type m1=amap.get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution it1(amap, adart1, m1); - int m2=amap.get_new_mark(); + typename CMap::size_type m2=amap.get_new_mark(); CGAL::CMap_dart_iterator_basic_of_involution it2(amap, adart2, m2); - int mark1=amap.get_new_mark(); + typename CMap::size_type mark1=amap.get_new_mark(); std::deque to_unmark; { for ( CGAL::CMap_dart_iterator_basic_of_cell it(amap,adart1,mark1); @@ -447,7 +447,7 @@ typename CMap::Dart_handle d2=amap.null_handle; unsigned int s1=0; - int treated=amap.get_new_mark(); + typename CMap::size_type treated=amap.get_new_mark(); for ( ; it1.cont(); ++it1, ++it2) { diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_iterators_base.h cgal-4.8/include/CGAL/Combinatorial_map_iterators_base.h --- cgal-4.7/include/CGAL/Combinatorial_map_iterators_base.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_iterators_base.h 2016-04-04 19:00:11.000000000 +0000 @@ -96,6 +96,8 @@ /// 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): @@ -150,7 +152,7 @@ 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 + 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 @@ -164,7 +166,7 @@ /// 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 + typename Map::size_type amark) const { return #ifdef CGAL_CMAP_DEPRECATED exist_betaij(adart, ai, aj) && // Pb with static null_dart_handle for windows @@ -200,12 +202,14 @@ typedef Tag_true Use_mark; + typedef typename Map::size_type size_type; + CGAL_static_assertion( (Bi<=Map::dimension && boost::is_same::value) ); public: /// Main constructor. - CMap_extend_iterator(Map& amap, Dart_handle adart, int amark): + CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): Base(amap, adart), mmark_number(amark), minitial_dart(adart) @@ -218,7 +222,6 @@ 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); } } } @@ -226,7 +229,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::operator= ( Base(*this->mmap,minitial_dart) ); mto_treat = std::queue(); this->mmap->mark(minitial_dart, mmark_number); @@ -235,14 +238,13 @@ 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(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); do @@ -254,12 +256,19 @@ 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) ); + CGAL_assertion( !this->mmap->is_marked((*this), mmark_number) ); + this->mmap->mark((*this), mmark_number); if ( #ifdef CGAL_CMAP_DEPRECATED @@ -268,7 +277,6 @@ !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); } } } @@ -282,7 +290,6 @@ !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); } } @@ -298,7 +305,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; /// Initial dart Dart_handle minitial_dart; @@ -320,8 +327,10 @@ typedef Tag_true Use_mark; + typedef typename Map::size_type size_type; + /// Main constructor. - CMap_extend_iterator(Map& amap, Dart_handle adart, int amark): + CMap_extend_iterator(Map& amap, Dart_handle adart, size_type amark): Base(amap, adart, amark) { if ( this->minitial_dart!=amap.null_handle && @@ -329,20 +338,18 @@ 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); + 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)); - this->mmap->mark(this->mmap->beta(this->minitial_dart, Bi), this->mmark_number); } } @@ -362,7 +369,6 @@ !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; @@ -393,6 +399,8 @@ /// True iff this iterator is basic typedef Tag_false Basic_iterator; + typedef typename Map::size_type size_type; + CGAL_static_assertion( (boost::is_same::value) ); @@ -402,14 +410,14 @@ {} /// Destructor. - ~CMap_non_basic_iterator() + ~CMap_non_basic_iterator() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL) { - CGAL_assertion( this->mmark_number!=-1 ); + 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 = -1; // 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. @@ -426,7 +434,7 @@ (this->mmark_number)==1) unmark_treated_darts(); this->mmap->free_mark(this->mmark_number); - this->mmark_number = -1; + this->mmark_number = Map::INVALID_MARK; Base::operator=(aiterator); this->mmap->share_a_mark(this->mmark_number); @@ -522,7 +530,10 @@ typedef CMap_range Base_cmap_range; typedef It iterator; typedef Const_it const_iterator; - CMap_range(Map_ &amap, typename Map_::Dart_handle adart, int amark=-1): + + 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); } @@ -543,7 +554,7 @@ Map_ & mmap; typename Map_::Dart_handle mdart; mutable typename Map_::size_type msize; - int mmark; + size_type mmark; }; //**************************************************************************** template { typedef Const_it const_iterator; + typedef typename Map_::size_type size_type; CMap_const_range(const Map_ &amap, typename Map_::Dart_const_handle adart, - int amark=-1): + size_type amark=Map_::INVALID_MARK): mmap(amap), mdart(adart), msize(0), mmark(amark) {} const_iterator begin() const { return const_iterator(mmap,mdart,mmark); } @@ -595,7 +607,7 @@ const Map_ & mmap; typename Map_::Dart_const_handle mdart; mutable typename Map_::size_type msize; - int mmark; + size_type mmark; }; //**************************************************************************** } // namespace CGAL diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_operations.h cgal-4.8/include/CGAL/Combinatorial_map_operations.h --- cgal-4.7/include/CGAL/Combinatorial_map_operations.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_operations.h 2016-04-04 19:00:11.000000000 +0000 @@ -99,8 +99,8 @@ 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(); + typename CMap::size_type mark = amap.get_new_mark(); + typename CMap::size_type mark_modified_darts = amap.get_new_mark(); std::deque to_erase; @@ -280,7 +280,7 @@ { static size_t run(CMap& amap, typename CMap::Dart_handle adart, bool update_attributes) { - int mark = amap.get_new_mark(); + typename CMap::size_type mark = amap.get_new_mark(); std::deque to_erase; size_t res = 0; @@ -355,8 +355,7 @@ 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(); + 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 to_erase; @@ -544,8 +543,8 @@ 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(); + 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); @@ -699,8 +698,7 @@ 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(); + 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 to_erase; diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_save_load.h cgal-4.8/include/CGAL/Combinatorial_map_save_load.h --- cgal-4.7/include/CGAL/Combinatorial_map_save_load.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_save_load.h 2016-04-04 19:00:11.000000000 +0000 @@ -295,7 +295,7 @@ boost::property_tree::ptree cmap_save_darts (const CMap& amap, std::map& myDarts) { - assert( myDarts.empty() ); + CGAL_assertion( myDarts.empty() ); // First we numbered each dart by using the std::map. typename CMap::Dart_range::const_iterator it(amap.darts().begin()); diff -Nru cgal-4.7/include/CGAL/Combinatorial_map_storages.h cgal-4.8/include/CGAL/Combinatorial_map_storages.h --- cgal-4.7/include/CGAL/Combinatorial_map_storages.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Combinatorial_map_storages.h 2016-04-04 19:00:11.000000000 +0000 @@ -24,6 +24,12 @@ #include +#include +#if (BOOST_GCC >= 50000) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + namespace CGAL { /** @file Combinatorial_map_storages.h @@ -59,7 +65,7 @@ typedef typename Dart_container::size_type size_type; typedef CGAL::Void* Null_handle_type; - static Null_handle_type null_handle; + static const Null_handle_type null_handle; typedef Items_ Items; typedef Alloc_ Alloc; @@ -144,21 +150,21 @@ 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 + 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, int amark, bool avalue) const + 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, int amark) const + void flip_dart_mark(Dart_const_handle ADart, size_type amark) const { CGAL_assertion( ADart!=NULL ); ADart->flip_mark(amark); @@ -384,7 +390,7 @@ /// null_handle template < unsigned int d_, class Items_, class Alloc_ > - typename Combinatorial_map_storage_1::Null_handle_type + const typename Combinatorial_map_storage_1::Null_handle_type Combinatorial_map_storage_1::null_handle = NULL; #ifdef CGAL_CMAP_DEPRECATED @@ -405,5 +411,9 @@ } // namespace CGAL + +#if (BOOST_GCC >= 50000) + _Pragma("GCC diagnostic pop") +#endif #endif // CGAL_COMBINATORIAL_MAP_H // // EOF // diff -Nru cgal-4.7/include/CGAL/compute_average_spacing.h cgal-4.8/include/CGAL/compute_average_spacing.h --- cgal-4.7/include/CGAL/compute_average_spacing.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/compute_average_spacing.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,10 +25,17 @@ #include #include #include +#include #include #include +#ifdef CGAL_LINKED_WITH_TBB +#include +#include +#include +#endif // CGAL_LINKED_WITH_TBB + namespace CGAL { @@ -51,7 +58,7 @@ 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 + const Tree& tree, ///< KD-tree unsigned int k) ///< number of neighbors { // basic geometric types @@ -84,6 +91,32 @@ return sum_distances / (FT)i; } + +#ifdef CGAL_LINKED_WITH_TBB + template + 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& input; + std::vector& output; + + public: + Compute_average_spacings(Tree& tree, unsigned int k, std::vector& points, + std::vector& output) + : tree(tree), k (k), input (points), output (output) + { } + + void operator()(const tbb::blocked_range& r) const + { + for( std::size_t i = r.begin(); i != r.end(); ++i) + output[i] = CGAL::internal::compute_average_spacing(input[i], tree, k); + } + + }; +#endif // CGAL_LINKED_WITH_TBB + } /* namespace internal */ /// \endcond @@ -98,6 +131,9 @@ /// /// \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`. /// It can be omitted if the value type of `InputIterator` is convertible to `Point_3`. @@ -107,7 +143,8 @@ /// @return average spacing (scalar). // This variant requires the kernel. -template @@ -153,27 +190,43 @@ // 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( - - #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - get(point_pmap,it), - #else - get(point_pmap,*it), - #endif - tree,k); - nb_points++; - } +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else + if (boost::is_convertible::value) + { + std::vector spacings (kd_tree_points.size ()); + CGAL::internal::Compute_average_spacings + f (tree, k, kd_tree_points, spacings); + tbb::parallel_for(tbb::blocked_range(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( +#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)nb_points; + return sum_spacings / (FT)(kd_tree_points.size ()); } /// @cond SKIP_IN_MANUAL // This variant deduces the kernel from the iterator type. -template typename Kernel_traits::value_type>::Kernel::FT @@ -185,7 +238,7 @@ { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - return compute_average_spacing( + return compute_average_spacing( first,beyond, point_pmap, k, @@ -195,14 +248,14 @@ /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map. -template < typename InputIterator > +template < typename Concurrency_tag, typename InputIterator > typename Kernel_traits::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( + return compute_average_spacing( first,beyond, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 make_dereference_property_map(first), diff -Nru cgal-4.7/include/CGAL/Concurrent_compact_container.h cgal-4.8/include/CGAL/Concurrent_compact_container.h --- cgal-4.7/include/CGAL/Concurrent_compact_container.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Concurrent_compact_container.h 2016-04-04 19:00:12.000000000 +0000 @@ -1022,9 +1022,39 @@ return rhs.operator->() != NULL; } + template + std::size_t hash_value(const CCC_iterator& i) + { + return reinterpret_cast(&*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 > + : public std::unary_function, std::size_t> { + + std::size_t operator()(const CGAL::CCC_internal::CCC_iterator& i) const + { + return reinterpret_cast(&*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 diff -Nru cgal-4.7/include/CGAL/config.h cgal-4.8/include/CGAL/config.h --- cgal-4.7/include/CGAL/config.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/config.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 1997-2010 +// Copyright (c) 1997-2013 // Utrecht University (The Netherlands), // ETH Zurich (Switzerland), // INRIA Sophia-Antipolis (France), @@ -23,6 +23,7 @@ // Author(s) : Wieger Wesselink // Michael Hoffmann // Sylvain Pion +// Laurent Rineau #ifndef CGAL_CONFIG_H #define CGAL_CONFIG_H @@ -43,6 +44,12 @@ # 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 +#endif // CGAL_ENABLE_VLD + // Workaround to the following bug: // https://bugreports.qt-project.org/browse/QTBUG-22829 #ifdef Q_MOC_RUN @@ -85,6 +92,14 @@ #include #include +// 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 //----------------------------------------------------------------------// @@ -114,42 +129,55 @@ // ----------------------------------------------------------------------// #if defined(BOOST_NO_CXX11_RANGE_BASED_FOR) || BOOST_VERSION < 105000 -#define CGAL_NO_CPP0X_RANGE_BASED_FOR 1 +#define CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR 1 #endif -#if defined(BOOST_NO_0X_HDR_ARRAY) || BOOST_VERSION < 104000 +#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) || (BOOST_VERSION < 103600) +#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) || (BOOST_VERSION < 103600) +#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) || (BOOST_VERSION < 104100) +#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) || (BOOST_VERSION < 103900) +#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 +#define CGAL_CFG_NO_CPP0X_ISFINITE 1 // used in #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 +#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) || (BOOST_VERSION < 103600) +#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) || (BOOST_VERSION < 103600) +#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) || (BOOST_VERSION < 104000) +#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) || (BOOST_VERSION < 103600) +#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 @@ -240,7 +268,16 @@ // Big endian or little endian machine. // ==================================== -#if defined (__GLIBC__) +#if (BOOST_VERSION >= 105500) +# include +# 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 # if (__BYTE_ORDER == __LITTLE_ENDIAN) # define CGAL_LITTLE_ENDIAN @@ -358,6 +395,9 @@ #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 @@ -418,6 +458,26 @@ # 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() && __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() && __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. @@ -443,4 +503,17 @@ } //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 -Nru cgal-4.7/include/CGAL/Constrained_triangulation_plus_2.h cgal-4.8/include/CGAL/Constrained_triangulation_plus_2.h --- cgal-4.7/include/CGAL/Constrained_triangulation_plus_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Constrained_triangulation_plus_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -31,6 +31,12 @@ #include #include +#if defined(BOOST_MSVC) && (BOOST_VERSION == 105500) +#include +#else +#include +#endif + #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4355) @@ -253,6 +259,10 @@ 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); @@ -585,6 +595,10 @@ typename Constrained_triangulation_plus_2::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); @@ -798,23 +812,20 @@ // 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()){ - typename List_edges::iterator it, it2; - - it = edges.begin(); - it2 = it; - ++it2; - for(; it2 != edges.end();){ - Edge e1 = *it, e2 = *it2; - if(this->mirror_edge(e1) == e2){ - typename List_edges::iterator del = it; - --it; - edges.erase(del); + +#if defined(BOOST_MSVC) && (BOOST_VERSION == 105500) + std::set faces(intersected_faces.begin(), intersected_faces.end()); +#else + boost::container::flat_set 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); - it2 = it; - ++it2; - } else { + }else { ++it; - ++it2; } } } diff -Nru cgal-4.7/include/CGAL/Constrained_voronoi_diagram_2.h cgal-4.8/include/CGAL/Constrained_voronoi_diagram_2.h --- cgal-4.7/include/CGAL/Constrained_voronoi_diagram_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Constrained_voronoi_diagram_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -273,7 +273,7 @@ if(!m_cdt.is_infinite(seed) && !seed->is_blind() - && m_cdt.triangle(seed).area() != 0) + && !m_cdt.triangle(seed).is_degenerate() ) //to avoid flat triangles outside the domain { std::stack faces; diff -Nru cgal-4.7/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h cgal-4.8/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h --- cgal-4.7/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/constructions/constructions_on_weighted_points_cartesian_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -65,6 +65,48 @@ spx,spy,spz); } +template +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 diff -Nru cgal-4.7/include/CGAL/Convex_hull_2/ch_melkman_impl.h cgal-4.8/include/CGAL/Convex_hull_2/ch_melkman_impl.h --- cgal-4.7/include/CGAL/Convex_hull_2/ch_melkman_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Convex_hull_2/ch_melkman_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -37,7 +37,6 @@ 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(); diff -Nru cgal-4.7/include/CGAL/CORE/BigFloat.h cgal-4.8/include/CGAL/CORE/BigFloat.h --- cgal-4.7/include/CGAL/CORE/BigFloat.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/BigFloat.h 2016-04-04 19:00:11.000000000 +0000 @@ -84,8 +84,8 @@ BigFloat(const BigInt& I) : RCBigFloat(new BigFloatRep(I)) {} /// constructor for BigRat - BigFloat(const BigRat& R, const extLong& r = defRelPrec, - const extLong& a = defAbsPrec) + BigFloat(const BigRat& R, const extLong& r = get_static_defRelPrec(), + const extLong& a = get_static_defAbsPrec()) : RCBigFloat(new BigFloatRep()) { rep->approx(R, r, a); } @@ -94,8 +94,8 @@ // know about Expr, but BigFloat has a special role in our system! // =============================== /// constructor for Expr - explicit BigFloat(const Expr& E, const extLong& r = defRelPrec, - const extLong& a = defAbsPrec); + 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& , @@ -162,7 +162,7 @@ /// operator/= BigFloat& operator/= (const BigFloat& x) { BigFloat z; - z.rep->div(*rep, *x.rep, defBFdivRelPrec); + z.rep->div(*rep, *x.rep, get_static_defBFdivRelPrec()); *this = z; return *this; } @@ -183,11 +183,11 @@ /// \name String Conversion Functions //@{ /// set value from const char* (base = 10) - void fromString(const char* s, const extLong& p=defBigFloatInputDigits) { + void fromString(const char* s, const extLong& p=get_static_defBigFloatInputDigits()) { rep->fromString(s, p); } /// convert to std::string (base = 10) - std::string toString(long prec=defBigFloatOutputDigits, bool sci=false) const { + std::string toString(long prec=get_static_defBigFloatOutputDigits(), bool sci=false) const { return rep->toString(prec, sci); } std::string str() const { @@ -436,7 +436,7 @@ /// operator/ inline BigFloat operator/ (const BigFloat& x, const BigFloat& y) { BigFloat z; - z.getRep().div(x.getRep(),y.getRep(),defBFdivRelPrec); + z.getRep().div(x.getRep(),y.getRep(),get_static_defBFdivRelPrec()); return z; } @@ -491,12 +491,12 @@ /// 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); + return root(x, k, get_static_defBFsqrtAbsPrec(), x); } /// sqrt to defAbsPrec: inline BigFloat sqrt(const BigFloat& x) { - return x.sqrt(defBFsqrtAbsPrec); + return x.sqrt(get_static_defBFsqrtAbsPrec()); } /// convert an BigFloat Interval to a BigFloat with error bits @@ -626,4 +626,10 @@ *this = f.BigRatValue(); } } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_BIGFLOAT_H_ diff -Nru cgal-4.7/include/CGAL/CORE/BigFloat_impl.h cgal-4.8/include/CGAL/CORE/BigFloat_impl.h --- cgal-4.7/include/CGAL/CORE/BigFloat_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/BigFloat_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chen Li + * Zilin Du + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@cs.nyu.edu + * + * $URL$ + * $Id$ + ***************************************************************************/ + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include + +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(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(x.err), + abs(y.m) - static_cast(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(x.err) >> bits(t)) + // + delta + static_cast(y.err) * abs(m), + // abs(y.m) - static_cast(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(y.err) * abs(m), + // abs(y.m) - static_cast(y.err), + // bigErr, + // errRemainder); + div_rem(bigErr, errRemainder, + abs(remainder) + errx_over_Bexp + delta + static_cast(y.err) * abs(m), + abs(y.m) - static_cast(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(-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<(ee)); + else + mm = (mm << static_cast(-ee)); + if (E > 0) + mm *= (FiveTo(E)<< static_cast(E)); + else + M *= (FiveTo(-E) << static_cast(-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(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(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(le); // discard the contaminated bits. + e2 += le; // adjust the exponent + + if (e2 < 0) + return M >> static_cast(-e2); + else if (e2 > 0) + return M << static_cast(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(le); // discard the contaminated bits. + e2 += le; // adjust the exponent + long t; + if (e2 < 0) + t = ulongValue(M >> static_cast(-e2)); + else if (e2 > 0) + t = ulongValue(M << static_cast(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 -Nru cgal-4.7/include/CGAL/CORE/BigFloatRep.h cgal-4.8/include/CGAL/CORE/BigFloatRep.h --- cgal-4.7/include/CGAL/CORE/BigFloatRep.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/BigFloatRep.h 2016-04-04 19:00:11.000000000 +0000 @@ -84,8 +84,8 @@ // the destructor ~BigFloatRep(); //inline - CORE_MEMORY(BigFloatRep) // allocate the memory pool, unless - // memory pool feature is disabled. + 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&); @@ -144,11 +144,11 @@ // conversion // toString() Joaquin Grech 31/5/2003 - std::string toString(long prec=defBigFloatOutputDigits, bool sci=false) const; + 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=defBigFloatOutputDigits, + DecimalOutput toDecimal(unsigned int width=get_static_defBigFloatOutputDigits(), bool Scientific=false) const; - void fromString(const char *p, const extLong & prec = defBigFloatInputDigits); + void fromString(const char *p, const extLong & prec = get_static_defBigFloatInputDigits()); void dump() const; //inline long adjustE(long E, BigInt M, long e) const; @@ -443,5 +443,7 @@ std::cout << " -- End of BFRep " << this << " -- " << std::endl; } + + } //namespace CORE #endif // _CORE_BIGFLOATREP_H_ diff -Nru cgal-4.7/include/CGAL/CORE/BigInt.h cgal-4.8/include/CGAL/CORE/BigInt.h --- cgal-4.7/include/CGAL/CORE/BigInt.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/BigInt.h 2016-04-04 19:00:11.000000000 +0000 @@ -94,7 +94,8 @@ mpz_clear(mp); } - CORE_MEMORY(BigIntRep) + CGAL_CORE_EXPORT CORE_NEW(BigIntRep) + CGAL_CORE_EXPORT CORE_DELETE(BigIntRep) mpz_srcptr get_mp() const { return mp; @@ -558,5 +559,8 @@ } //@} + + } //namespace CORE + #endif // _CORE_BIGINT_H_ diff -Nru cgal-4.7/include/CGAL/CORE/BigRat.h cgal-4.8/include/CGAL/CORE/BigRat.h --- cgal-4.7/include/CGAL/CORE/BigRat.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/BigRat.h 2016-04-04 19:00:11.000000000 +0000 @@ -115,7 +115,8 @@ mpq_clear(mp); } - CORE_MEMORY(BigRatRep) + CGAL_CORE_EXPORT CORE_NEW(BigRatRep) + CGAL_CORE_EXPORT CORE_DELETE(BigRatRep) mpq_srcptr get_mp() const { return mp; @@ -485,5 +486,6 @@ return a.BigIntValue(); } + } //namespace CORE #endif // _CORE_BIGRAT_H_ diff -Nru cgal-4.7/include/CGAL/CORE/CoreAux.h cgal-4.8/include/CGAL/CORE/CoreAux.h --- cgal-4.7/include/CGAL/CORE/CoreAux.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/CoreAux.h 2016-04-04 19:00:11.000000000 +0000 @@ -181,4 +181,9 @@ } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_COREAUX_H_ diff -Nru cgal-4.7/include/CGAL/CORE/CoreAux_impl.h cgal-4.8/include/CGAL/CORE/CoreAux_impl.h --- cgal-4.7/include/CGAL/CORE/CoreAux_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/CoreAux_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chen Li + * Zilin Du + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@cs.nyu.edu + * + * $URL$ + * $Id$ + ***************************************************************************/ + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +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 (p0) { + 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"< +#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 { ////////////////////////////////////////////////////////////// @@ -60,34 +80,34 @@ /** 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; +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_CORE_EXPORT extern int InvalidFlag; +CGAL_GLOBAL_STATE_VAR(int, InvalidFlag, 0) /// Escape Precision in bits -CGAL_CORE_EXPORT extern extLong EscapePrec; +CGAL_GLOBAL_STATE_VAR(extLong, EscapePrec, CORE_posInfty) /// current ur when EscapePrec triggered /** this flag becomes negative when default EscapePrec is applied */ -CGAL_CORE_EXPORT extern long EscapePrecFlag; +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_CORE_EXPORT extern bool EscapePrecWarning; +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_CORE_EXPORT extern extLong defRelPrec; +CGAL_GLOBAL_STATE_VAR(extLong, defRelPrec, 60) /// default Absolute Precision in bits -CGAL_CORE_EXPORT extern extLong defAbsPrec; +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. @@ -97,42 +117,41 @@ "controls the printout precision of std::cout for BigFloat" Perhaps, we should merge defOutputDigits and defBigFloatOutputDigits? */ -CGAL_CORE_EXPORT extern long 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_CORE_EXPORT extern extLong defInputDigits; +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_CORE_EXPORT extern long defOutputDigits; +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_CORE_EXPORT extern long defBigFloatInputDigits; +CGAL_GLOBAL_STATE_VAR(long, defBigFloatInputDigits, 16) /// default BigFloat Division Relative Precision -CGAL_CORE_EXPORT extern extLong defBFdivRelPrec; - +CGAL_GLOBAL_STATE_VAR(extLong, defBFdivRelPrec, 54) /// default BigFloat Sqrt Absolute Precision -CGAL_CORE_EXPORT extern extLong defBFsqrtAbsPrec; +CGAL_GLOBAL_STATE_VAR(extLong, defBFsqrtAbsPrec, 54) ////////////////////////////////////////////////////////////// // Mode parameters: incremental, progressive, filters ////////////////////////////////////////////////////////////// /// floating point filter flag -CGAL_CORE_EXPORT extern bool fpFilterFlag; +CGAL_GLOBAL_STATE_VAR(bool, fpFilterFlag, true) /// if true, evaluation of expressions would be incremental -CGAL_CORE_EXPORT extern bool incrementalEvalFlag; +CGAL_GLOBAL_STATE_VAR(bool, incrementalEvalFlag, true) /// progressive evaluation flag -CGAL_CORE_EXPORT extern bool progressiveEvalFlag; +CGAL_GLOBAL_STATE_VAR(bool, progressiveEvalFlag, true) /// rational reduction flag -CGAL_CORE_EXPORT extern bool rationalReduceFlag; +CGAL_GLOBAL_STATE_VAR(bool, rationalReduceFlag, false) /// default initial (bit) precision for AddSub Progressive Evaluation -CGAL_CORE_EXPORT extern long defInitialProgressivePrec; +CGAL_GLOBAL_STATE_VAR(long, defInitialProgressivePrec, 64) ////////////////////////////////////////////////////////////// // methods for setting global precision parameters @@ -144,87 +163,87 @@ /** 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; + get_static_defRelPrec() = r; + get_static_defAbsPrec() = a; } /// set default relative precision inline extLong setDefaultRelPrecision(const extLong &r) { - extLong old = defRelPrec; - defRelPrec = r; + extLong old = get_static_defRelPrec(); + get_static_defRelPrec() = r; return old; } /// set default absolute precision inline extLong setDefaultAbsPrecision(const extLong &a) { - extLong old = defAbsPrec; - defAbsPrec = 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 = defInputDigits; - defInputDigits = d; + extLong old = get_static_defInputDigits(); + get_static_defInputDigits() = d; return old; } /// set default output digits (for Expr, Real) -inline long setDefaultOutputDigits(long d = defOutputDigits, +inline long setDefaultOutputDigits(long d = get_static_defOutputDigits(), std::ostream& o = std::cout) { - long old = defOutputDigits; - defOutputDigits = d; + 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 = defBigFloatInputDigits; - defBigFloatInputDigits = 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 = defBigFloatOutputDigits; - defBigFloatOutputDigits = 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 = fpFilterFlag; - fpFilterFlag = 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 = incrementalEvalFlag; - incrementalEvalFlag = 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 = progressiveEvalFlag; - progressiveEvalFlag = 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 = defInitialProgressivePrec; - defInitialProgressivePrec = 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 = rationalReduceFlag; - rationalReduceFlag = f; + bool oldf = get_static_rationalReduceFlag(); + get_static_rationalReduceFlag() = f; return oldf; } @@ -235,9 +254,9 @@ 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); + get_static_defAbsPrec() = CORE_posInfty; + get_static_defOutputDigits() = d; + std::setprecision(get_static_defOutputDigits()); } /// change to scientific output format @@ -251,4 +270,9 @@ } } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_COREDEFS_H_ diff -Nru cgal-4.7/include/CGAL/CORE/CoreDefs_impl.h cgal-4.8/include/CGAL/CORE/CoreDefs_impl.h --- cgal-4.7/include/CGAL/CORE/CoreDefs_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/CoreDefs_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chen Li + * Zilin Du + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@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 -Nru cgal-4.7/include/CGAL/CORE/CoreIO_impl.h cgal-4.8/include/CGAL/CORE/CoreIO_impl.h --- cgal-4.7/include/CGAL/CORE/CoreIO_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/CoreIO_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chee Yap + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@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 +#include +#include + +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 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) + 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 -Nru cgal-4.7/include/CGAL/CORE/Expr.h cgal-4.8/include/CGAL/CORE/Expr.h --- cgal-4.7/include/CGAL/CORE/Expr.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Expr.h 2016-04-04 19:00:11.000000000 +0000 @@ -36,6 +36,10 @@ * $Id$ ***************************************************************************/ +// We need to include BigFloat.h here because there is a circular dependency +// between Expr and BigFloat. +#include + #ifndef _CORE_EXPR_H_ #define _CORE_EXPR_H_ @@ -79,9 +83,9 @@ // (i.e., not infinite and not NaN) if (! CGAL_CORE_finite(f)) { std::cerr << " ERROR : constructed an invalid float! " << std::endl; - if (AbortFlag) + if (get_static_AbortFlag()) abort(); - InvalidFlag = -1; + get_static_InvalidFlag() = -1; } rep = new ConstDoubleRep(f); } @@ -90,9 +94,9 @@ // (i.e., not infinite and not NaN) if (! CGAL_CORE_finite(d)) { std::cerr << " ERROR : constructed an invalid double! " << std::endl; - if (AbortFlag) + if (get_static_AbortFlag()) abort(); - InvalidFlag = -2; + get_static_InvalidFlag() = -2; } rep = new ConstDoubleRep(d); } @@ -112,11 +116,11 @@ * it is generally recommended that the (String) constructor be used in * preference to the (double) constructor. */ - Expr(const char *s, const extLong& p = defInputDigits) + Expr(const char *s, const extLong& p = get_static_defInputDigits()) : RCExpr(new ConstRealRep(Real(s, p))) {} /// constructor for std::string - Expr(const std::string& s, const extLong& p = defInputDigits) + Expr(const std::string& s, const extLong& p = get_static_defInputDigits()) : RCExpr(new ConstRealRep(Real(s, p))) {} /// constructor for Real @@ -180,9 +184,9 @@ Expr& operator/=(const Expr& e) { if ((e.rep)->getSign() == 0) { std::cerr << " ERROR : division by zero ! " << std::endl; - if (AbortFlag) + if (get_static_AbortFlag()) abort(); - InvalidFlag = -3; + get_static_InvalidFlag() = -3; } *this = new DivRep(rep, e.rep); return *this; @@ -226,12 +230,12 @@ /// \name String Conversion Functions //@{ /// set value from const char* - void fromString(const char* s, const extLong& prec = defInputDigits) { + void fromString(const char* s, const extLong& prec = get_static_defInputDigits()) { *this = Expr(s, prec); } /// convert to std::string /** give decimal string representation */ - std::string toString(long prec=defOutputDigits, bool sci=false) const { + std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) const { return rep->toString(prec, sci); } //@} @@ -283,8 +287,8 @@ /** 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 { + const Real & approx(const extLong& relPrec = get_static_defRelPrec(), + const extLong& absPrec = get_static_defAbsPrec()) const { return rep->getAppValue(relPrec, absPrec); } //@} @@ -356,7 +360,7 @@ /// I/O Stream operator>> inline std::istream& operator>>(std::istream& i, Expr& e) { Real rVal; - i >> rVal; // precision is = defInputDigits + i >> rVal; // precision is = get_static_defInputDigits() if (i) e = rVal; // only assign when reading is successful. return i; @@ -383,9 +387,9 @@ inline Expr operator/(const Expr& e1, const Expr& e2) { if (e2.sign() == 0) { std::cerr << " ERROR : division by zero ! " << std::endl; - if (AbortFlag) + if (get_static_AbortFlag()) abort(); - InvalidFlag = -4; + get_static_InvalidFlag() = -4; } return Expr(new DivRep(e1.Rep(), e2.Rep())); } @@ -486,9 +490,9 @@ inline Expr sqrt(const Expr& e) { if (e.sign() < 0) { std::cerr << " ERROR : sqrt of negative value ! " << std::endl; - if (AbortFlag) + if (get_static_AbortFlag()) abort(); - InvalidFlag = -5; + get_static_InvalidFlag() = -5; } return Expr(new SqrtRep(e.Rep())); } @@ -549,4 +553,9 @@ #include } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_EXPR_H_ diff -Nru cgal-4.7/include/CGAL/CORE/Expr_impl.h cgal-4.8/include/CGAL/CORE/Expr_impl.h --- cgal-4.7/include/CGAL/CORE/Expr_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Expr_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chee Yap + * Igor Pechtchanski + * Vijay Karamcheti + * Chen Li + * Zilin Du + * Sylvain Pion + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@cs.nyu.edu + * + * $URL$ + * $Id$ + ***************************************************************************/ + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +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; idebugTree(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; idebugList(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; idebugTree(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 +void * AddSubRep::operator new( size_t size) +{ return MemoryPool >::global_allocator().allocate(size); } + +template +void AddSubRep::operator delete( void *p, size_t ) +{ MemoryPool >::global_allocator().free(p); } + + + +template +void * Realbase_for::operator new( size_t size) +{ return MemoryPool >::global_allocator().allocate(size); } + +template +void Realbase_for::operator delete( void *p, size_t ) +{ MemoryPool >::global_allocator().free(p); } + + template class AddSubRep; + template class AddSubRep; + +template class Realbase_for; +template class Realbase_for; +template class Realbase_for; +template class Realbase_for; +template class Realbase_for; + + template class ConstPolyRep; + template class ConstPolyRep; + template class ConstPolyRep; + template class ConstPolyRep; +} //namespace CORE diff -Nru cgal-4.7/include/CGAL/CORE/ExprRep.h cgal-4.8/include/CGAL/CORE/ExprRep.h --- cgal-4.7/include/CGAL/CORE/ExprRep.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/ExprRep.h 2016-04-04 19:00:11.000000000 +0000 @@ -45,7 +45,7 @@ namespace CORE { -#ifdef CORE_DEBUG_BOUND +#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; @@ -189,8 +189,8 @@ /// \name Helper Functions //@{ /// Get the approximate value - CGAL_CORE_EXPORT const Real & getAppValue(const extLong& relPrec = defRelPrec, - const extLong& absPrec = defAbsPrec); + 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(); @@ -389,8 +389,8 @@ 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); + std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) { + return (getAppValue(get_static_defRelPrec(), get_static_defAbsPrec())).toString(prec,sci); } //@} @@ -517,7 +517,8 @@ /// destructor ~ConstDoubleRep() {} //@} - CORE_MEMORY(ConstDoubleRep) + CGAL_CORE_EXPORT CORE_NEW(ConstDoubleRep) + CGAL_CORE_EXPORT CORE_DELETE(ConstDoubleRep) protected: /// compute sign and MSB CGAL_CORE_EXPORT void computeExactFlags(); @@ -538,7 +539,8 @@ /// destructor ~ConstRealRep() {} //@} - CORE_MEMORY(ConstRealRep) + CGAL_CORE_EXPORT CORE_NEW(ConstRealRep) + CGAL_CORE_EXPORT CORE_DELETE(ConstRealRep) private: Real value; ///< internal representation of node protected: @@ -593,7 +595,14 @@ /// destructor ~ConstPolyRep() {} //@} - CORE_MEMORY(ConstPolyRep) + + CGAL_CORE_EXPORT void *operator new( size_t size){ + return MemoryPool::global_allocator().allocate(size); + } + + CGAL_CORE_EXPORT void operator delete( void *p, size_t ){ + MemoryPool::global_allocator().free(p); + } private: Sturm ss; ///< internal Sturm sequences @@ -677,7 +686,7 @@ tc() = ceilLg(ss.seq[0].getTailCoeff()); // no rational reduction - if (rationalReduceFlag) + if (get_static_rationalReduceFlag()) ratFlag() = -1; flagsComputed() = true; @@ -696,6 +705,8 @@ appValue() = centerize(I.first, I.second); } }; + + /// \class UnaryOpRep /// \brief unary operator node class UnaryOpRep : public ExprRep { @@ -745,7 +756,8 @@ ~NegRep() {} //@} - CORE_MEMORY(NegRep) + CGAL_CORE_EXPORT CORE_NEW(NegRep) + CGAL_CORE_EXPORT CORE_DELETE(NegRep) protected: /// compute sign and MSB CGAL_CORE_EXPORT void computeExactFlags(); @@ -775,7 +787,8 @@ ~SqrtRep() {} //@} - CORE_MEMORY(SqrtRep) + CGAL_CORE_EXPORT CORE_NEW(SqrtRep) + CGAL_CORE_EXPORT CORE_DELETE(SqrtRep) protected: /// compute sign and MSB CGAL_CORE_EXPORT void computeExactFlags(); @@ -838,7 +851,12 @@ /// \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 @@ -857,7 +875,12 @@ /// \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 @@ -887,7 +910,8 @@ ~AddSubRep() {} //@} - CORE_MEMORY(AddSubRep) + CGAL_CORE_EXPORT CORE_NEW(AddSubRep) + CGAL_CORE_EXPORT CORE_DELETE(AddSubRep) protected: /// compute sign and MSB void computeExactFlags(); @@ -895,7 +919,7 @@ void computeApproxValue(const extLong&, const extLong&); /// return operator in string const std::string op() const { - return Operator::name; + return Operator::get_name(); } private: static Operator Op; @@ -925,7 +949,7 @@ reduceTo(second); sign() = Op(ss); appValue() = Op(appValue()); - if (rationalReduceFlag && ratFlag() > 0) + if (get_static_rationalReduceFlag() && ratFlag() > 0) *(ratValue()) = Op(*(ratValue())); return; } else if (ss == 0) { // second operand is zero @@ -933,7 +957,7 @@ return; } // rational node - if (rationalReduceFlag) { + if (get_static_rationalReduceFlag()) { if (first->ratFlag() > 0 && second->ratFlag() > 0) { BigRat val=Op(*(first->ratValue()), *(second->ratValue())); reduceToBigRat(val); @@ -1046,7 +1070,7 @@ if (lowBound <= EXTLONG_ZERO) lowBound = EXTLONG_ONE; - if (!progressiveEvalFlag) { + if (!get_static_progressiveEvalFlag()) { // convert the absolute error requirement "lowBound" to // a relative error requirement "ur", s.t. // |x|*2^(-ur) <= 2^(-lowBound). @@ -1085,7 +1109,7 @@ // 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 i = core_min(get_static_defInitialProgressivePrec(), lowBound.asLong()); extLong ua = lowBound.asLong() + EXTLONG_ONE; // NOTE: ua is allowed to be CORE_INFTY @@ -1096,7 +1120,7 @@ lMSB() = CORE_negInfty; sign() = 0; - EscapePrecFlag = 0; // reset the Escape Flag + 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: @@ -1151,22 +1175,22 @@ 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 + 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 (EscapePrecWarning) + if (get_static_EscapePrecWarning()) std::cout<< "Escape Precision triggered at " - << EscapePrec << " bits" << std::endl; + << get_static_EscapePrec() << " bits" << std::endl; #ifdef CORE_DEBUG - std::cout << "EscapePrecFlags=" << EscapePrecFlag << std::endl; + std::cout << "EscapePrecFlags=" << get_static_EscapePrecFlag() << std::endl; std::cout << "ua =" << ua << ",lowBound=" << lowBound << std::endl; #endif break; }// if }// for (long i=1...) -#ifdef CORE_DEBUG_BOUND +#if defined(CORE_DEBUG_BOUND) && !defined(CGAL_HEADER_ONLY) rootBoundHitCounter++; #endif @@ -1234,7 +1258,8 @@ ~MultRep() {} //@} - CORE_MEMORY(MultRep) + CGAL_CORE_EXPORT CORE_NEW(MultRep) + CGAL_CORE_EXPORT CORE_DELETE(MultRep) protected: /// compute sign and MSB CGAL_CORE_EXPORT void computeExactFlags(); @@ -1260,7 +1285,8 @@ ~DivRep() {} //@} - CORE_MEMORY(DivRep) + CGAL_CORE_EXPORT CORE_NEW(DivRep) + CGAL_CORE_EXPORT CORE_DELETE(DivRep) protected: /// compute sign and MSB CGAL_CORE_EXPORT void computeExactFlags(); diff -Nru cgal-4.7/include/CGAL/CORE/extLong.h cgal-4.8/include/CGAL/CORE/extLong.h --- cgal-4.7/include/CGAL/CORE/extLong.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/extLong.h 2016-04-04 19:00:11.000000000 +0000 @@ -294,4 +294,9 @@ } } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_EXTLONG_H_ diff -Nru cgal-4.7/include/CGAL/CORE/extLong_impl.h cgal-4.8/include/CGAL/CORE/extLong_impl.h --- cgal-4.7/include/CGAL/CORE/extLong_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/extLong_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chen Li + * Zilin Du + * Sylvain Pion + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@cs.nyu.edu + * + * $URL$ + * $Id$ + ***************************************************************************/ + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include + +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 -Nru cgal-4.7/include/CGAL/CORE/Filter.h cgal-4.8/include/CGAL/CORE/Filter.h --- cgal-4.7/include/CGAL/CORE/Filter.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Filter.h 2016-04-04 19:00:11.000000000 +0000 @@ -103,7 +103,7 @@ } /// check whether the sign (!) of the filtered value is OK bool isOK() const { - return (fpFilterFlag && // To disable filter + return (get_static_fpFilterFlag() && // To disable filter CGAL_CORE_finite(fpVal) && // Test for infinite and NaNs (core_abs(fpVal) >= maxAbs*ind*CORE_EPS)); } diff -Nru cgal-4.7/include/CGAL/CORE/Gmp.h cgal-4.8/include/CGAL/CORE/Gmp.h --- cgal-4.7/include/CGAL/CORE/Gmp.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Gmp.h 2016-04-04 19:00:11.000000000 +0000 @@ -39,4 +39,9 @@ //std::istream& operator>> (std::istream &, mpq_ptr); } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_GMP_H_ diff -Nru cgal-4.7/include/CGAL/CORE/Gmp_impl.h cgal-4.8/include/CGAL/CORE/Gmp_impl.h --- cgal-4.7/include/CGAL/CORE/Gmp_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Gmp_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/CORE/Impl.h cgal-4.8/include/CGAL/CORE/Impl.h --- cgal-4.7/include/CGAL/CORE/Impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -42,13 +42,18 @@ // Macros for memory pool #ifdef CORE_DISABLE_MEMORY_POOL - #define CORE_MEMORY(T) + #define CORE_NEW(T) + #define CORE_DELETE(T) + #define CORE_MEMORY_IMPL(T) #else #include - #define CORE_MEMORY(T) \ - void *operator new( size_t size) \ + #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::global_allocator().allocate(size); } \ - void operator delete( void *p, size_t ) \ + void T::operator delete( void *p, size_t ) \ { MemoryPool::global_allocator().free(p); } #endif diff -Nru cgal-4.7/include/CGAL/CORE/MemoryPool.h cgal-4.8/include/CGAL/CORE/MemoryPool.h --- cgal-4.7/include/CGAL/CORE/MemoryPool.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/MemoryPool.h 2016-04-04 19:00:11.000000000 +0000 @@ -37,15 +37,43 @@ #include // for placement new #include #include +#include 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); @@ -53,15 +81,10 @@ static MemoryPool& global_allocator() { return memPool; } - -private: - struct Thunk { - T object; - Thunk* next; - }; - + private: Thunk* head; // next available block in the pool + std::vector blocks; private: // Static global allocator. @@ -80,6 +103,7 @@ Thunk* pool = reinterpret_cast( ::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 ) { @@ -99,6 +123,10 @@ 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(t)->next = head; diff -Nru cgal-4.7/include/CGAL/CORE/poly/Poly.h cgal-4.8/include/CGAL/CORE/poly/Poly.h --- cgal-4.7/include/CGAL/CORE/poly/Poly.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/poly/Poly.h 2016-04-04 19:00:11.000000000 +0000 @@ -206,7 +206,8 @@ /// 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; + 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. diff -Nru cgal-4.7/include/CGAL/CORE/Real.h cgal-4.8/include/CGAL/CORE/Real.h --- cgal-4.7/include/CGAL/CORE/Real.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Real.h 2016-04-04 19:00:11.000000000 +0000 @@ -57,10 +57,10 @@ 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) { + Real(const char* s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL) { constructFromString(s, prec); } - Real(const std::string& s, const extLong& prec=defInputDigits) : RCReal(NULL){ + Real(const std::string& s, const extLong& prec=get_static_defInputDigits()) : RCReal(NULL){ constructFromString(s.c_str(), prec); } @@ -134,12 +134,12 @@ /// \name String Conversion Functions //@{ /// set value from const char* - void fromString(const char* s, const extLong& prec = defInputDigits) { + void fromString(const char* s, const extLong& prec = get_static_defInputDigits()) { *this = Real(s, prec); } /// convert to std::string /** give decimal string representation */ - std::string toString(long prec=defOutputDigits, bool sci=false) const { + std::string toString(long prec=get_static_defOutputDigits(), bool sci=false) const { return rep->toString(prec, sci); } //@} @@ -179,7 +179,8 @@ /// \name Aprroximation Function //@{ /// approximation - Real approx(const extLong& r=defRelPrec, const extLong& a=defAbsPrec) const { + Real approx(const extLong& r=get_static_defRelPrec(), + const extLong& a=get_static_defAbsPrec()) const { return rep->approx(r, a); } //@} @@ -395,7 +396,7 @@ return *this; } inline Real& Real::operator/=(const Real& rhs) { - *this = real_div::eval(getRep(), rhs.getRep(), defRelPrec); + *this = real_div::eval(getRep(), rhs.getRep(), get_static_defRelPrec()); return *this; } @@ -413,7 +414,7 @@ } // operator/ inline Real operator/(const Real& x, const Real& y) { - return real_div::eval(x.getRep(), y.getRep(), defRelPrec); + 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 { @@ -478,7 +479,7 @@ } /// square root inline Real sqrt(const Real& x) { - return x.sqrt(defAbsPrec); + return x.sqrt(get_static_defAbsPrec()); } // class Realbase_for (need defined after Real) @@ -493,4 +494,9 @@ } } //namespace CORE + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // _CORE_REAL_H_ diff -Nru cgal-4.7/include/CGAL/CORE/Real_impl.h cgal-4.8/include/CGAL/CORE/Real_impl.h --- cgal-4.7/include/CGAL/CORE/Real_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/Real_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + * Chee Yap + * Chen Li + * Zilin Du + * Sylvain Pion + * + * WWW URL: http://cs.nyu.edu/exact/ + * Email: exact@cs.nyu.edu + * + * $URL$ + * $Id$ + ***************************************************************************/ + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +#ifdef CGAL_HEADER_ONLY +#include // 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(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 -Nru cgal-4.7/include/CGAL/CORE/RealRep.h cgal-4.8/include/CGAL/CORE/RealRep.h --- cgal-4.7/include/CGAL/CORE/RealRep.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE/RealRep.h 2016-04-04 19:00:11.000000000 +0000 @@ -93,7 +93,10 @@ template class Realbase_for : public RealRep { public: - CORE_MEMORY(Realbase_for) + + CGAL_CORE_EXPORT CORE_NEW(Realbase_for) + CGAL_CORE_EXPORT CORE_DELETE(Realbase_for) + Realbase_for(const T& k); ~Realbase_for() {} int ID() const; diff -Nru cgal-4.7/include/CGAL/CORE_BigFloat.h cgal-4.8/include/CGAL/CORE_BigFloat.h --- cgal-4.7/include/CGAL/CORE_BigFloat.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE_BigFloat.h 2016-04-04 19:00:12.000000000 +0000 @@ -251,7 +251,7 @@ CORE::BigFloat inline -round(const CORE::BigFloat& x, long rel_prec = CORE::defRelPrec.toLong() ){ +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) @@ -344,9 +344,9 @@ typedef long result_type; long operator() ( long prec ) const { - long result = ::CORE::defRelPrec.toLong(); - ::CORE::defRelPrec = prec; - ::CORE::defBFdivRelPrec = prec; + long result = ::CORE::get_static_defRelPrec().toLong(); + ::CORE::get_static_defRelPrec() = prec; + ::CORE::get_static_defBFdivRelPrec() = prec; return result; } }; @@ -356,7 +356,7 @@ typedef long result_type; long operator() () const { - return ::CORE::defRelPrec.toLong(); + return ::CORE::get_static_defRelPrec().toLong(); } }; }; @@ -378,17 +378,19 @@ : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { - // What I want is a sqrt computed with ::CORE::defRelPrec bits. + // What I want is a sqrt computed with + // ::CORE::get_static_defRelPrec() bits. // And not ::CORE::defBFsqrtAbsPrec as CORE does. - CGAL_precondition(::CORE::defRelPrec.toLong() > 0); + CGAL_precondition(::CORE::get_static_defRelPrec().toLong() > 0); CGAL_precondition(x > 0); - Type a = CGAL::internal::round(x, ::CORE::defRelPrec.toLong()*2); + 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::defRelPrec.toLong()); + 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); diff -Nru cgal-4.7/include/CGAL/CORE_coercion_traits.h cgal-4.8/include/CGAL/CORE_coercion_traits.h --- cgal-4.7/include/CGAL/CORE_coercion_traits.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/CORE_coercion_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -84,7 +84,7 @@ 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); + 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 ); @@ -104,7 +104,7 @@ 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); + 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 ); @@ -123,7 +123,7 @@ 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); + 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 ); diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// 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 @@ -12,10 +12,6 @@ // This file is provided 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 // Pavel Emeliyanenko @@ -62,7 +58,7 @@ * Default representation class for Arc_2 */ template < class CurvedKernelViaAnalysis_2 > -class Arc_2_rep { +class Arc_2_rep { public: //!\name Public types @@ -70,20 +66,20 @@ //! 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; @@ -92,29 +88,29 @@ public: //!\name Constructors //!@{ - + //! default constructor - Arc_2_rep() : - _m_arcno(-1), _m_arcno_min(-1), _m_arcno_max(-1), + 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(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, + 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) : + 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), @@ -135,13 +131,13 @@ 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; @@ -153,10 +149,10 @@ //! 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; @@ -173,9 +169,9 @@ }; -/*!\brief +/*!\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 @@ -183,19 +179,19 @@ * 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, + * 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; @@ -204,34 +200,34 @@ //! 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; @@ -240,9 +236,9 @@ public: //!\name Rebind //!{ - + /*!\brief - * An auxiliary structure for rebinding the arc with a NewCKvA_2 and a + * An auxiliary structure for rebinding the arc with a NewCKvA_2 and a * NewRep */ template < typename NewCKvA_2, typename NewRep > @@ -260,14 +256,14 @@ //! 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 + * 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 + * 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. @@ -277,15 +273,15 @@ * \param max New endpoint at max * \return An arc of type \c Rebound_arc_2 */ - Rebound_arc_2 operator()(const Self& arc, + 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); } @@ -304,10 +300,10 @@ // else return arc._maxpoint(); } - + // TODO move to SfA_2l /*!\brief - * Reverse rebind, that is extracts original arc type from a + * Reverse rebind, that is extracts original arc type from a * rebound instance * * \param arc A rebound arc @@ -315,12 +311,12 @@ */ 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; @@ -330,23 +326,23 @@ rep._m_interval_id = arc.ptr()->_m_interval_id; - rep._m_boundary_in_interval = + 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; @@ -356,13 +352,13 @@ newrep._m_interval_id = arc.ptr()->_m_interval_id; - newrep._m_boundary_in_interval = + newrep._m_boundary_in_interval = arc.ptr()->_m_boundary_in_interval; } }; //!} - + public: //!\name basic constructors //!@{ @@ -370,26 +366,26 @@ /*!\brief * Default constructor */ - Arc_2() : - Base(Rep()) { + Arc_2() : + Base(Rep()) { } /*!\brief * copy constructor */ - Arc_2(const Self& a) : - Base(static_cast(a)) { + Arc_2(const Self& a) : + Base(static_cast(a)) { } //!@} - + public: //!\name Constructors for non-vertical arcs //!@{ - - /*!\brief + + /*!\brief * Constructs an arc with two interior end-points (segment). - * + * * \param p first endpoint * \param q second endpoint * \param c The supporting curve @@ -397,14 +393,14 @@ * \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)) { - + 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); @@ -416,10 +412,10 @@ // 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); + _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). @@ -429,13 +425,13 @@ * 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 + * \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, + 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 @@ -444,10 +440,10 @@ _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 + * 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 @@ -455,19 +451,19 @@ * \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 + * \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, + 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) + kernel().compare_1_object()(origin.x(), asympt_x) != CGAL::EQUAL); CGAL_precondition(arcno >= 0); CGAL_precondition(arcno_o >= 0); @@ -489,40 +485,40 @@ Point_2(CGAL::ARR_MAX_END, c, arcno), c, arcno)) { CGAL_precondition(arcno >= 0); - _fix_curve_ends_order(); + _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 + * \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 + * \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, + 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), + 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) + 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 + * 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 @@ -531,37 +527,37 @@ * \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), + Base(Rep(Point_2(inf_endx, c, arcno), Point_2(asympt_x, c, inf_endy), c, arcno)) { - - CGAL_precondition(arcno >= 0); + + CGAL_precondition(arcno >= 0); _fix_curve_ends_order(); } - + //!@} - + public: //!\name Constructors for vertical arcs //!@{ - - /*!\brief - * Constructs a vertical arc with two interior end-points + + /*!\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)) { - + 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); @@ -572,9 +568,9 @@ _check_pt_arcno_and_coprimality(p, -1, c); _fix_curve_ends_order(); } - + /*!\brief - * Constructs a vertical arc with one interior end-point and + * 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 @@ -585,46 +581,46 @@ */ 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), + 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), + 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: +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) { + Arc_2(Rep rep) : + Base(rep) { } - + //!@} public: @@ -636,7 +632,7 @@ */ virtual ~Arc_2() { } - + //!@} #define CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(X, Y) \ @@ -647,7 +643,7 @@ public: //!\name Parameter space //!@{ - + /*!\brief * location of arc's end * @@ -660,7 +656,7 @@ } return _maxpoint().location(); } - + /*!\brief * Sets boundary type for an end of an arc * @@ -670,17 +666,17 @@ * \param ce The intended end * \param loc The location to store */ - void set_location(CGAL::Arr_curve_end ce, + void set_location(CGAL::Arr_curve_end ce, CGAL::Arr_parameter_space loc) const { - (ce == CGAL::ARR_MIN_END ? + (ce == CGAL::ARR_MIN_END ? _minpoint().set_location(loc) : _maxpoint().set_location(loc)); } - + //!@} //!\name Access functions //!@{ - + /*!\brief * Is a curve-end finite? * @@ -688,21 +684,21 @@ * \return \c true, if finite, \c false, otherwise */ bool is_finite(CGAL::Arr_curve_end ce) const { - const Point_2& pt = + const Point_2& pt = (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint()); return pt.is_finite(); } - /*!\brief + /*!\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 = + const Point_2& pt = (ce == CGAL::ARR_MIN_END ? _minpoint() : _maxpoint()); #if !CGAL_ARRANGEMENT_ON_DUPIN_CYCLIDE CGAL_precondition(pt.location() == CGAL::ARR_INTERIOR || @@ -711,9 +707,9 @@ return pt; } - /*!\brief + /*!\brief * returns x-coordinate of arc's curve end - * + * * \param ce The intended end * \return x-coordinate of arc's end at \c ce * @@ -729,28 +725,28 @@ /*!\brief * supporting curve of the arc - * + * * \return supporting curve of the arc */ inline const Curve_analysis_2& curve() const { - return this->ptr()->_m_support; + return this->ptr()->_m_support; } - + /*!\brief arc number in interior - * - * \return arc number - * + * + * \return arc number + * * \pre !is_vertical() */ inline - int arcno() const { + int arcno() const { CGAL_precondition(!is_vertical()); - return this->ptr()->_m_arcno; + return this->ptr()->_m_arcno; } /*!\brief - * arc number of end of arc, which may be different from arc number in its + * arc number of end of arc, which may be different from arc number in its * interior * * \param ce The intended end @@ -763,8 +759,8 @@ return (ce == CGAL::ARR_MIN_END ? this->ptr()->_m_arcno_min : this->ptr()->_m_arcno_max); } - - /*!\brief + + /*!\brief * arc number at given x-coordinate * * If \c x0 is equal to source's or target's x-coordinate, @@ -781,17 +777,17 @@ CGAL_precondition(!is_vertical()); CGAL_precondition(is_in_x_range(x0)); - if (this->ptr()->_m_arcno_min != this->ptr()->_m_arcno && + 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()) == + 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 && + 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()) == + kernel().compare_1_object()(x0, _maxpoint().x()) == CGAL::EQUAL) { return this->ptr()->_m_arcno_max; } @@ -799,7 +795,7 @@ } /*!\brief - * checks if the arc is vertical + * checks if the arc is vertical * * \return \c true, if vertical, \c false, otherwise */ @@ -819,7 +815,7 @@ CGAL_precondition(is_vertical()); return _minpoint().x(); } - + //!@} //!\name Direction @@ -834,13 +830,13 @@ 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; } @@ -850,7 +846,7 @@ //!@{ /*!\brief - * returns the index of an open interval between two events of the + * 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 @@ -859,23 +855,23 @@ inline int interval_id() const { CGAL_precondition(!is_vertical()); - if(!this->ptr()->_m_interval_id) + 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 + * + * \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 = + this->ptr()->_m_boundary_in_interval = _compute_boundary_in_interval(); CGAL_postcondition_code( typename Curve_analysis_2::Status_line_1 cv_line = @@ -895,17 +891,17 @@ 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 + + //! 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); @@ -918,26 +914,26 @@ //! 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 || + 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 || + return (loc == CGAL::ARR_LEFT_BOUNDARY || loc == CGAL::ARR_RIGHT_BOUNDARY); } //!@} -public: +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. @@ -960,7 +956,7 @@ p, *dynamic_cast< const Kernel_arc_2* >(this), ce ); } - + /*!\brief * Compare the relative x-limits of the curve end of \c *this @@ -979,19 +975,19 @@ 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. @@ -1013,7 +1009,7 @@ 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 @@ -1028,15 +1024,15 @@ * * \pre the curve ends lie on the bottom or top boundary */ - CGAL::Comparison_result compare_x_near_limit(const Kernel_arc_2& cv2, + 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 @@ -1051,10 +1047,10 @@ * \pre The ends are defined on left or right boundary */ CGAL::Comparison_result compare_y_near_boundary( - const Kernel_arc_2& cv2, + 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); @@ -1067,7 +1063,7 @@ * Compares the relative vertical alignment of a point with this arc * * \param p The point. - * \return + * \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. @@ -1083,24 +1079,24 @@ } /*!\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), + * 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, + 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); @@ -1108,26 +1104,26 @@ *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), + * 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, + 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); @@ -1135,10 +1131,10 @@ *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. @@ -1146,9 +1142,9 @@ * 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 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; } @@ -1170,8 +1166,8 @@ // 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) || + 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) { @@ -1184,11 +1180,11 @@ 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) || + 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()); @@ -1197,15 +1193,15 @@ } } - bool res = + bool res = (resmin != CGAL::SMALLER && resmax != CGAL::LARGER); return res; - } - + } + /*!\brief - * Checks whether an x-coordinate lies in the interiors of this arc's + * 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 @@ -1219,40 +1215,40 @@ } return true; } - - /*!\brief + + /*!\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, + + 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, + + 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 + /*!\brief * multiplicity of intersection - * + * * The intersection multiplicity of \c *this and \c cv2 at point \c p is * returned. * @@ -1265,12 +1261,12 @@ 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 + 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)); @@ -1280,14 +1276,14 @@ // 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()); @@ -1298,22 +1294,22 @@ 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 + * 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 * std::pair\ (intersection point + * multiplicity). A past-the-end iterator is returned. * @@ -1322,38 +1318,38 @@ * \return A past-the-end iterator of \c oi */ template < class OutputIterator > - OutputIterator intersections(const Kernel_arc_2& cv2, + OutputIterator intersections(const Kernel_arc_2& cv2, OutputIterator oi) const { - - CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Intersect_2, + + 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 + * 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 + * 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 + * \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, + 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) @@ -1362,7 +1358,7 @@ typedef std::vector > Point_container; Point_container tmp; _intersection_points( - *dynamic_cast< const Kernel_arc_2*>(this), cv2, + *dynamic_cast< const Kernel_arc_2*>(this), cv2, back_inserter(tmp) ); typename Point_container::const_iterator it; @@ -1374,36 +1370,36 @@ } return false; } - + /*!\brief - * Computes the next intersection of \c *this and \c cv2 left of \c p + * 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 + * 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 + * \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, + 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 > Point_container; Point_container tmp; _intersection_points( - *dynamic_cast< const Kernel_arc_2*>(this), cv2, + *dynamic_cast< const Kernel_arc_2*>(this), cv2, back_inserter(tmp) ); typename Point_container::const_reverse_iterator it; @@ -1418,7 +1414,7 @@ /*!\brief * Returns a trimmed version of an arc - * + * * \param p the new first endpoint * \param q the new second endpoint * \return The trimmed arc @@ -1428,7 +1424,7 @@ */ // 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); @@ -1437,16 +1433,16 @@ /*!\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, + + 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); @@ -1460,8 +1456,8 @@ * 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, + + 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( @@ -1474,26 +1470,26 @@ * * \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. + * non-coprime supporting curves. * * \return \c true if simplification took place, \c false otherwise */ @@ -1504,14 +1500,14 @@ } std::vector 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), + 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) { @@ -1519,7 +1515,7 @@ 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() @@ -1528,11 +1524,11 @@ return true; } return false; - } - + } + /*!\brief * simplifies representation of \c cv1 and/or \c cv2 in case they have - * non-coprime supporting curves. + * non-coprime supporting curves. * * \return \c true if simplification took place, \c false otherwise */ @@ -1543,11 +1539,11 @@ } std::vector 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), + 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 || @@ -1565,16 +1561,16 @@ 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 @@ -1584,48 +1580,48 @@ */ // TODO implement in functor? Kernel_arc_2 _trim(const Point_2& p, const Point_2& q) const { - - if (p.location() == CGAL::ARR_INTERIOR && + + if (p.location() == CGAL::ARR_INTERIOR && q.location() == CGAL::ARR_INTERIOR) { - - return _replace_endpoints(p, q, + + return _replace_endpoints(p, q, (is_vertical() ? -1 : arcno(p.x())), - (is_vertical() ? -1 : arcno(q.x()))).first; - } - + (is_vertical() ? -1 : arcno(q.x()))).first; + } + if (p.location() != CGAL::ARR_INTERIOR && - q.location() != CGAL::ARR_INTERIOR) + q.location() != CGAL::ARR_INTERIOR) return static_cast(*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(*this), q, left_arc, right_arc); return left_arc; } // if (p.location() == CGAL::ARR_INTERIOR && - // q.location() != CGAL::ARR_INTERIOR) - + // q.location() != CGAL::ARR_INTERIOR) + split_2(static_cast(*this), p, left_arc, right_arc); - return 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 + * \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, @@ -1636,13 +1632,13 @@ 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()); @@ -1651,9 +1647,9 @@ construct_point_on_arc_2) Point_2 left1, left2; - + if (common_left.location() != CGAL::ARR_LEFT_BOUNDARY) { - if ((cv1.location(CGAL::ARR_MIN_END) != + 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) ) { @@ -1664,7 +1660,7 @@ cv1.arcno(), cv1); } - if ((cv2.location(CGAL::ARR_MIN_END) != + 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) ) { @@ -1679,13 +1675,13 @@ 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) != + + 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) ) { @@ -1696,7 +1692,7 @@ cv1.arcno(), cv1); } - if ((cv2.location(CGAL::ARR_MAX_END) != + 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) ) { @@ -1707,31 +1703,31 @@ cv2.arcno(), cv2); } - + } else { right1 = cv1._maxpoint(); right2 = cv2._maxpoint(); } - + trimmed1 = cv1._trim(left1, right1); - trimmed2 = cv2._trim(left2, right2); + trimmed2 = cv2._trim(left2, right2); return joint; } - + //!@} protected: //!\name Protected helper methods //!@{ - - /*!\brief + + /*!\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 = + CGAL::Comparison_result res = _same_arc_compare_xy(_minpoint(), _maxpoint()); // curve ends cannot be identical CGAL_precondition(res != CGAL::EQUAL); @@ -1742,13 +1738,13 @@ // 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(); + _check_arc_interior(); } - + // p.curve() <-> p.arcno() // c <-> arcno_on_c /*!\brief - * establishes preconditions that point \c pt lies on the curve + * 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 * @@ -1756,11 +1752,14 @@ * \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 { - + 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) { @@ -1769,18 +1768,18 @@ 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(), + 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]; + } + 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[0]), std::back_inserter(dummy[1]), std::back_inserter(dummy[2])) ); @@ -1789,17 +1788,17 @@ } ); } - - /*!\brief - * establishes preconditions to ensure that there are no event - * points in the arc's interior (only at source and target) and its arc + + /*!\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 + * + * \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)) @@ -1809,12 +1808,12 @@ 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 = + bool inf_src = (_minpoint().location() == CGAL::ARR_BOTTOM_BOUNDARY); - bool inf_tgt = + 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 @@ -1824,11 +1823,11 @@ 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) @@ -1852,19 +1851,19 @@ 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) : + if(src_line.is_event()) + no_events_between = (tgt_line.is_event() ? (diff == 1) : (diff == 0)||(diff == 1)); - else + 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 @@ -1904,11 +1903,11 @@ } else { CGAL_precondition(arcno() == this->ptr()->_m_arcno_max); } -#endif +#endif } - - /*!\brief - * compares y-coordinates of two arcs over an open (or closed) + + /*!\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 @@ -1924,21 +1923,21 @@ * \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(), + 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())) + 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 + * computes vertical ordering of \c *this and \c cv2 * having coprime supporting curves * * \param cv2 the second arc @@ -1949,13 +1948,13 @@ */ CGAL::Comparison_result _compare_coprime( const Kernel_arc_2& cv2, - CGAL::Arr_parameter_space where, - Coordinate_1 x0, + 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) + 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 ); @@ -1964,30 +1963,30 @@ } 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) + + 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 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 + + /*\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 * @@ -1999,30 +1998,30 @@ */ CGAL::Comparison_result _same_arc_compare_xy( const Point_2& p, - const Point_2& q, - bool equal_x = false, + 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) + 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(). @@ -2065,7 +2064,7 @@ CKvA_CERR("result8: " << res << "\n"); return res; } - // compare only y-values; + // compare only y-values; res = Curved_kernel_via_analysis_2::instance(). compare_xy_2_object()(p, q, true); CKvA_CERR("result9: " << res << "\n"); @@ -2073,38 +2072,38 @@ } // here: locp != locq && one of them is at inf y if (locp == CGAL::ARR_INTERIOR) { - res = (locq == CGAL::ARR_BOTTOM_BOUNDARY ? + 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 ? + 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; + 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; + const Point_2& _maxpoint() const { + return this->ptr()->_m_max; } - + /*!\brief * computes this arc's interval index * @@ -2114,47 +2113,47 @@ 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) || + 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 = + 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) || + 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) || + 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) { @@ -2165,7 +2164,7 @@ res = min_pair.second + Bound(1); } } else { - if (max_has_x) { + if (max_has_x) { Coordinate_1 max_x = _maxpoint().x(); std::pair max_pair=approx_x(max_x,4); res = max_pair.first - Bound(1); @@ -2177,11 +2176,11 @@ return res; } - /*!\brief + /*!\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; + * + * new curve ends are sorted lexicographical in case of need; * all preconditions must be checked by the caller * * \param p1 new first endpoint @@ -2191,13 +2190,13 @@ * \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 > + std::pair< Kernel_arc_2, CGAL::Comparison_result > _replace_endpoints( - const Point_2& p1, const Point_2& p2, + const Point_2& p1, const Point_2& p2, int arcno1 = -1, int arcno2 = -1) const { - - CKvA_CERR("\n_replace_endpoints\n"); - + + CKvA_CERR("\n_replace_endpoints\n"); + Rep rep(*(this->ptr())); rep._m_min = p1; rep._m_max = p2; @@ -2209,33 +2208,33 @@ 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 + /* 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 + * + * 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 + * \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 + * \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 { @@ -2252,10 +2251,10 @@ 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 + // 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)); @@ -2268,35 +2267,35 @@ } return; } - + // processing non-vertical arcs typename Curve_pair_analysis_2::Status_line_1 cpv_line; std::pair 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; + bool curve_idx; if(!inf1_x) { - x0 = _minpoint().x(); + x0 = _minpoint().x(); cpv_line = cpa_2.status_line_for_x(x0, CGAL::POSITIVE); - } else + } 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() == + 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 + // 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); @@ -2308,12 +2307,12 @@ /////////////////////////////////////////////////////////////////// // 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() == + 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) + if(ipair.first != -1 && ipair.second != -1) // choose simpler supporting curve this->ptr()->_m_arcno_min = ((curve_idx) ? @@ -2325,20 +2324,20 @@ } } 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(); + + x0 = _maxpoint().x(); cpv_line = cpa_2.status_line_for_x(x0); - CGAL_precondition(cpv_line.number_of_events() == + 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) + if(ipair.first != -1 && ipair.second != -1) // choose simpler supporting curve (the one which matches // interior arcno) this->ptr()->_m_arcno_max = (curve_idx ? @@ -2361,12 +2360,12 @@ //!\name Protected intersection methods //!@{ - /*!\brief - * returns \c true if the two arcs \c *this and \c cv2 overlap, + /*!\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 - + * (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 @@ -2374,9 +2373,9 @@ 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 " + + 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 @@ -2396,28 +2395,28 @@ *dynamic_cast< const Kernel_arc_2*>(this), cv2 ); // coprime support => no overlaps - if(!curve().is_identical(cv2.curve())) + 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(), + tgt = (_same_arc_compare_xy(_maxpoint(), cv2._maxpoint(), true) == CGAL::SMALLER ? _maxpoint() : cv2._maxpoint()); - // vertical arcs do not overlap + // 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 + // 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; @@ -2427,18 +2426,18 @@ *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 > Curve_arcno_container; typedef std::vector 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), + curve(), cv2.curve(), + std::back_inserter(parts_f), std::back_inserter(parts_g), std::back_inserter(common))) { return false; // supporting curves are coprime => quit @@ -2446,20 +2445,20 @@ 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(); + x0 = src.x(); std::pair 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(); + 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); @@ -2467,7 +2466,7 @@ 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; + 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)); @@ -2475,41 +2474,41 @@ 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; + 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) + 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 + 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()) { @@ -2535,19 +2534,19 @@ } } *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 + * computes zero-dimensional intersections of \c cv1 with \c cv2. + * + * Intersection points + * are inserted to the output iterator \c oi as objects of type * std::pair (intersection point + * multiplicity) - * + * * \param cv1 the first arc * \param cv2 the second arc * \param oi reporting zero-dimensional intersections through this output @@ -2556,12 +2555,12 @@ */ template < class OutputIterator > static OutputIterator _intersection_points( - const Kernel_arc_2& cv1, const Kernel_arc_2& cv2, + const Kernel_arc_2& cv1, const Kernel_arc_2& cv2, OutputIterator oi) { - - // handle a special case when two arcs are supported by the same + + // 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())) { @@ -2574,21 +2573,21 @@ /*!\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 (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, + const Kernel_arc_2& cv2, OutputIterator oi) { - + CKvA_CERR("\n_intersect_at_endpoints\n"); CGAL_precondition(!cv1.do_overlap(cv2)); @@ -2596,83 +2595,83 @@ * 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, + /*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 => + 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) + 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); - + /*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); - + *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); - + *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: + *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); + *oi++ = std::make_pair(pt, 0); } Lendloop: if (end == CGAL::ARR_MAX_END) { break; } - end = CGAL::ARR_MAX_END; + end = CGAL::ARR_MAX_END; } return oi; } - - /*!\brief - * computes a joint x-range of two arcs and returns \c true + + /*!\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 @@ -2684,40 +2683,40 @@ * * \pre both arcs are not vertical */ - bool _joint_x_range(const Kernel_arc_2& cv2, Point_2& pt_low, + 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); + 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) == + 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 + compare_x_2_object()(low, high) != + CGAL::SMALLER) {// disjoint x-ranges return false; } pt_low = low; @@ -2725,13 +2724,13 @@ return true; } - + /*!\brief - * computes zero-dimensional + * 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 std::pair (intersection point + + * of type std::pair (intersection point + * multiplicity) * * \param cv1 the first arc @@ -2740,21 +2739,21 @@ * iterator */ template - static OutputIterator _intersect_coprime_support(const Kernel_arc_2& cv1, + 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 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 + // 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 + // 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); @@ -2762,13 +2761,13 @@ // vertical arc does not lie within another arc's x-range => no // intersections if (!nonvert.is_in_x_range(x)) { - return oi; + return oi; } typename Curved_kernel_via_analysis_2:: Construct_point_on_arc_2 - construct_point_on_arc = + 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 @@ -2778,7 +2777,7 @@ } 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)) { @@ -2790,7 +2789,7 @@ Curve_pair_analysis_2 cpa_2 = Curved_kernel_via_analysis_2::instance(). kernel().construct_curve_pair_2_object()(f, g); - int low_idx = 0, + int low_idx = 0, high_idx = cpa_2.number_of_status_lines_with_event()-1; bool index_at_event_min=false; @@ -2812,7 +2811,7 @@ } } } - + if(!inf_high) { line = cpa_2.status_line_for_x(high_x.x()); high_idx = line.index(); @@ -2828,8 +2827,8 @@ index_at_event_max=false; } } - - // run over all event points within the joint x-range of two arcs + + // 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 ipair; @@ -2837,26 +2836,26 @@ 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 = + typename Curve_pair_analysis_2::Status_line_1 tmp = cpa_2.status_line_at_event(i); - if(!tmp.is_intersection()) + if(!tmp.is_intersection()) continue; Coordinate_1 x0 = tmp.x(); - if((i == low_idx && index_at_event_min) || + 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 + 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; @@ -2864,13 +2863,13 @@ if (mult == -1) { mult = tmp.multiplicity_of_intersection(pos); } - - // pick up the curve with lower degree + + // pick up the curve with lower degree typename Curved_kernel_via_analysis_2::Construct_point_on_arc_2 - construct_point_on_arc = + 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 @@ -2885,45 +2884,45 @@ } return oi; } - + #undef CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC //!@} - + //!\name Approximation //!@{ private: - + std::pair y_interval_for_curve_end( const Arc_2& arc, CGAL::Arr_curve_end end, - long prec) + long prec) const { - + double PINF = std::numeric_limits::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_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 @@ -2931,10 +2930,10 @@ CGAL_assertion(ps == CGAL::ARR_TOP_BOUNDARY); return std::make_pair(PINF, PINF); // early exit } - + } else { - - CGAL_assertion_code(bool check =) + + CGAL_assertion_code(bool check =) CGAL::assign(asym_info, obj); CGAL_assertion(check); @@ -2944,31 +2943,31 @@ break; } case (CGAL::ARR_INTERIOR): { - - y_approx = + + 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 + /*!\brief * bbounding box for arc */ CGAL::Bbox_2 bbox() const { if (!this->ptr()->_m_bbox) { - + double PINF = std::numeric_limits::infinity(); double MINF = -PINF; - + double xmin; double xmax; @@ -2986,64 +2985,64 @@ 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 = + + 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 = + + 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; @@ -3059,37 +3058,37 @@ ), std::back_inserter(pts) ); - + int n = static_cast(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; + + const Coordinate_2& curr_xy = pts[i].first; #if 0 - // EBEB: Disabled this test as curr_xy's curve + // 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"); + + 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: " << + 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 = + + 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, + ymin = CGAL::min(ymin, CGAL::to_double(xy_approx.first)); - ymax = CGAL::max(ymax, + ymax = CGAL::max(ymax, CGAL::to_double(xy_approx.second)); } } @@ -3097,24 +3096,24 @@ // 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 = + Point_2 curr_pt = Curved_kernel_via_analysis_2::instance(). - construct_point_2_object()(curr_xy.x(), + 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 = + + 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, + ymin = CGAL::min(ymin, CGAL::to_double(xy_approx.first)); - ymax = CGAL::max(ymax, + ymax = CGAL::max(ymax, CGAL::to_double(xy_approx.second)); } } @@ -3126,14 +3125,14 @@ return *(this->ptr()->_m_bbox); } - + //!} public: //!\name IO //!@{ - + /*!\brief * output operator * @@ -3190,11 +3189,11 @@ * 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'); @@ -3202,7 +3201,7 @@ swallow(is, '_'); swallow(is, '2'); swallow(is, '('); - + Point_2 min, max; // read values @@ -3224,19 +3223,19 @@ // read the ')' swallow(is, ')'); - + *this = Arc_2< Curved_kernel_via_analysis_2, Rep >(rep); } - + //!@} //! equality inline - bool operator == (const Kernel_arc_2& arc2) const { + bool operator == (const Kernel_arc_2& arc2) const { return is_equal(arc2); } -#if defined(_MSC_VER) || defined(__clang__) +#if defined(_MSC_VER) // befriending the kernel point friend typename Curved_kernel_via_analysis_2::Point_2; @@ -3261,9 +3260,9 @@ Z #endif // defined(_MSC_VER) || defined(__clang__) || defined(__INTEL_COMPILER) - -//Curved_kernel_via_analysis_2_functors< - // Curved_kernel_via_analysis_2> >; + +//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); @@ -3293,12 +3292,12 @@ #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; - + /* // befriend all functors #define CGAL_BEFRIEND_SWEEP_CURVES_ADAPTER_2_FUNCTOR(Z) \ @@ -3326,7 +3325,7 @@ }; // class Arc_2 /*!\relates Arc_2 - * \brief + * \brief * output operator * * writes \c arc to \c os @@ -3336,7 +3335,7 @@ std::ostream& operator<<( std::ostream& os, const Arc_2& arc) { - + arc.write(os); return os; } @@ -3345,14 +3344,14 @@ //! \brief Reads the objects from stream. template < class CurvedKernelViaAnalysis_2, class Rep_ > std::istream& operator>> ( - std::istream& is, + 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; diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h 2016-04-04 19:00:11.000000000 +0000 @@ -38,6 +38,7 @@ // #include // #include // #include +#include #include #include @@ -914,9 +915,9 @@ if(not_cached||not_found) { poly = Poly_1(::boost::make_transform_iterator(coeffs->begin(), - std::bind2nd(std::ptr_fun(binded_eval), key1)), + boost::bind2nd(std::ptr_fun(binded_eval), key1)), ::boost::make_transform_iterator(coeffs->end(), - std::bind2nd(std::ptr_fun(binded_eval), key1))); + boost::bind2nd(std::ptr_fun(binded_eval), key1))); if(not_cached) return; // all available space consumed: drop the least recently used entry diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h 2016-04-04 19:00:11.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include /*! \file CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h * \brief @@ -117,8 +118,8 @@ Transform tr; return OutputPoly_2( - ::boost::make_transform_iterator(p.begin(), std::bind2nd(tr, op)), - ::boost::make_transform_iterator(p.end(), std::bind2nd(tr, op))); + ::boost::make_transform_iterator(p.begin(), boost::bind2nd(tr, op)), + ::boost::make_transform_iterator(p.end(), boost::bind2nd(tr, op))); } OutputPoly_2 operator()( diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,4 +1,4 @@ -// Copyright (c) 2007,2008,2009,2010,2011 Max-Planck-Institute Saarbruecken (Germany), +// 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 @@ -18,7 +18,7 @@ // // Author(s) : Eric Berberich // Arno Eigenwillig -// Pavel Emeliyanenko +// Pavel Emeliyanenko // // ============================================================================ @@ -39,67 +39,67 @@ namespace internal { -/*!\brief - * Splits a curve that can be analyzed +/*!\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 + * 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 = +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::iterator > { - + //!\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 + /*!\brief * Standard constructor * * \param kernel The kernel instance to use @@ -115,7 +115,7 @@ //!@{ // TODO add operator for non-x-monotone arc - + /*!\brief * Splits a curve into x-monotone arcs and isolated points * @@ -127,21 +127,21 @@ template OutputIterator operator()(Curve_analysis_2 curve, OutputIterator oi) { - Construct_arc_2 construct_arc_2 = + Construct_arc_2 construct_arc_2 = _m_curved_kernel->construct_arc_2_object(); // use CGAL::Total_degree ? - if (typename CGAL::Polynomial_traits_d< + 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++) + for(int k = 0; k < int_line.number_of_events(); k++) *oi++ = CGAL::make_object(construct_arc_2(curve, k)); return oi; } @@ -150,8 +150,8 @@ 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 + + typename Curved_kernel_via_analysis_2::Construct_point_2 construct_point = _m_curved_kernel->construct_point_2_object(); @@ -163,22 +163,22 @@ // 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++) + + 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"; + + //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); + + 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 == + arc = construct_arc_2(CGAL::ARR_MIN_END, max_x, + (info1.second == CGAL::ARR_BOTTOM_BOUNDARY ? - CGAL::ARR_MIN_END : CGAL::ARR_MAX_END), + CGAL::ARR_MIN_END : CGAL::ARR_MAX_END), curve, k); } else { - arc = construct_arc_2(max_pts[info1.first], CGAL::ARR_MIN_END, + arc = construct_arc_2(max_pts[info1.first], CGAL::ARR_MIN_END, curve, k, info1.first ); } @@ -187,42 +187,42 @@ 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++) + 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 ? + + 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 ? + 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, + 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], + arc = construct_arc_2(min_pts[info1.first], max_pts[info2.first], curve, k, info1.first, info2.first); } @@ -232,26 +232,26 @@ 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); + + 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_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], + arc = construct_arc_2(min_pts[info1.first], CGAL::ARR_MAX_END, curve, k, info1.first); } @@ -264,7 +264,7 @@ private: //!\name Private members //!@{ - + /*!\brief * Constructs vertical arcs and isolated points at event line * @@ -278,12 +278,12 @@ template OutputIterator _handle_vertical_and_isolated( Status_line_1 cv_line, - Coordinate_1 x, std::vector pts, + Coordinate_1 x, std::vector pts, OutputIterator oi) const { - - Construct_arc_2 construct_arc_2 = + + 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) { @@ -294,23 +294,23 @@ 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)); + // 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 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 + 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)); } } @@ -321,13 +321,13 @@ //!\name Private data //!@{ - - //! pointer to \c Curved_kernel_via_analysis_2 + + //! 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 diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -784,7 +784,7 @@ // befriending the functors -#if defined(_MSC_VER) || defined(__clang__) +#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 > diff -Nru cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h --- cgal-4.7/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/Curved_kernel_via_analysis_2/Qt_widget_Curve_renderer_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// -// ============================================================================ - -/*!\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 -#include -#include - -namespace CGAL { - -#define CGAL_REND_PT_RADIUS 6 - -/*! \brief - * outputs a curve arc to \c Qt_widget - */ -template -Qt_widget& operator << (Qt_widget& ws, const internal::Arc_2< CKvA_2 >& arc) { - - typedef Curve_renderer_facade Facade; - - typedef std::pair< int, int > Coord_2; - typedef std::vector< Coord_2 > Coord_vec_2; - - boost::optional < Coord_2 > p1, p2; - std::list 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::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 -Qt_widget& operator << (Qt_widget& ws, const internal::Point_2< CKvA_2 >& pt) { - - typedef Curve_renderer_facade 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 -Nru cgal-4.7/include/CGAL/Dart_const_iterators.h cgal-4.8/include/CGAL/Dart_const_iterators.h --- cgal-4.7/include/CGAL/Dart_const_iterators.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Dart_const_iterators.h 2016-04-04 19:00:11.000000000 +0000 @@ -47,6 +47,7 @@ typedef CMap_dart_iterator_basic_of_orbit_generic 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, @@ -56,7 +57,7 @@ /// Main constructor. CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, Dart_const_handle adart, - int amark): + size_type amark): Base(amap,adart,amark) {} /// Constructor from non const version. @@ -105,6 +106,7 @@ 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, @@ -114,7 +116,7 @@ /// Main constructor. CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, Dart_const_handle adart, - int amark): + size_type amark): Base(amap,adart,amark) {} /// Constructor from non const version. @@ -162,6 +164,7 @@ public: typedef CMap_dart_iterator_basic_of_all 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, @@ -171,7 +174,7 @@ /* Main constructor. */ CMap_dart_const_iterator_basic_of_all(const Map_& amap, Dart_const_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap,adart) {} /// Constructor from non const version. @@ -189,6 +192,7 @@ public: typedef CMap_dart_iterator_basic_of_cell 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, @@ -197,7 +201,8 @@ {} /* Main constructor. */ CMap_dart_const_iterator_basic_of_cell(const Map_& amap, - Dart_const_handle adart, int amark): + Dart_const_handle adart, + size_type amark): Base(amap,adart,amark) {} /// Constructor from non const version. @@ -236,6 +241,7 @@ public: typedef CMap_dart_iterator_basic_of_involution 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, @@ -245,7 +251,7 @@ /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution(const Map_& amap, Dart_const_handle adart, - int amark): + size_type amark): Base(amap,adart,amark) {} /// Constructor from non const version. @@ -284,6 +290,7 @@ public: typedef CMap_dart_iterator_basic_of_involution_inv 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, @@ -293,7 +300,7 @@ /* Main constructor. */ CMap_dart_const_iterator_basic_of_involution_inv(const Map_& amap, Dart_const_handle adart, - int amark): + size_type amark): Base(amap,adart,amark) {} /// Constructor from non const version. diff -Nru cgal-4.7/include/CGAL/Dart.h cgal-4.8/include/CGAL/Dart.h --- cgal-4.7/include/CGAL/Dart.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Dart.h 2016-04-04 19:00:11.000000000 +0000 @@ -267,28 +267,28 @@ * @param amark the mark number. * @return the value for this number. */ - bool get_mark(int amark) const + bool get_mark(size_type amark) const { - CGAL_assertion(amark>=0 && (size_type)amark=0 && amark=0 && (size_type)amark=0 && amark=0 && (size_type)amark=0 && amark=2 && Bi<=Map::dimension ); } @@ -435,6 +439,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -449,7 +454,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart), mcurdart(0) {} @@ -508,7 +513,7 @@ CGAL_assertion(!this->mmap->is_free(*this, Bi)); this->set_current_dart(this->mmap->beta(*this, Bi)); this->mprev_op = OP_BETAI; - mcurdart=1; + mcurdart=3; } else { @@ -548,6 +553,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -556,7 +562,7 @@ public: /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -580,6 +586,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -588,7 +595,7 @@ public: /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -610,6 +617,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -628,7 +636,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart), mit(amap, adart), mexist_betaj(false), @@ -710,6 +718,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -728,7 +737,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart), mit(amap, adart), mexist_betaj(false), @@ -810,6 +819,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -825,7 +835,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_two_beta(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart), mfirst_dir(true), mnext_try_betai(true) @@ -964,6 +974,7 @@ 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; @@ -975,7 +986,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1000,6 +1011,7 @@ 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; @@ -1007,7 +1019,7 @@ public: /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1029,6 +1041,7 @@ 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; @@ -1036,7 +1049,7 @@ public: /// Main constructor. CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1055,13 +1068,14 @@ typedef CMap_dart_iterator_basic_of_orbit_generic 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,int amark): + CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): Base(amap,adart,amark) {} }; @@ -1080,13 +1094,14 @@ ::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,int amark): + CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): Base(amap,adart,amark) {} }; @@ -1104,6 +1119,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -1113,7 +1129,7 @@ Base(amap, amap.darts().begin()) {} /// Main constructor. - CMap_dart_iterator_basic_of_all(Map& amap, int /*amark*/): + CMap_dart_iterator_basic_of_all(Map& amap, size_type /*amark*/): Base(amap, amap.darts().begin()) {} @@ -1123,7 +1139,7 @@ {} /// Constructor with a dart in parameter (for end iterator). CMap_dart_iterator_basic_of_all(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} @@ -1163,6 +1179,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -1172,7 +1189,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { @@ -1186,7 +1203,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark(*this, mmark_number); @@ -1196,7 +1213,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -1262,7 +1279,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // i-Cell iterator in combinatorial map of dimension d, i==1. @@ -1276,6 +1293,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -1283,7 +1301,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { @@ -1297,7 +1315,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); @@ -1307,7 +1325,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -1358,7 +1376,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // 0-Cell iterator in combinatorial map of dimension d @@ -1372,6 +1390,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -1379,7 +1398,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { if (adart!=this->mmap->null_handle) @@ -1392,7 +1411,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); @@ -1402,7 +1421,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -1498,7 +1517,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // Specialization for edge in 2D @@ -1512,6 +1531,7 @@ 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, @@ -1522,7 +1542,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} }; @@ -1538,6 +1558,7 @@ 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, @@ -1548,7 +1569,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} }; @@ -1564,11 +1585,12 @@ 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, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1584,6 +1606,7 @@ 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, @@ -1594,7 +1617,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int /*amark*/): Base(amap, adart) + size_type /*amark*/): Base(amap, adart) {} }; //**************************************************************************** @@ -1609,6 +1632,7 @@ 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, @@ -1619,7 +1643,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int /*amark*/): Base(amap, adart) + size_type /*amark*/): Base(amap, adart) {} }; //**************************************************************************** @@ -1634,11 +1658,12 @@ 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, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1654,11 +1679,12 @@ 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, - int amark): + size_type amark): Base(amap, adart, amark) {} }; @@ -1676,6 +1702,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -1690,7 +1717,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_cell(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart), mfirst_dir(true) {} @@ -1885,6 +1912,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -1895,7 +1923,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { @@ -1911,7 +1939,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); @@ -1921,7 +1949,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -1990,7 +2018,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // i-involution iterator in combinatorial map of dimension d, @@ -2007,6 +2035,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -2017,7 +2046,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { @@ -2032,7 +2061,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); @@ -2042,7 +2071,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -2110,7 +2139,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // 1-involution iterator in combinatorial map of dimension d. @@ -2125,6 +2154,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -2135,7 +2165,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { if (adart!=this->mmap->null_handle) @@ -2148,7 +2178,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark_null_dart(mmark_number); @@ -2158,7 +2188,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -2208,7 +2238,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // 1-involution iterator in combinatorial map of dimension d. @@ -2223,6 +2253,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -2233,7 +2264,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart,amark) {} }; @@ -2250,6 +2281,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -2260,7 +2292,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart), mmark_number(amark) { if ( adart!=this->mmap->null_handle) @@ -2273,7 +2305,7 @@ /// Rewind of the iterator to its beginning. void rewind() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); Base::rewind(); mto_treat = std::queue(); this->mmap->mark((*this), mmark_number); @@ -2283,7 +2315,7 @@ /// Prefix ++ operator. Self& operator++() { - CGAL_assertion(mmark_number != -1); + CGAL_assertion(mmark_number != Map::INVALID_MARK); CGAL_assertion(this->cont()); Dart_handle nd = this->mmap->null_handle; @@ -2333,7 +2365,7 @@ std::queue mto_treat; /// Index of the used mark. - int mmark_number; + size_type mmark_number; }; //**************************************************************************** // 2-involution iterator in combinatorial map of dimension d. @@ -2348,6 +2380,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_true Use_mark; @@ -2358,7 +2391,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int amark): + size_type amark): Base(amap, adart,amark) {} }; @@ -2375,6 +2408,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2385,7 +2419,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2407,6 +2441,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2417,7 +2452,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2439,6 +2474,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2449,7 +2485,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2471,6 +2507,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2481,7 +2518,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2503,6 +2540,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2513,7 +2551,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2535,6 +2573,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2545,7 +2584,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2567,6 +2606,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2577,7 +2617,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int /* amark*/): + size_type /* amark*/): Base(amap, adart) {} /// Main constructor. @@ -2599,6 +2639,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2609,7 +2650,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2631,6 +2672,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2641,7 +2683,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. @@ -2663,6 +2705,7 @@ typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Map Map; + typedef typename Map::size_type size_type; typedef Tag_false Use_mark; @@ -2673,7 +2716,7 @@ /// Main constructor. CMap_dart_iterator_basic_of_involution_inv(Map& amap, Dart_handle adart, - int /*amark*/): + size_type /*amark*/): Base(amap, adart) {} /// Main constructor. diff -Nru cgal-4.7/include/CGAL/Default_diagonalize_traits.h cgal-4.8/include/CGAL/Default_diagonalize_traits.h --- cgal-4.7/include/CGAL/Default_diagonalize_traits.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Default_diagonalize_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#else +#include +#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 +class Default_diagonalize_traits{ + +#ifdef CGAL_EIGEN3_ENABLED + typedef Eigen_diagonalize_traits Base; +#else + typedef Diagonalize_traits Base; +#endif + +public: + + typedef cpp11::array Vector; + typedef cpp11::array Matrix; + typedef cpp11::array 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 -Nru cgal-4.7/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h cgal-4.8/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h --- cgal-4.7/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Deformation_Eigen_closest_rotation_traits_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,7 +25,7 @@ #include namespace CGAL { -/// \ingroup PkgSurfaceModeling +/// \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. /// diff -Nru cgal-4.7/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h cgal-4.8/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h --- cgal-4.7/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Deformation_Eigen_polar_closest_rotation_traits_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,7 +26,7 @@ #include namespace CGAL { - /// \ingroup PkgSurfaceModeling + /// \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). diff -Nru cgal-4.7/include/CGAL/Delaunay_d.h cgal-4.8/include/CGAL/Delaunay_d.h --- cgal-4.7/include/CGAL/Delaunay_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Delaunay_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -758,7 +758,7 @@ the one opposite v */ bool incident = false; - register int j; + int j; for (j = 0; j <= dcur; j++) if ( Base::vertex_of_simplex(s,j) == v ) incident = true; if ( !incident ) @@ -924,7 +924,7 @@ { visited_mark(s) = true; bool some_vertex_on_or_below_h = false; - register int i; + 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); @@ -961,7 +961,8 @@ Vertex_handle v = nearest_neighbor(c); if ( dc == 0 ) { if ( C.has_on_bounded_side(associated_point(v)) ) - result.push_back(v); return result; + result.push_back(v); + return result; } Simplex_handle s = simplex(v); bool is_cocircular = const_cast(this)->is_S_cocircular(); @@ -993,8 +994,8 @@ Delaunay_d:: range_search(const std::vector& A) const { - typename R::Affinely_independent_d affinely_independent = - kernel().affinely_independent_d_object(); + 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 = diff -Nru cgal-4.7/include/CGAL/Delaunay_triangulation_2.h cgal-4.8/include/CGAL/Delaunay_triangulation_2.h --- cgal-4.7/include/CGAL/Delaunay_triangulation_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Delaunay_triangulation_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -31,7 +31,7 @@ #ifndef CGAL_TRIANGULATION_2_DONT_INSERT_RANGE_OF_POINTS_WITH_INFO #include #include - +#include #include #include @@ -1053,27 +1053,11 @@ afi++) *fit++ = afi; } else { - #ifdef CGAL_HAS_THREADS - static boost::thread_specific_ptr< int > maxd_ptr; - static boost::thread_specific_ptr< std::vector > f_ptr; - static boost::thread_specific_ptr< std::vector > i_ptr; - static boost::thread_specific_ptr< std::vector > w_ptr; - if (maxd_ptr.get() == NULL) { - maxd_ptr.reset(new int(30)); - f_ptr.reset(new std::vector(*maxd_ptr)); - i_ptr.reset(new std::vector(*maxd_ptr)); - w_ptr.reset(new std::vector(*maxd_ptr)); - } - int& maxd=*maxd_ptr; - std::vector& f=*f_ptr; - std::vector& i=*i_ptr; - std::vector& w=*w_ptr; - #else - static int maxd=30; - static std::vector f(maxd); - static std::vector i(maxd); - static std::vector w(maxd); - #endif + CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector , f, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, i, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, w, maxd); + int d; remove_degree_init(v,f,w,i,d,maxd); remove_degree_triangulate(v,f,w,i,d); @@ -1097,27 +1081,11 @@ 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 > f_ptr; - static boost::thread_specific_ptr< std::vector > i_ptr; - static boost::thread_specific_ptr< std::vector > w_ptr; - if (maxd_ptr.get() == NULL) { - maxd_ptr.reset(new int(30)); - f_ptr.reset(new std::vector(*maxd_ptr)); - i_ptr.reset(new std::vector(*maxd_ptr)); - w_ptr.reset(new std::vector(*maxd_ptr)); - } - int& maxd=*maxd_ptr; - std::vector& f=*f_ptr; - std::vector& i=*i_ptr; - std::vector& w=*w_ptr; - #else - static int maxd=30; - static std::vector f(maxd); - static std::vector i(maxd); - static std::vector w(maxd); - #endif + CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector , f, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, i, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, 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); @@ -2260,27 +2228,11 @@ { int d; - #ifdef CGAL_HAS_THREADS - static boost::thread_specific_ptr< int > maxd_ptr; - static boost::thread_specific_ptr< std::vector > f_ptr; - static boost::thread_specific_ptr< std::vector > i_ptr; - static boost::thread_specific_ptr< std::vector > w_ptr; - if (maxd_ptr.get() == NULL) { - maxd_ptr.reset(new int(30)); - f_ptr.reset(new std::vector(*maxd_ptr)); - i_ptr.reset(new std::vector(*maxd_ptr)); - w_ptr.reset(new std::vector(*maxd_ptr)); - } - int& maxd=*maxd_ptr; - std::vector& f=*f_ptr; - std::vector& i=*i_ptr; - std::vector& w=*w_ptr; - #else - static int maxd=30; - static std::vector f(maxd); - static std::vector i(maxd); - static std::vector w(maxd); - #endif + CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector , f, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, i, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, w, maxd); + remove_degree_init(v,f,w,i,d,maxd); remove_degree_triangulate(v,f,w,i,d); } @@ -2494,27 +2446,11 @@ { - #ifdef CGAL_HAS_THREADS - static boost::thread_specific_ptr< int > maxd_ptr; - static boost::thread_specific_ptr< std::vector > f_ptr; - static boost::thread_specific_ptr< std::vector > i_ptr; - static boost::thread_specific_ptr< std::vector > w_ptr; - if (maxd_ptr.get() == NULL) { - maxd_ptr.reset(new int(30)); - f_ptr.reset(new std::vector(*maxd_ptr)); - i_ptr.reset(new std::vector(*maxd_ptr)); - w_ptr.reset(new std::vector(*maxd_ptr)); - } - int& maxd=*maxd_ptr; - std::vector& f=*f_ptr; - std::vector& i=*i_ptr; - std::vector& w=*w_ptr; - #else - static int maxd=30; - static std::vector f(maxd); - static std::vector i(maxd); - static std::vector w(maxd); - #endif + CGAL_STATIC_THREAD_LOCAL_VARIABLE(int, maxd,30); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector , f, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, i, maxd); + CGAL_STATIC_THREAD_LOCAL_VARIABLE(std::vector, w, maxd); + int d; remove_degree_init(v,f,w,i,d,maxd); remove_degree_triangulate(v,f,w,i,d); diff -Nru cgal-4.7/include/CGAL/Delaunay_triangulation_3.h cgal-4.8/include/CGAL/Delaunay_triangulation_3.h --- cgal-4.7/include/CGAL/Delaunay_triangulation_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Delaunay_triangulation_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -61,6 +61,10 @@ # 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 +#endif + namespace CGAL { // Here is the declaration of a class template with three arguments, one @@ -263,6 +267,76 @@ insert(first, last); } +private: + #ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE + std::vector + add_temporary_points_on_far_sphere(const size_t num_points) + { + std::vector 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 random_point(radius); + const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( + tbb::task_scheduler_init::default_num_threads() * 3.5); + std::vector 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::const_iterator it_p = points_on_far_sphere.begin(); + typename std::vector::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 & 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 @@ -295,49 +369,10 @@ size_t num_points = points.size(); Vertex_handle hint; - std::vector 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 random_point(radius); - const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( - tbb::task_scheduler_init::default_num_threads() * 3.5); - std::vector 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::const_iterator it_p = points_on_far_sphere.begin(); - std::vector::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); - } - } + std::vector 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; @@ -357,11 +392,7 @@ ); #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()); - } + remove_temporary_points_on_far_sphere(far_sphere_vertices); #endif // CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE } // Sequential @@ -413,13 +444,51 @@ spatial_sort(indices.begin(),indices.end(),Search_traits(&(points[0]),geom_traits())); - Vertex_handle hint; - for (typename std::vector::const_iterator - it = indices.begin(), end = indices.end(); - it != end; ++it){ - hint = insert(points[*it], hint); - if (hint!=Vertex_handle()) hint->info()=infos[*it]; - } +#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 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 tls_hint(hint); + tbb::parallel_for( + tbb::blocked_range( i, num_points ), + Insert_point_with_info(*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::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; } @@ -896,6 +965,91 @@ 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 + 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 & m_points; + const std::vector & m_infos; + const std::vector & m_indices; + tbb::enumerable_thread_specific & m_tls_hint; + + public: + // Constructor + Insert_point_with_info(DT & dt, + const std::vector & points, + const std::vector & infos, + const std::vector & indices, + tbb::enumerable_thread_specific & 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& 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 diff -Nru cgal-4.7/include/CGAL/Diagonalize_traits.h cgal-4.8/include/CGAL/Diagonalize_traits.h --- cgal-4.7/include/CGAL/Diagonalize_traits.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Diagonalize_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +namespace CGAL { + + /// A model of the concept `DiagonalizeTraits` + /// \cgalModels `DiagonalizeTraits` + +template +class Diagonalize_traits{ + +public: + + typedef cpp11::array Vector; + typedef cpp11::array Matrix; + typedef cpp11::array 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 (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 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 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& d, const Cartesian_tag&) { typename R::Vector_2 v = d.to_vector(); - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << v.x() << ' ' << v.y(); case IO::BINARY : @@ -202,7 +202,7 @@ std::ostream& insert(std::ostream& os, const Direction_2& d, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << d.dx() << ' ' << d.dy(); @@ -229,7 +229,7 @@ extract(std::istream& is, Direction_2& d, const Cartesian_tag&) { typename R::FT x, y; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y); break; @@ -252,7 +252,7 @@ extract(std::istream& is, Direction_2& d, const Homogeneous_tag&) { typename R::RT x, y; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y); diff -Nru cgal-4.7/include/CGAL/Direction_3.h cgal-4.8/include/CGAL/Direction_3.h --- cgal-4.7/include/CGAL/Direction_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Direction_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -139,7 +139,7 @@ insert(std::ostream& os, const Direction_3& d, const Cartesian_tag&) { typename R::Vector_3 v = d.to_vector(); - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << v.x() << ' ' << v.y() << ' ' << v.z(); case IO::BINARY : @@ -157,7 +157,7 @@ std::ostream& insert(std::ostream& os, const Direction_3& d, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << d.dx() << ' ' << d.dy() << ' ' << d.dz(); @@ -186,7 +186,7 @@ extract(std::istream& is, Direction_3& d, const Cartesian_tag&) { typename R::FT x, y, z; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y) >> iformat(z); break; @@ -210,7 +210,7 @@ extract(std::istream& is, Direction_3& d, const Homogeneous_tag&) { typename R::RT x, y, z; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y) >> iformat(z); diff -Nru cgal-4.7/include/CGAL/Discrete_authalic_parameterizer_3.h cgal-4.8/include/CGAL/Discrete_authalic_parameterizer_3.h --- cgal-4.7/include/CGAL/Discrete_authalic_parameterizer_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Discrete_authalic_parameterizer_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include /// \file Discrete_authalic_parameterizer_3.h @@ -55,7 +56,7 @@ /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -64,7 +65,7 @@ class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_authalic_parameterizer_3 : public Fixed_border_parameterizer_3 #include +#include /// \file Discrete_conformal_map_parameterizer_3.h @@ -61,7 +62,7 @@ /// \sa `CGAL::Fixed_border_parameterizer_3` /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` /// \sa `CGAL::Mean_value_coordinates_parameterizer_3` template @@ -70,7 +71,7 @@ class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > class Discrete_conformal_map_parameterizer_3 : public Fixed_border_parameterizer_3 #include #include -#include +#include #include #include @@ -64,7 +64,7 @@ const rich_grid_internal::Rich_point& query, ///< 3D point to project const std::vector >& neighbor_points,///< neighbor sample points - const typename Kernel::FT edge_sensitivity,///< edge senstivity parameter + const typename Kernel::FT edge_sensitivity,///< edge sensitivity parameter unsigned int& output_base_index ///< base point index ) { @@ -183,7 +183,7 @@ neighbor_indexes.insert(father_v.index); neighbor_indexes.insert(mother_v.index); - double radius2 = radius * radius; + FT radius2 = radius * radius; new_v.neighbors.clear(); std::set::iterator set_iter; @@ -215,7 +215,7 @@ for (unsigned int i = 0; i < new_v.neighbors.size(); ++i) { - Rich_point& t = rich_point_set[new_v.neighbors[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); @@ -233,12 +233,12 @@ } // select best candidate - FT min_project_dist = (FT)(std::numeric_limits::max)(); + FT min_project_dist = (std::numeric_limits::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]); + FT absolute_dist = CGAL::abs(project_dist_sum[i] / weight_sum[i]); if (absolute_dist < min_project_dist) { min_project_dist = absolute_dist; @@ -285,6 +285,10 @@ /// 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`. @@ -304,7 +308,8 @@ /// // This variant requires all parameters. -template ( first, beyond, point_pmap, nb_neighbors); - if (neighbor_radius < average_spacing * 1.0) + if (neighbor_radius < average_spacing) { - neighbor_radius = average_spacing * 3.0; + neighbor_radius = average_spacing * 3.0f; #ifdef CGAL_PSP3_VERBOSE std::cout << "neighbor radius: " << neighbor_radius << std::endl; #endif } - Timer task_timer; + Real_timer task_timer; // copy rich point set std::vector rich_point_set(number_of_input); @@ -402,7 +407,7 @@ neighbor_radius); // - FT cos_sigma = std::cos(sharpness_angle / 180.0 * 3.1415926); + FT cos_sigma = static_cast(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; @@ -439,7 +444,7 @@ //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]; + const Rich_point& v = rich_point_set[i]; if (v.neighbors.empty()) continue; @@ -452,7 +457,7 @@ } unsigned int base_index = 0; - double density2 = upsample_internal:: + FT density2 = upsample_internal:: base_point_selection(v, neighbor_rich_points, edge_sensitivity, @@ -468,7 +473,7 @@ } } - density_pass_threshold = sqrt(sum_density / count_density) * 0.65; + density_pass_threshold = static_cast(sqrt(sum_density / count_density) * FT(0.65)); sum_density = 0.; count_density = 1; @@ -494,7 +499,7 @@ continue; } - Rich_point& v = rich_point_set[i]; + const Rich_point& v = rich_point_set[i]; if (v.neighbors.empty()) continue; @@ -572,7 +577,7 @@ for (std::size_t i = number_of_input; i < rich_point_set.size(); ++i) { - Rich_point& v = rich_point_set[i]; + const Rich_point& v = rich_point_set[i]; Point point = v.pt; Vector normal = v.normal; *output++ = std::make_pair(point, normal); @@ -584,7 +589,8 @@ /// @cond SKIP_IN_MANUAL // This variant deduces the kernel from the point property map. -template @@ -596,21 +602,22 @@ 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 edge_sensitivity, ///< edge sensitivity(0-5) double neighbor_radius, ///< initial size of neighbors. - const unsigned int number_of_output_points///< number of iterations. + const std::size_t number_of_output_points///< number of iterations. ) { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - return edge_aware_upsample_point_set( + typedef typename Kernel::FT FT; + return edge_aware_upsample_point_set( first, beyond, output, point_pmap, normal_pmap, - sharpness_angle, - edge_sensitivity, - neighbor_radius, + static_cast(sharpness_angle), + static_cast(edge_sensitivity), + static_cast(neighbor_radius), number_of_output_points, Kernel()); } @@ -618,7 +625,8 @@ /// @cond SKIP_IN_MANUAL -template OutputIterator @@ -628,14 +636,14 @@ 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 edge_sensitivity = 1, ///< edge sensitivity(0-5) double neighbor_radius = -1, ///< initial size of neighbors. - const unsigned int number_of_output_points = 1000///< number of output points. + 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 - ::type>( + ::type>( first, beyond, output, normal_pmap, diff -Nru cgal-4.7/include/CGAL/eigen_2.h cgal-4.8/include/CGAL/eigen_2.h --- cgal-4.7/include/CGAL/eigen_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/eigen_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -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 - void eigen_symmetric_2(const typename K::FT *matrix, // a b c - std::pair& eigen_vectors, - std::pair& 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*CGAL::sqrt(p) + c + a)); - FT l2 = (FT)(0.5 * ( CGAL::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)(-(CGAL::sqrt(p)-c+a) / (2*b))); - eigen_vectors.second = Vector((FT)1.0, (FT)( (CGAL::sqrt(p)+c-a) / (2*b))); - } - else - { - eigen_values.first = l2; - eigen_values.second = l1; - eigen_vectors.first = Vector((FT)1.0, (FT)( (CGAL::sqrt(p)+c-a) / (2*b))); - eigen_vectors.second = Vector((FT)1.0, (FT)(-(CGAL::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 -Nru cgal-4.7/include/CGAL/Eigen_diagonalize_traits.h cgal-4.8/include/CGAL/Eigen_diagonalize_traits.h --- cgal-4.7/include/CGAL/Eigen_diagonalize_traits.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Eigen_diagonalize_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include + +namespace CGAL { + +/// A model of the concept `DiagonalizeTraits` using \ref thirdpartyEigen. +/// \cgalModels `DiagonalizeTraits` + +template +class Eigen_diagonalize_traits{ + +public: + + typedef cpp11::array Vector; + typedef cpp11::array Matrix; + typedef cpp11::array Covariance_matrix; + +private: + + typedef Eigen::Matrix EigenMatrix; + typedef Eigen::Matrix 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(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 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(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(eigenvalues_[i]); + + for (std::size_t j = 0; j < dim; ++ j) + eigenvectors[dim*i + j]=static_cast(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 (eigenvectors(i,dim-1)); + + return true; + } +}; + +} // namespace CGAL + +#endif // CGAL_EIGEN_DIAGONALIZE_TRAITS_H diff -Nru cgal-4.7/include/CGAL/eigen.h cgal-4.8/include/CGAL/eigen.h --- cgal-4.7/include/CGAL/eigen.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/eigen.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL { - -namespace internal { - -template -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 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( iEigen::BiCGSTAB for double. /// -/// \cgalModels `SparseLinearAlgebraTraitsWithFactor_d`. +/// \cgalModels `SparseLinearAlgebraWithFactorTraits_d`. template::EigenType> > class Eigen_solver_traits @@ -79,6 +79,7 @@ typedef typename EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef typename internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; @@ -159,7 +160,7 @@ }; -//specilization of the solver for BiCGSTAB as for surface parameterization, the +//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::EigenType> > @@ -168,6 +169,7 @@ typedef EigenSolverT::Scalar Scalar; // Public types public: + typedef EigenSolverT Solver; typedef Scalar NT; typedef internal::Get_eigen_matrix::type Matrix; typedef Eigen_vector Vector; diff -Nru cgal-4.7/include/CGAL/Eigen_vcm_traits.h cgal-4.8/include/CGAL/Eigen_vcm_traits.h --- cgal-4.7/include/CGAL/Eigen_vcm_traits.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Eigen_vcm_traits.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +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 and Quentin Mérigot -// - -#ifndef CGAL_EIGEN_VCM_TRAITS_H -#define CGAL_EIGEN_VCM_TRAITS_H - -#include -#include - -#include - -namespace CGAL { - -/// A model of the concept `VCMTraits` using \ref thirdpartyEigen. -/// \cgalModels `VCMTraits` -class Eigen_vcm_traits{ - // Construct the covariance matrix - static Eigen::Matrix3f - construct_covariance_matrix (const cpp11::array& cov) { - Eigen::Matrix3f m; - - m(0,0) = cov[0]; m(0,1) = cov[1]; m(0,2) = cov[2]; - m(1,1) = cov[3]; m(1,2) = cov[4]; - m(2,2) = cov[5]; - - m(1, 0) = m(0,1); m(2, 0) = m(0, 2); m(2, 1) = m(1, 2); - - return m; - } - - // Diagonalize a selfadjoint matrix - static bool - diagonalize_selfadjoint_matrix (Eigen::Matrix3f &m, - Eigen::Matrix3f &eigenvectors, - Eigen::Vector3f &eigenvalues) { - Eigen::SelfAdjointEigenSolver 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 cpp11::array& cov, - cpp11::array& eigenvalues) - { - Eigen::Matrix3f m = construct_covariance_matrix(cov); - - // Diagonalizing the matrix - Eigen::Vector3f eigenvalues_; - Eigen::Matrix3f eigenvectors_; - bool res = diagonalize_selfadjoint_matrix(m, eigenvectors_, eigenvalues_); - - if (res) - { - eigenvalues[0]=eigenvalues_[0]; - eigenvalues[1]=eigenvalues_[1]; - eigenvalues[2]=eigenvalues_[2]; - } - - return res; - } - - // Extract the eigenvector associated to the largest eigenvalue - static bool - extract_largest_eigenvector_of_covariance_matrix ( - const cpp11::array& cov, - cpp11::array &normal) - { - // Construct covariance matrix - Eigen::Matrix3f m = construct_covariance_matrix(cov); - - // Diagonalizing the matrix - Eigen::Vector3f eigenvalues; - Eigen::Matrix3f eigenvectors; - if (! diagonalize_selfadjoint_matrix(m, eigenvectors, eigenvalues)) { - return false; - } - - // Eigenvalues are already sorted by increasing order - normal[0]=eigenvectors(0,0); - normal[1]=eigenvectors(1,0); - normal[2]=eigenvectors(2,0); - - return true; - } -}; - -} // namespace CGAL - -#endif // CGAL_EIGEN_VCM_TRAITS_H diff -Nru cgal-4.7/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h cgal-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h --- cgal-4.7/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -627,8 +627,9 @@ // 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 v_leftmost = - boost::optional(); + boost::make_optional(false, Vertex_const_handle()); if (is_leftmost1 == true) { if (is_leftmost2 == false) diff -Nru cgal-4.7/include/CGAL/Exact_predicates_exact_constructions_kernel.h cgal-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel.h --- cgal-4.7/include/CGAL/Exact_predicates_exact_constructions_kernel.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Exact_predicates_exact_constructions_kernel.h 2016-04-04 19:00:11.000000000 +0000 @@ -28,7 +28,7 @@ #include #include #include - +#include #include #ifndef CGAL_DONT_USE_LAZY_KERNEL @@ -88,6 +88,11 @@ typedef Epeck Exact_predicates_exact_constructions_kernel; +template <> +struct Triangulation_structural_filtering_traits { + typedef Tag_true Use_structural_filtering_tag; +}; + } //namespace CGAL #endif // CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H diff -Nru cgal-4.7/include/CGAL/Exact_predicates_inexact_constructions_kernel.h cgal-4.8/include/CGAL/Exact_predicates_inexact_constructions_kernel.h --- cgal-4.7/include/CGAL/Exact_predicates_inexact_constructions_kernel.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Exact_predicates_inexact_constructions_kernel.h 2016-04-04 19:00:11.000000000 +0000 @@ -27,6 +27,7 @@ #include #include +#include namespace CGAL { @@ -45,6 +46,11 @@ typedef Epick Exact_predicates_inexact_constructions_kernel; +template <> +struct Triangulation_structural_filtering_traits { + typedef Tag_true Use_structural_filtering_tag; +}; + } //namespace CGAL #endif // CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H diff -Nru cgal-4.7/include/CGAL/export/helpers.h cgal-4.8/include/CGAL/export/helpers.h --- cgal-4.7/include/CGAL/export/helpers.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/export/helpers.h 2016-04-04 19:00:11.000000000 +0000 @@ -20,20 +20,28 @@ #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) +#ifdef CGAL_HEADER_ONLY +# define CGAL_DLL_IMPORT +# define CGAL_DLL_EXPORT # 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 + +#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 -Nru cgal-4.7/include/CGAL/extremal_polygon_2.h cgal-4.8/include/CGAL/extremal_polygon_2.h --- cgal-4.7/include/CGAL/extremal_polygon_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/extremal_polygon_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,8 @@ #include #include #include - +#include +#include namespace CGAL { //!!! This will eventually be integrated into function_objects.h @@ -38,7 +39,6 @@ struct Index_operator : public std::binary_function< Array, Index, Element > { - Element& operator()( Array& a, const Index& i) const { return a[i]; } @@ -432,8 +432,6 @@ // 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( @@ -448,11 +446,10 @@ points_begin, points_end, k, - transform_iterator( + CGAL::transform_iterator( o, - bind1st( - Index_operator< RandomAccessIC, int, Point_2 >(), - points_begin)), + boost::make_adaptable(boost::bind(Index_operator< RandomAccessIC, int, Point_2 >(), + points_begin, _1))), t); } @@ -469,6 +466,7 @@ OutputIterator o, const Traits& t) { return extremal_polygon_2(points_begin, points_end, k, o, t); } + template < class RandomAccessIC, class OutputIterator, class Traits > diff -Nru cgal-4.7/include/CGAL/exude_mesh_3.h cgal-4.8/include/CGAL/exude_mesh_3.h --- cgal-4.7/include/CGAL/exude_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/exude_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -34,6 +34,11 @@ namespace CGAL { +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + BOOST_PARAMETER_FUNCTION( (Mesh_optimization_return_code), exude_mesh_3, @@ -47,6 +52,7 @@ { return exude_mesh_3_impl(c3t3, time_limit_, sliver_bound_); } +CGAL_PRAGMA_DIAG_POP diff -Nru cgal-4.7/include/CGAL/Fixed_border_parameterizer_3.h cgal-4.8/include/CGAL/Fixed_border_parameterizer_3.h --- cgal-4.7/include/CGAL/Fixed_border_parameterizer_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Fixed_border_parameterizer_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,7 +24,8 @@ #include #include -#include +#include + #include #include @@ -80,8 +81,8 @@ class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits -> + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Fixed_border_parameterizer_3 : public Parameterizer_traits_3 { diff -Nru cgal-4.7/include/CGAL/FPU.h cgal-4.8/include/CGAL/FPU.h --- cgal-4.7/include/CGAL/FPU.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/FPU.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,9 +1,9 @@ -// Copyright (c) 1998-2008 +// 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. +// and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as @@ -66,7 +66,11 @@ # 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 @@ -115,14 +119,22 @@ # define CGAL_USE_SSE2 1 #endif -namespace CGAL { +#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG +#ifdef CGAL_HEADER_ONLY +#include // To define get_static_minimin(); +#else // CGAL_HEADER_ONLY +namespace CGAL { namespace internal { - -#ifdef CGAL_CFG_DENORMALS_COMPILE_BUG CGAL_EXPORT extern double minimin; +} +} +#endif // CGAL_HEADER_ONLY + #endif +namespace CGAL { +namespace internal { #ifdef __INTEL_COMPILER const double infinity = std::numeric_limits::infinity(); #else @@ -410,11 +422,27 @@ return cw; } +} // namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + +namespace CGAL { + +// User interface (cont): + inline void FPU_set_cw (FPU_CW_t cw) { - CGAL_IA_SETFPCW(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 diff -Nru cgal-4.7/include/CGAL/Fuzzy_sphere.h cgal-4.8/include/CGAL/Fuzzy_sphere.h --- cgal-4.7/include/CGAL/Fuzzy_sphere.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Fuzzy_sphere.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,9 @@ #include #include +#include +#include + namespace CGAL { namespace internal{ @@ -150,8 +153,12 @@ 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_) {} + 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 >::type* = 0) + : Base(get(traits_.point_property_map(),center),radius,epsilon,traits_) {} }; } // namespace CGAL diff -Nru cgal-4.7/include/CGAL/generators.h cgal-4.8/include/CGAL/generators.h --- cgal-4.7/include/CGAL/generators.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/generators.h 2016-04-04 19:00:11.000000000 +0000 @@ -68,7 +68,7 @@ public: typedef Random_generator_base This; - Random_generator_base() : _rnd( default_random) {} + Random_generator_base() : _rnd( CGAL::get_default_random() ) {} Random_generator_base( double range, Random& rnd) : Generator_base( range), _rnd( rnd) {} Random_generator_base( const T& item, double range, Random& rnd) @@ -83,7 +83,7 @@ public: typedef Random_double_in_interval This; - Random_double_in_interval(double a = 1, Random& rnd = default_random) + 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} diff -Nru cgal-4.7/include/CGAL/gl.h cgal-4.8/include/CGAL/gl.h --- cgal-4.7/include/CGAL/gl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/gl.h 2016-04-04 19:00:11.000000000 +0000 @@ -24,7 +24,11 @@ #endif #ifdef __APPLE__ -# include +# if TARGET_OS_IPHONE +# include +# else +# include +# endif #else # include #endif diff -Nru cgal-4.7/include/CGAL/GMP/Gmpfi_type.h cgal-4.8/include/CGAL/GMP/Gmpfi_type.h --- cgal-4.7/include/CGAL/GMP/Gmpfi_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/GMP/Gmpfi_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,9 +26,9 @@ #include #include #include -#ifdef CGAL_HAS_THREADS -# include -#endif +#include +#include + #include #include @@ -80,11 +80,8 @@ // 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 Gmpfi_default_precision_; -#else - static mp_prec_t Gmpfi_default_precision=CGAL_GMPFI_DEFAULT_PRECISION; -#endif + + class Gmpfi: boost::ordered_euclidian_ring_operators1=MPFR_PREC_MIN&&prec<=MPFR_PREC_MAX); -#ifdef CGAL_HAS_THREADS - *Gmpfi_default_precision_.get()=prec; -#else - Gmpfi_default_precision=prec; -#endif + default_precision() = prec; + return old_prec; } @@ -832,7 +819,7 @@ std::istream::int_type c; std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); - gmpz_eat_white_space(is); + internal::eat_white_space(is); c=is.get(); if(c!='['){ invalid_number: @@ -840,13 +827,13 @@ is.flags(old_flags); return is; } - gmpz_eat_white_space(is); + internal::eat_white_space(is); is>>left; c=is.get(); if(c!=',') goto invalid_number; is>>right; - gmpz_eat_white_space(is); + internal::eat_white_space(is); c=is.get(); if(c!=']') goto invalid_number; diff -Nru cgal-4.7/include/CGAL/GMP/Gmpfr_type.h cgal-4.8/include/CGAL/GMP/Gmpfr_type.h --- cgal-4.7/include/CGAL/GMP/Gmpfr_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/GMP/Gmpfr_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #if MPFR_VERSION_MAJOR < 3 typedef mp_rnd_t mpfr_rnd_t; @@ -1030,7 +1031,7 @@ std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); - gmpz_eat_white_space(is); + 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 @@ -1042,11 +1043,11 @@ case '-': neg_mant=true; is.get(); - gmpz_eat_white_space(is); + internal::eat_white_space(is); break; case '+': is.get(); - gmpz_eat_white_space(is); + internal::eat_white_space(is); break; case 'n': // this is NaN is.get(); @@ -1088,7 +1089,7 @@ mant=-mant; is.putback(c); - gmpz_eat_white_space(is); + internal::eat_white_space(is); switch(c=is.get()){ case 'e': @@ -1103,17 +1104,17 @@ case '-': neg_exp=true; is.get(); - gmpz_eat_white_space(is); + internal::eat_white_space(is); break; case '+': is.get(); - gmpz_eat_white_space(is); + internal::eat_white_space(is); break; default: if(c<'0'||c>'9') goto invalid_number; } - gmpz_eat_white_space(is); + internal::eat_white_space(is); while((c=is.get())>='0'&&c<='9') exp=10*exp+(c-'0'); is.putback(c); diff -Nru cgal-4.7/include/CGAL/GMP/Gmpq_type.h cgal-4.8/include/CGAL/GMP/Gmpq_type.h --- cgal-4.7/include/CGAL/GMP/Gmpq_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/GMP/Gmpq_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -27,6 +27,8 @@ #define CGAL_GMPQ_TYPE_H #include +#include + #include #include @@ -486,137 +488,17 @@ // 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 . - 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)); + internal::read_float_or_quotient(is, z); return is; } + inline Gmpq min BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){ return (x<=y)?x:y; } diff -Nru cgal-4.7/include/CGAL/GMP/Gmpz_type.h cgal-4.8/include/CGAL/GMP/Gmpz_type.h --- cgal-4.7/include/CGAL/GMP/Gmpz_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/GMP/Gmpz_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -27,6 +27,8 @@ #define CGAL_GMPZ_TYPE_H #include +#include + #include #include @@ -282,27 +284,6 @@ 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 & @@ -315,14 +296,14 @@ std::ios::fmtflags old_flags = is.flags(); is.unsetf(std::ios::skipws); - gmpz_eat_white_space(is); + internal::eat_white_space(is); c=is.peek(); if (c=='-' || c=='+'){ is.get(); CGAL_assertion(!is.fail()); negative=(c=='-'); - gmpz_eat_white_space(is); + internal::eat_white_space(is); c=is.peek(); } diff -Nru cgal-4.7/include/CGAL/graph_traits_Arrangement_2.h cgal-4.8/include/CGAL/graph_traits_Arrangement_2.h --- cgal-4.7/include/CGAL/graph_traits_Arrangement_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/graph_traits_Arrangement_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -26,6 +26,9 @@ * Definition of the specialized boost::graph_traits class. */ +// include this to avoid a VC15 warning +#include + #include #include #include diff -Nru cgal-4.7/include/CGAL/graph_traits_Dual_Arrangement_2.h cgal-4.8/include/CGAL/graph_traits_Dual_Arrangement_2.h --- cgal-4.7/include/CGAL/graph_traits_Dual_Arrangement_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/graph_traits_Dual_Arrangement_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -27,6 +27,9 @@ * and the specialized boost::graph_traits >class. */ +// include this to avoid a VC15 warning +#include + #include #include diff -Nru cgal-4.7/include/CGAL/Gray_image_mesh_domain_3.h cgal-4.8/include/CGAL/Gray_image_mesh_domain_3.h --- cgal-4.7/include/CGAL/Gray_image_mesh_domain_3.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Gray_image_mesh_domain_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include + +#include + +namespace CGAL { + +namespace internal { + + template + struct Greater_than { + typedef T argument_type; + Greater_than(const T& second) : second(second) {} + bool operator()(const T& first) const { + return std::greater()(first, second); + } + T second; + }; + +} + +/** + * @class Gray_image_mesh_domain_3 + * + * + */ +template, + typename Subdomain_index = int> +class Gray_image_mesh_domain_3 + : public Labeled_mesh_domain_3< + Mesh_3::Image_to_labeled_function_wrapper , + BGT> +{ +public: + typedef Mesh_3::Image_to_labeled_function_wrapper Wrapper; + + typedef Labeled_mesh_domain_3 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 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 -Nru cgal-4.7/include/CGAL/hierarchy_simplify_point_set.h cgal-4.8/include/CGAL/hierarchy_simplify_point_set.h --- cgal-4.7/include/CGAL/hierarchy_simplify_point_set.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/hierarchy_simplify_point_set.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +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& cluster, + std::list& points_to_keep, + std::list& points_to_remove, + PointPMap& point_pmap, + const typename K::Point_3& centroid, + const K&) + { + typedef typename std::list::iterator Iterator; + typedef typename K::FT FT; + typedef typename K::Point_3 Point; + + FT dist_min = (std::numeric_limits::max)(); + + typename std::list::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`. + /// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3`. + /// @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 + 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::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, Point > cluster; + + std::list clusters_stack; + typedef typename std::list::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(), 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 points_to_keep; + std::list 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 covariance = {{ 0., 0., 0., 0., 0., 0. }}; + + for (typename std::list::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 eigenvalues = {{ 0., 0., 0. }}; + cpp11::array 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(), 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::iterator it = current_cluster->first.begin (); + while (it != current_cluster->first.end ()) + { + typename std::list::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 + 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::value_type Point; + typedef typename Kernel_traits::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 + 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::value_type Point; + typedef typename Kernel_traits::Kernel Kernel; + return hierarchy_simplify_point_set (begin, end, point_pmap, size, var_max, + Default_diagonalize_traits (), Kernel()); + } + /// @endcond + + /// @cond SKIP_IN_MANUAL + // This variant creates a default point property map = Identity_property_map. + template + 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::value_type()), +#endif + size, var_max); + } + /// @endcond + +} // namespace CGAL + +#endif // HIERARCHY_SIMPLIFY_POINT_SET_H diff -Nru cgal-4.7/include/CGAL/Image_3.h cgal-4.8/include/CGAL/Image_3.h --- cgal-4.7/include/CGAL/Image_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Image_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -23,10 +23,11 @@ #define CGAL_IMAGE_3_H #include +#include #include - #include +#include #include #include @@ -62,6 +63,7 @@ class CGAL_IMAGEIO_EXPORT Image_3 { + struct Image_deleter { void operator()(_image* image) { @@ -162,10 +164,6 @@ 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, @@ -232,7 +230,8 @@ 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; + 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; @@ -249,7 +248,7 @@ ly >= dimy-1 || lx >= dimx-1) { - return transform(value_outside); + return Target_word_type(transform(value_outside)); } // images are indexed by (z,y,x) @@ -288,17 +287,17 @@ 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)); + 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 = transform(*ptr); - const Target_word_type f = transform(*(ptr+1)); + 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 = transform(*ptr); - const Target_word_type g = transform(*(ptr+1)); + 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 = transform(*ptr); - const Target_word_type h = transform(*(ptr+1)); + 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]; @@ -310,7 +309,7 @@ // 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); +// const Target_word_type outside = Target_word_type(transform(value_outside); // if(x < 0.f || // y < 0.f || @@ -445,42 +444,57 @@ const int k1 = (int)(lx); const int i2 = i1 + 1; const int j2 = j1 + 1; - const int k2 = k1 + 1; - std::set 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::cpp11::array 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 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(labels.size())); + static_cast(lc)); - if(labels.size() == 1) { - return *(labels.begin()); + if(lc == 1) { + return labels[0]; } - + typedef ImageIO::Indicator Indicator; double best_value = 0.; Image_word_type best = 0; - for(typename std::set::const_iterator - label_it = labels.begin(), - end = labels.end(); - label_it != end; ++label_it) + for(int i = 0; i < lc; ++i) { + Image_word_type iwt = labels[i]; const double r = trilinear_interpolation( - x, y, z, value_outside, Indicator(*label_it)); + x, y, z, value_outside, Indicator(iwt)); CGAL_assertion(r >= 0.); CGAL_assertion(r <= 1.); if(r > best_value) { - best = *label_it; + best = iwt; best_value = r; } } @@ -490,10 +504,12 @@ } // end namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY #if defined(BOOST_MSVC) # pragma warning(pop) #endif - #endif // CGAL_IMAGE_3_H diff -Nru cgal-4.7/include/CGAL/Image_3_impl.h cgal-4.8/include/CGAL/Image_3_impl.h --- cgal-4.7/include/CGAL/Image_3_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Image_3_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include + +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;ixdim;i+=5) + for(unsigned int j=0;jydim;j+=5) + for(unsigned int k=0;kzdim;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 +#include + +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 -Nru cgal-4.7/include/CGAL/Image_3_vtk_interface.h cgal-4.8/include/CGAL/Image_3_vtk_interface.h --- cgal-4.7/include/CGAL/Image_3_vtk_interface.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Image_3_vtk_interface.h 2016-04-04 19:00:11.000000000 +0000 @@ -23,7 +23,6 @@ #include -#ifdef CGAL_USE_VTK #include #include #include @@ -110,12 +109,12 @@ data_array = array; ); - vtk_image->SetDimensions(image.xdim(), - image.ydim(), - image.zdim()); - vtk_image->SetExtent(0, image.xdim()-1, - 0, image.ydim()-1, - 0, image.zdim()-1); + 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()); @@ -126,7 +125,5 @@ } //end namespace CGAL -#endif // CGAL_USE_VTK - #endif // CGAL_IMAGE_3_VTK_INTERFACE_H diff -Nru cgal-4.7/include/CGAL/ImageIO.h cgal-4.8/include/CGAL/ImageIO.h --- cgal-4.7/include/CGAL/ImageIO.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/ImageIO.h 2016-04-04 19:00:11.000000000 +0000 @@ -700,5 +700,8 @@ */ CGAL_IMAGEIO_EXPORT void convertImageTypeToFloat(_image* image); +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY #endif // end IMAGEIO_H diff -Nru cgal-4.7/include/CGAL/ImageIO_impl.h cgal-4.8/include/CGAL/ImageIO_impl.h --- cgal-4.7/include/CGAL/ImageIO_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/ImageIO_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include +#endif + +#include +#include +#include +#include + +/* 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 + reading failed.
    + 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;iimageFormat==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(posx /(image->vx)); + posy = static_cast(posy /(image->vy)); + posz = static_cast(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(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; idata ); + image->data = array; + + image->wordKind = WK_FLOAT; + image->wdim = 4; +} + diff -Nru cgal-4.7/include/CGAL/Implicit_mesh_domain_3.h cgal-4.8/include/CGAL/Implicit_mesh_domain_3.h --- cgal-4.7/include/CGAL/Implicit_mesh_domain_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Implicit_mesh_domain_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -74,7 +74,7 @@ /// Destructor virtual ~Implicit_mesh_domain_3() {} - + using Base::bbox; private: // Disabled copy constructor & assignment operator typedef Implicit_mesh_domain_3 Self; diff -Nru cgal-4.7/include/CGAL/Incremental_neighbor_search.h cgal-4.8/include/CGAL/Incremental_neighbor_search.h --- cgal-4.7/include/CGAL/Incremental_neighbor_search.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Incremental_neighbor_search.h 2016-04-04 19:00:12.000000000 +0000 @@ -82,7 +82,6 @@ typedef std::pair Point_with_transformed_distance; typedef std::pair Cell_with_distance; - class iterator; typedef std::vector Cell_with_distance_vector; typedef std::vector Point_with_distance_vector; @@ -97,6 +96,9 @@ 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, diff -Nru cgal-4.7/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h cgal-4.8/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h --- cgal-4.7/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/AABB_tree/AABB_drawing_traits.h 2016-04-04 19:00:11.000000000 +0000 @@ -50,7 +50,6 @@ // draw bbox 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(), @@ -79,7 +78,6 @@ bb.xmax(), bb.ymin(), bb.zmax()); gl_draw_edge(bb.xmax(), bb.ymax(), bb.zmax(), bb.xmax(), bb.ymax(), bb.zmin()); - ::glEnd(); } void gl_draw_edge(double px, double py, double pz, diff -Nru cgal-4.7/include/CGAL/internal/AFSR/construct_polyhedron.h cgal-4.8/include/CGAL/internal/AFSR/construct_polyhedron.h --- cgal-4.7/include/CGAL/internal/AFSR/construct_polyhedron.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/AFSR/construct_polyhedron.h 2016-04-04 19:00:11.000000000 +0000 @@ -51,7 +51,7 @@ const TDS_2& tds = s.triangulation_data_structure_2(); - int index = 0; + std::size_t index = 0; Vertex_iterator end = tds.vertices_end(); for(Vertex_iterator vit = tds.vertices_begin(); vit != end; ++vit){ diff -Nru cgal-4.7/include/CGAL/internal/AFSR/write_triple_indices.h cgal-4.8/include/CGAL/internal/AFSR/write_triple_indices.h --- cgal-4.7/include/CGAL/internal/AFSR/write_triple_indices.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/AFSR/write_triple_indices.h 2016-04-04 19:00:11.000000000 +0000 @@ -46,9 +46,9 @@ for(Face_iterator fit = tds.faces_begin(); fit != tds.faces_end(); ++fit){ if(fit->is_on_surface()){ - *out++ = CGAL::make_array(std::size_t(fit->vertex(0)->vertex_3()->id()), - std::size_t(fit->vertex(1)->vertex_3()->id()), - std::size_t(fit->vertex(2)->vertex_3()->id())); + *out++ = CGAL::make_array(fit->vertex(0)->vertex_3()->id(), + fit->vertex(1)->vertex_3()->id(), + fit->vertex(2)->vertex_3()->id()); } } return out; diff -Nru cgal-4.7/include/CGAL/internal/auxiliary/graph.h cgal-4.8/include/CGAL/internal/auxiliary/graph.h --- cgal-4.7/include/CGAL/internal/auxiliary/graph.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/auxiliary/graph.h 2016-04-04 19:00:12.000000000 +0000 @@ -687,6 +687,8 @@ node_block_first = NULL; arc_for_block_first = NULL; arc_rev_block_first = NULL; + orphan_first = NULL; + orphan_last = NULL; flow = 0; } @@ -796,7 +798,7 @@ inline void Graph::add_tweights(node_id i, captype cap_source, captype cap_sink) { - register captype delta = ((node*)i) -> tr_cap; + 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; diff -Nru cgal-4.7/include/CGAL/internal/Combinatorial_map_group_functors.h cgal-4.8/include/CGAL/internal/Combinatorial_map_group_functors.h --- cgal-4.7/include/CGAL/internal/Combinatorial_map_group_functors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Combinatorial_map_group_functors.h 2016-04-04 19:00:11.000000000 +0000 @@ -521,7 +521,7 @@ ( CMap* amap, typename CMap::Dart_handle adart, CGAL::Unique_hash_map::type, unsigned int, typename CMap::Hash_function> & - found_attributes, int mark ) + found_attributes, typename CMap::size_type mark ) { CGAL_assertion( amap!=NULL ); CGAL_static_assertion_msg(CMap::Helper::template @@ -579,7 +579,7 @@ static void run( CMap* amap, const std::deque &modified_darts, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_static_assertion( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); @@ -595,7 +595,7 @@ CGAL::Unique_hash_map found_attributes; - int mark = amap->get_new_mark(); // to mark incident cells. + typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells. typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) @@ -608,7 +608,7 @@ amap->negate_mark(mark); for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it, mark_modified_darts); if ( !amap->is_marked(*it, mark) ) @@ -623,7 +623,7 @@ &modified_darts, const std::deque &modified_darts2, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_static_assertion( 1<=i && i<=CMap::dimension ); CGAL_assertion( i!=j ); @@ -639,7 +639,7 @@ CGAL::Unique_hash_map found_attributes; - int mark = amap->get_new_mark(); // to mark incident cells. + typename CMap::size_type mark = amap->get_new_mark(); // to mark incident cells. typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) @@ -659,7 +659,7 @@ amap->negate_mark(mark); for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it, mark_modified_darts); if ( !amap->is_marked(*it, mark) ) @@ -667,7 +667,7 @@ } for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it2, mark_modified_darts); if ( !amap->is_marked(*it2, mark) ) @@ -685,7 +685,7 @@ static void run( CMap* amap, const std::deque &modified_darts, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( amap!=NULL ); @@ -701,7 +701,7 @@ 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 CMap::size_type mark = amap->get_new_mark(); // to mark incident cells. typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) @@ -719,7 +719,7 @@ amap->negate_mark(mark); for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it, mark_modified_darts); if ( !amap->is_marked(*it, mark) ) @@ -738,7 +738,7 @@ &modified_darts, const std::deque &modified_darts2, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( j!=0 && j!=1 ); CGAL_assertion( amap!=NULL ); @@ -754,7 +754,7 @@ 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 CMap::size_type mark = amap->get_new_mark(); // to mark incident cells. typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) @@ -784,7 +784,7 @@ amap->negate_mark(mark); for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it, mark_modified_darts); if ( !amap->is_marked(*it, mark) ) @@ -796,7 +796,7 @@ } for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it2, mark_modified_darts); if ( !amap->is_marked(*it2, mark) ) @@ -819,14 +819,14 @@ struct Test_split_attribute_functor_run { static void run( CMap*, const std::deque&, - int =-1) + typename CMap::size_type =CMap::INVALID_MARK) { CGAL_assertion(false); } static void run( CMap* amap, const std::deque &modified_darts, const std::deque &modified_darts2, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL_assertion( amap!=NULL ); CGAL_static_assertion_msg(CMap::Helper::template @@ -841,7 +841,7 @@ 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 CMap::size_type mark = amap->get_new_mark(); // to mark incident cells. typename std::deque::const_iterator it=modified_darts.begin(); for ( ; it!=modified_darts.end(); ++it ) @@ -863,7 +863,7 @@ amap->negate_mark(mark); for ( it=modified_darts.begin(); it!=modified_darts.end(); ++it ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it, mark_modified_darts); if ( !amap->is_marked(*it, mark) ) @@ -871,7 +871,7 @@ } for ( it2=modified_darts2.begin(); it2!=modified_darts2.end(); ++it2 ) { - if ( mark_modified_darts!=-1 ) + if ( mark_modified_darts!=CMap::INVALID_MARK ) amap->unmark(*it2, mark_modified_darts); od=amap->other_extremity(*it2); @@ -889,12 +889,12 @@ struct Test_split_attribute_functor_run { static void run( CMap*, const std::deque&, - int =-1) + typename CMap::size_type =CMap::INVALID_MARK) { CGAL_assertion(false); } static void run( CMap* amap, const std::deque& modified_darts, const std::deque& - modified_darts2, int mark_modified_darts=-1) + modified_darts2, typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL::internal::Test_split_attribute_functor_run:: run(amap, modified_darts, modified_darts2, mark_modified_darts); } }; @@ -903,10 +903,10 @@ struct Test_split_attribute_functor_run { static void run( CMap*, const std::deque&, - int=-1) + typename CMap::size_type=CMap::INVALID_MARK) {} static void run( CMap*, const std::deque&, - const std::deque&, int=-1) + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; // Specialization for i=j. @@ -914,10 +914,10 @@ struct Test_split_attribute_functor_run { static void run( CMap*, const std::deque&, - int=-1) + typename CMap::size_type=CMap::INVALID_MARK) {} static void run( CMap*, const std::deque&, - const std::deque&, int=-1) + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; // Specialization for i=1 and j=0 (edge attributes are not modified @@ -926,10 +926,10 @@ struct Test_split_attribute_functor_run { static void run( CMap*, const std::deque&, - int=-1) + typename CMap::size_type=CMap::INVALID_MARK) {} static void run( CMap*, const std::deque&, - const std::deque&, int=-1) + const std::deque&, typename CMap::size_type=CMap::INVALID_MARK) {} }; // ************************************************************************ @@ -948,7 +948,7 @@ static void run( CMap* amap, const std::deque &modified_darts, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL::internal::Test_split_attribute_functor_run:: run(amap, modified_darts, mark_modified_darts); @@ -959,7 +959,7 @@ &modified_darts, const std::deque &modified_darts2, - int mark_modified_darts=-1) + typename CMap::size_type mark_modified_darts=CMap::INVALID_MARK) { CGAL::internal::Test_split_attribute_functor_run:: run(amap, modified_darts, modified_darts2, mark_modified_darts); diff -Nru cgal-4.7/include/CGAL/internal/Combinatorial_map_internal_functors.h cgal-4.8/include/CGAL/internal/Combinatorial_map_internal_functors.h --- cgal-4.7/include/CGAL/internal/Combinatorial_map_internal_functors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Combinatorial_map_internal_functors.h 2016-04-04 19:00:11.000000000 +0000 @@ -186,17 +186,19 @@ * @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 static void run(const CMap* amap, typename CMap::Dart_const_handle adart, - std::vector* marks, bool *ares) + std::vector* marks, bool *ares) { CGAL_static_assertion_msg(CMap::Helper::template Dimension_index::value>=0, "Test_is_valid_attribute_functor but " " i-attributes are disabled"); - int amark = (*marks)[i]; + size_type amark = (*marks)[i]; if ( amap->is_marked(adart, amark) ) return; // dart already test. bool valid = true; @@ -266,10 +268,12 @@ template struct Correct_invalid_attributes_functor { + typedef typename CMap::size_type size_type; + template static void run(CMap* amap, typename CMap::Dart_handle adart, - std::vector* marks) + std::vector* marks) { // std::cout << "Correct_invalid_attributes_functor for " << i << "-cell" << std::endl; CGAL_static_assertion_msg(CMap::Helper::template @@ -277,7 +281,7 @@ "Correct_invalid_attributes_functor but " " i-attributes are disabled"); - int amark = (*marks)[i]; + size_type amark = (*marks)[i]; typename CMap::template Attribute_handle::type a=amap->template attribute(adart); @@ -327,13 +331,15 @@ template struct Count_cell_functor { + typedef typename CMap::size_type size_type; + template static void run( const CMap* amap, typename CMap::Dart_const_handle adart, - std::vector* amarks, + std::vector* amarks, std::vector* ares ) { - if ( (*amarks)[i]!=-1 && !amap->is_marked(adart, (*amarks)[i]) ) + if ( (*amarks)[i]!=CMap::INVALID_MARK && !amap->is_marked(adart, (*amarks)[i]) ) { ++ (*ares)[i]; CGAL::mark_cell(*amap, adart, (*amarks)[i]); @@ -675,7 +681,7 @@ { static void run(CMap *amap) { - int mark = amap->get_new_mark(); + 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(), @@ -729,7 +735,7 @@ { static void run(CMap *amap) { - int mark = amap->get_new_mark(); + 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(), @@ -766,7 +772,7 @@ { static void run(CMap *amap, typename CMap::Dart_handle adart) { - int mark = amap->get_new_mark(); + 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::iterator current_dart=amap->template darts_of_cell(adart). @@ -825,7 +831,7 @@ { static void run(CMap *amap, typename CMap::Dart_handle adart) { - int mark = amap->get_new_mark(); + 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::iterator current_dart=amap->template darts_of_cell(adart). diff -Nru cgal-4.7/include/CGAL/internal/Combinatorial_map_sewable.h cgal-4.8/include/CGAL/internal/Combinatorial_map_sewable.h --- cgal-4.7/include/CGAL/internal/Combinatorial_map_sewable.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Combinatorial_map_sewable.h 2016-04-04 19:00:11.000000000 +0000 @@ -56,14 +56,14 @@ typename CMap::Dart_const_handle, typename CMap::Hash_function> bijection; - int m1 = amap->get_new_mark(); - int m2 = amap->get_new_mark(); + 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 I1(*amap, adart1, m1); CGAL::CMap_dart_const_iterator_basic_of_involution_inv I2(*amap, adart2, m2); bool res = true; - int mbijection = amap->get_new_mark(); + typename CMap::size_type mbijection = amap->get_new_mark(); while ( res && I1.cont() && I2.cont() ) { diff -Nru cgal-4.7/include/CGAL/internal/Mesh_3/check_weights.h cgal-4.8/include/CGAL/internal/Mesh_3/check_weights.h --- cgal-4.7/include/CGAL/internal/Mesh_3/check_weights.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Mesh_3/check_weights.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include + +namespace CGAL { +namespace internal { +namespace Mesh_3 { + + +template +bool has_non_protecting_weights(const Triangulation& tr, + const MeshDomain&) +{ + bool with_features = + boost::is_same, 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 -Nru cgal-4.7/include/CGAL/internal/Mesh_3/Graph_manipulations.h cgal-4.8/include/CGAL/internal/Mesh_3/Graph_manipulations.h --- cgal-4.7/include/CGAL/internal/Mesh_3/Graph_manipulations.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Mesh_3/Graph_manipulations.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +// Assumes the point is a CGAL point. + +#include + +#include + +namespace CGAL { +namespace internal { +namespace Mesh_3 { + +template +struct Graph_manipulations +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + + std::map p2v; + Graph& g; + + Graph_manipulations(Graph& g) : g(g) {} + + vertex_descriptor get_vertex(const Point_3& p) { + typename std::map::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::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 -Nru cgal-4.7/include/CGAL/internal/Mesh_3/split_in_polylines.h cgal-4.8/include/CGAL/internal/Mesh_3/split_in_polylines.h --- cgal-4.7/include/CGAL/internal/Mesh_3/split_in_polylines.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Mesh_3/split_in_polylines.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include +#include + +namespace CGAL { +namespace internal { +namespace Mesh_3 { + +template +void dump_graph_edges(std::ostream& out, const Graph& g) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::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 +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 +void split_in_polylines(Graph& G, Kernel) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::vertex_iterator vertex_iterator; + typedef typename boost::graph_traits::out_edge_iterator out_edge_iterator; + + vertex_iterator b,e; + boost::tie(b,e) = vertices(G); + std::vector V(b,e); + for(typename std::vector::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 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::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 +void split_in_polylines(Graph& G, Polylines_container& polylines, Kernel k) +{ + typedef typename Polylines_container::value_type Polyline; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::vertex_iterator vertex_iterator; + typedef typename boost::graph_traits::out_edge_iterator out_edge_iterator; + + // dump_graph_edges("edges.polylines.txt", G); + split_in_polylines(G, k); + std::set 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::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 -Nru cgal-4.7/include/CGAL/internal/Polyhedron_plane_clipping_3.h cgal-4.8/include/CGAL/internal/Polyhedron_plane_clipping_3.h --- cgal-4.7/include/CGAL/internal/Polyhedron_plane_clipping_3.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Polyhedron_plane_clipping_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CGAL{ +namespace corefinement{ + +namespace internal{ + template + class Builder_from_T_2 : public CGAL::Modifier_base { + typedef std::map Vertex_map; + + const T& t; + template + static unsigned get_vertex_index( Vertex_map& vertex_map, + typename T::Vertex_handle vh, + Builder& builder, + unsigned& vindex) + { + std::pair + 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 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 +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 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 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 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 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( + *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 P_traits; + typedef CGAL::Delaunay_triangulation_2 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 +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 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 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 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 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( + *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 +Polyhedron* clip_polyhedron(Polyhedron& P, Polyhedron& clipping_polyhedron) +{ + std::pair result; + typedef CGAL::Polyhedron_corefinement Corefinement; + Corefinement coref; + CGAL::Emptyset_iterator emptyset_iterator; + coref(P, clipping_polyhedron, emptyset_iterator, + &result, Corefinement::Intersection_tag); + + return result.first; +} + +template +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(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 +struct Edge_is_marked4coref{ + std::set& marked_halfedges; + typedef bool value_type; + typedef value_type reference; + typedef std::pair key_type; + typedef boost::read_write_property_map_tag category; + + Edge_is_marked4coref(std::set& 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 +struct Edge_is_marked{ + const std::set* marked_halfedges; + typedef bool value_type; + typedef value_type reference; + typedef typename boost::graph_traits::edge_descriptor key_type; + typedef boost::readable_property_map_tag category; + + Edge_is_marked(){} + Edge_is_marked(const std::set& 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 +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(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 marked_halfedges; + internal::Edge_is_marked4coref cr_edge_is_marked(marked_halfedges); + typedef typename Polyhedron::Traits::Kernel K; + typedef CGAL::Node_visitor_refine_polyhedra< + Polyhedron,K,internal::Edge_is_marked4coref > + Split_visitor; + Split_visitor visitor(NULL, true, cr_edge_is_marked); + CGAL::Intersection_of_Polyhedra_3 + 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 edge_is_marked(marked_halfedges); + namespace PMP=Polygon_mesh_processing; + std::map 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 cc_handled(nb_cc, false); + std::vector 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 -Nru cgal-4.7/include/CGAL/internal/Rich_grid.h cgal-4.8/include/CGAL/internal/Rich_grid.h --- cgal-4.7/include/CGAL/internal/Rich_grid.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Rich_grid.h 2016-04-04 19:00:12.000000000 +0000 @@ -206,7 +206,7 @@ for(int z = 0; z < z_side; z++) { unsigned int end_z = start_z; - FT max_z = bbox.zmin() + FT(z+1)*radius; + FT max_z = static_cast(bbox.zmin() + FT(z+1)*radius); while(end_z < rich_points.size() && rich_points[end_z]->pt.z() < max_z) ++end_z; @@ -217,7 +217,7 @@ for(int y = 0; y < y_side; y++) { unsigned int end_y = start_y; - FT max_y = bbox.ymin() + FT(y+1) * radius; + FT max_y = static_cast(bbox.ymin() + FT(y+1) * radius); while(end_y < end_z && rich_points[end_y]->pt.y() < max_y) ++end_y; @@ -229,7 +229,7 @@ { 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; + FT max_x = static_cast(bbox.xmin() + FT(x+1) * radius); while(end_x < end_y && rich_points[end_x]->pt.x() < max_x) ++end_x; @@ -244,7 +244,7 @@ indices[x_side * y_side * z_side] = start_z; } -/// define how to travel in the same gird +/// define how to travel in the same grid template void Rich_grid::travel_itself( void (*self)(iterator starta, iterator enda, diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h cgal-4.8/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h --- cgal-4.7/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Compare_squared_radius_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -65,6 +65,7 @@ // 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) && @@ -216,6 +217,8 @@ 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) && @@ -347,6 +350,7 @@ 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) && diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h cgal-4.8/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h --- cgal-4.7/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Compare_weighted_squared_radius_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include #include @@ -62,6 +63,9 @@ 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) && @@ -199,6 +203,7 @@ 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) && @@ -314,6 +319,7 @@ 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) && diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h cgal-4.8/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h --- cgal-4.7/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Periodic_2_orientation_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -88,6 +89,7 @@ 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; @@ -130,7 +132,7 @@ 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)) @@ -190,7 +192,7 @@ 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) && diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h cgal-4.8/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h --- cgal-4.7/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Periodic_2_side_of_oriented_circle_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include #include @@ -39,7 +40,7 @@ : 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; @@ -66,7 +67,7 @@ // 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) && @@ -149,7 +150,7 @@ 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) && diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Power_test_3.h cgal-4.8/include/CGAL/internal/Static_filters/Power_test_3.h --- cgal-4.7/include/CGAL/internal/Static_filters/Power_test_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Power_test_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include #include @@ -132,6 +133,8 @@ 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) && @@ -276,6 +279,8 @@ 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) && @@ -607,6 +612,7 @@ 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) && diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Static_filter_error.h cgal-4.8/include/CGAL/internal/Static_filters/Static_filter_error.h --- cgal-4.7/include/CGAL/internal/Static_filters/Static_filter_error.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Static_filter_error.h 2016-04-04 19:00:11.000000000 +0000 @@ -37,6 +37,8 @@ #include #include +#include + namespace CGAL { namespace internal { struct Static_filter_error @@ -66,15 +68,8 @@ 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(); - } - + 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); diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/Static_filters.h cgal-4.8/include/CGAL/internal/Static_filters/Static_filters.h --- cgal-4.7/include/CGAL/internal/Static_filters/Static_filters.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/Static_filters.h 2016-04-04 19:00:11.000000000 +0000 @@ -170,6 +170,8 @@ 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 diff -Nru cgal-4.7/include/CGAL/internal/Static_filters/tools.h cgal-4.8/include/CGAL/internal/Static_filters/tools.h --- cgal-4.7/include/CGAL/internal/Static_filters/tools.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Static_filters/tools.h 2016-04-04 19:00:11.000000000 +0000 @@ -39,6 +39,103 @@ 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* ) +{d0 = 0;} + +template < typename ET > +inline void init_double(double& d0, double& d1, Lazy_exact_nt* ) +{d0 = d1 = 0;} + +template < typename ET > +inline void init_double(double& d0, double& d1, double& d2, Lazy_exact_nt* ) +{d0 = d1 = d2 = 0;} + +template < typename ET > +inline void init_double(double& d0, double& d1, double& d2, double& d3, Lazy_exact_nt* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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* ) +{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 : diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h cgal-4.8/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_deformation/Spokes_and_rims_iterator.h 2016-04-04 19:00:12.000000000 +0000 @@ -0,0 +1,81 @@ +// 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. +// +// $URL:$ +// $Id:$ +// +// Author(s) : Ilker O. Yaz + +#ifndef CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H +#define CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H +/// @cond CGAL_DOCUMENT_INTERNAL + +namespace CGAL { +namespace internal { +/** + * Currently this class is not used by surface modeling package, just leave it for possible future need. + * Provide simple functionality for iterating over spoke and rim edges + * - use get_descriptor() to obtain active edge + * - get_iterator() always holds spoke edges */ + /// \code + /// // how to use Spokes_and_rims_iterator + /// boost::tie(e_begin, e_end) = out_edges(vertex, halfedge_graph); + /// Spokes_and_rims_iterator rims_it(e_begin, halfedge_graph); + /// + /// for ( ; rims_it.get_iterator() != e_end; ++rims_it ) + /// { + /// halfedge_descriptor active_hedge = rims_it.get_descriptor(); + /// // use active_edge as you like + /// } + /// \endcode +template +class Spokes_and_rims_iterator +{ +public: + typedef typename boost::graph_traits::out_edge_iterator out_edge_iterator; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + Spokes_and_rims_iterator(out_edge_iterator edge_iterator, HalfedgeGraph& halfedge_graph) + : is_current_rim(false), iterator(edge_iterator), descriptor(halfedge(*edge_iterator)), halfedge_graph(halfedge_graph) + { } + + /// descriptor will be assigned to next valid edge, note that iterator might not change + Spokes_and_rims_iterator& + operator++() + { + // loop through one spoke then one rim edge + if(!is_current_rim && !is_border(descriptor, halfedge_graph)) // it is rim edge's turn + { + is_current_rim = true; + descriptor = next(descriptor, halfedge_graph); + } + else // if current edge is rim OR there is no rim edge (current spoke edge is boudary) + { // then iterate to next spoke edge + is_current_rim = false; + descriptor = halfedge(*(++iterator)); + } + return *this; + } + + out_edge_iterator get_iterator() { return iterator; } + edge_descriptor get_descriptor() { return descriptor; } + +private: + bool is_current_rim; ///< current descriptor is rim or spoke + out_edge_iterator iterator; ///< holds spoke edges (i.e. descriptor is not always = *iterator) + halfedge_descriptor descriptor; ///< current active halfedge descriptor for looping + HalfedgeGraph& halfedge_graph; +}; + +}//namespace internal +/// @endcond +}//namespace CGAL +#endif //CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h cgal-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_segmentation/AABB_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -45,10 +45,8 @@ // activate functions below if K::FT is floating point and fast_bbox_intersection = true template - typename boost::enable_if< - boost::type_traits::ice_and< - boost::is_floating_point::value, - fast_bbox_intersection>, + typename boost::enable_if_c< + boost::is_floating_point::value && fast_bbox_intersection, bool >::type operator()(const CGAL::Segment_3& segment, const Bounding_box& bbox) const { const Point_3& p = segment.source(); @@ -65,10 +63,8 @@ } template - typename boost::enable_if< - boost::type_traits::ice_and< - boost::is_floating_point::value, - fast_bbox_intersection>, + typename boost::enable_if_c< + boost::is_floating_point::value && fast_bbox_intersection, bool >::type operator()(const CGAL::Ray_3& ray, const Bounding_box& bbox) const { const Point_3& p = ray.source(); diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h cgal-4.8/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_segmentation/Alpha_expansion_graph_cut.h 2016-04-04 19:00:12.000000000 +0000 @@ -39,6 +39,8 @@ #endif #include +#include + #include #ifdef CGAL_DO_NOT_USE_BOYKOV_KOLMOGOROV_MAXFLOW_SOFTWARE #include diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Detect_degeneracy.h 2016-04-04 19:00:12.000000000 +0000 @@ -81,9 +81,9 @@ } bool in = true; - BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(hd, hg)) + BOOST_FOREACH(halfedge_descriptor h, halfedges_around_face(hd, hg)) { - vertex_descriptor v = target(hd,hg); + vertex_descriptor v = target(h,hg); if (vertices_in_disk.find(v) == vertices_in_disk.end()) { in = false; diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Utility.h cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Utility.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Utility.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Utility.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +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) : Xiang Gao -// - -#ifndef CGAL_MCFSKEL_UTILITY_H -#define CGAL_MCFSKEL_UTILITY_H - -/// @cond CGAL_DOCUMENT_INTERNAL - -/** - * @file Utility.h - * @brief This file contains some helper functions like splitting an edge at a - * given point. - */ - -#include -#include -#include - -namespace CGAL { -namespace internal { - -template -double get_surface_area(TriangleMesh& hg, TriangleMeshPointPMap& hg_point_pmap, const Traits& traits) -{ - typedef typename Traits::Point_3 Point; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - double total_area = 0; - BOOST_FOREACH(face_descriptor fd, faces(hg)) - { - halfedge_descriptor hd = halfedge(fd, hg); - - vertex_descriptor v1 = target(hd, hg); - hd = next(hd, hg); - vertex_descriptor v2 = target(hd, hg); - hd = next(hd, hg); - vertex_descriptor v3 = target(hd, hg); - Point p1 = get(hg_point_pmap, v1); - Point p2 = get(hg_point_pmap, v2); - Point p3 = get(hg_point_pmap, v3); - total_area += traits.compute_area_3_object()(p1, p2, p3); - } - return total_area; -} - -} //namespace internal -} //namespace CGAL - -/// @endcond - -#endif //CGAL_MCFSKEL_UTILITY_H diff -Nru cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Weights.h cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Weights.h --- cgal-4.7/include/CGAL/internal/Surface_mesh_skeletonization/Weights.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_mesh_skeletonization/Weights.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,378 +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 -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided 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_WEIGHTS_H -#define CGAL_MCS_WEIGHTS_H -/// @cond CGAL_DOCUMENT_INTERNAL - -#include -#include - -namespace CGAL { -namespace internal { - -struct Vector{ - double coords[3]; - template - Vector(const typename Traits::Point_3& b, const typename Traits::Point_3& a, const Traits& traits) { - coords[0] = traits.compute_x_3_object()(a) - traits.compute_x_3_object()(b); - coords[1] = traits.compute_y_3_object()(a) - traits.compute_y_3_object()(b); - coords[2] = traits.compute_z_3_object()(a) - traits.compute_z_3_object()(b); - } - double& operator[](int i) { return coords[i]; } - double operator[](int i) const { return coords[i]; } - double squared_length() const { - return coords[0]*coords[0] + coords[1]*coords[1] + coords[2]*coords[2]; - } - double length() const { - return std::sqrt(coords[0]*coords[0] + coords[1]*coords[1] + coords[2]*coords[2]); - } - bool normalize() { - double len = length(); - if (len < 1e-10) - { - return false; - } - coords[0] /= len; - coords[1] /= len; - coords[2] /= len; - return true; - } - double dot(const Vector& b) { - return coords[0] * b.coords[0] + coords[1] * b.coords[1] + coords[2] * b.coords[2]; - } -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// Returns the cotangent value of half angle v0 v1 v2 -template -class Cotangent_value -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - Vector vec0(v2->point(), v1->point(), traits); - Vector vec1(v0->point(), v2->point(), traits); - Vector vec2(v1->point(), v0->point(), traits); - 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; - double sin_angle = std::sqrt(1-cos_angle*cos_angle); - - return (cos_angle/sin_angle); - } -}; - -// 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 Cotangent_value_Meyer -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - Vector a(v1->point(), v0->point(), traits); - Vector b(v1->point(), v2->point(), traits); - 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(); - return dot_ab / std::sqrt( dot_aa * dot_bb - dot_ab * dot_ab ); - } -}; - -template -class Cotangent_value_Meyer_secure -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - Vector a(v1->point(), v0->point(), traits); - Vector b(v1->point(), v2->point(), traits); - 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 lb = -0.999, ub = 0.999; - double cosine = dot_ab / std::sqrt(dot_aa) / std::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 Cotangent_value_clamped : CotangentValue -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - const double cot_1 = 57.289962; - const double cot_89 = 0.017455; - double value = CotangentValue::operator()(v0, v1, v2, traits); - return (std::max)(cot_89, (std::min)(value, cot_1)); - } -}; - -template > -class Cotangent_value_minimum_zero : CotangentValue -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - double value = CotangentValue::operator()(v0, v1, v2, traits); - return (std::max)(0.0, value); - } -}; - -// Returns the cotangent value of half angle v0 v1 v2 by dividing the triangle area -// as suggested by -[Mullen08] Spectral Conformal Parameterization- -template > -class Cotangent_value_area_weighted : CotangentValue -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - return CotangentValue::operator()(v0, v1, v2, traits) - / traits.compute_area_3_object()(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 Cotangent_weight : CotangentValue -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - // typedef typename TriangleMesh::Traits::Point_3 Point; - - // Returns the cotangent weight of specified halfedge_descriptor - // Edge orientation is trivial - template - double operator()(halfedge_descriptor e, TriangleMesh& hg, const Traits& traits) - { - vertex_descriptor v0 = target(e, hg); - vertex_descriptor v1 = source(e, hg); - // Only one triangle for border edges - if ( is_border(e, hg) || - is_border( opposite(e, hg), hg) ) - { - halfedge_descriptor e_cw = opposite(next(e, hg), hg); - vertex_descriptor v2 = source(e_cw, hg); - if ( is_border(e_cw, hg) || - is_border( opposite(e_cw, hg), hg) ) - { - halfedge_descriptor e_ccw = prev(opposite(e, hg), hg); - v2 = source(e_ccw, hg); - } - return ( CotangentValue::operator()(v0, v2, v1, traits)/2.0 ); - } - else - { - halfedge_descriptor e_cw = opposite(next(e, hg), hg); - vertex_descriptor v2 = source(e_cw, hg); - halfedge_descriptor e_ccw = prev(opposite(e, hg), hg); - vertex_descriptor v3 = source(e_ccw, hg); - - return ( CotangentValue::operator()(v0, v2, v1, traits)/2.0 + CotangentValue::operator()(v0, v3, v1, traits)/2.0 ); - } - } -}; - -// Single cotangent from -[Chao10] Simple Geometric Model for Elastic Deformation -template > -class Single_cotangent_weight : CotangentValue -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - // typedef typename TriangleMesh::Traits::Point_3 Point; - - // Returns the cotangent of the opposite angle of the edge - // 0 for border edges (which does not have an opposite angle) - template - double operator()(halfedge_descriptor e, TriangleMesh& hg, const Traits& traits) - { - if( is_border(e, hg) ) { return 0.0;} - - vertex_descriptor v0 = target(e, hg); - vertex_descriptor v1 = source(e, hg); - - vertex_descriptor v_op = target(next(e, hg), hg); - return CotangentValue::operator()(v0, v_op, v1, traits); - } -}; - -// Mean value calculator described in -[Floater04] Mean Value Coordinates- -template -class Mean_value_weight -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef typename TriangleMesh::Traits::Point_3 Point; - - // Returns the mean-value coordinate of specified halfedge_descriptor - // Returns different value for different edge orientation (which is a normal behaivour according to formula) - template - double operator()(halfedge_descriptor e, TriangleMesh& hg, const Traits& traits) - { - vertex_descriptor v0 = target(e, hg); - vertex_descriptor v1 = source(e, hg); - Vector vec(v1->point(), v0->point(), traits); - double norm = std::sqrt( vec.squared_length() ); - - // Only one triangle for border edges - if ( is_border(e, hg) || - is_border( opposite(e, hg), hg) ) - { - halfedge_descriptor e_cw = opposite(next(e, hg), hg); - vertex_descriptor v2 = source(e_cw, hg); - if ( is_border(e_cw, hg) || - is_border( opposite(e_cw, hg), hg) ) - { - halfedge_descriptor e_ccw = prev(opposite(e, hg), hg); - v2 = source(e_ccw, hg); - } - - return ( half_tan_value_2(v1, v0, v2, traits)/norm); - } - else - { - halfedge_descriptor e_cw = opposite(next(e, hg), hg); - vertex_descriptor v2 = source(e_cw, hg); - halfedge_descriptor e_ccw = prev(opposite(e, hg), hg); - vertex_descriptor v3 = source(e_ccw, hg); - - return ( half_tan_value_2(v1, v0, v2, traits)/norm + half_tan_value_2(v1, v0, v3, traits)/norm); - } - } - -private: - // Returns the tangent value of half angle v0_v1_v2/2 - template - double half_tan_value(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - Vector vec0(v2->point(), v1->point(), traits); - Vector vec1(v0->point(), v2->point(), traits); - Vector vec2(v1->point(), v0->point(), traits); - 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 - template - double half_tan_value_2(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const Traits& traits) - { - Vector a(v1->point(), v0->point(), traits); - Vector b(v1->point(), v2->point(), traits); - 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 TriangleMesh, - class PrimaryWeight = Cotangent_weight, - class SecondaryWeight = Mean_value_weight > -class Hybrid_weight : public PrimaryWeight, SecondaryWeight -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - template - double operator()(halfedge_descriptor e, TriangleMesh& hg, const Traits& traits) - { - double weight = PrimaryWeight::operator()(e, hg); - //if(weight < 0) { std::cout << "Negative weight" << std::endl; } - return (weight >= 0) ? weight : SecondaryWeight::operator()(e, hg, traits); - } -}; - -// Trivial uniform weights (created for test purposes) -template -class Uniform_weight -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - template - double operator()(halfedge_descriptor /*e*/, TriangleMesh& /*hg*/,const Traits&) - { return 1.0; } -}; - - - -}//namespace internal -/// @endcond -}//namespace CGAL -#endif //CGAL_MCS_WEIGHTS_H diff -Nru cgal-4.7/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h cgal-4.8/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h --- cgal-4.7/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_modeling/Spokes_and_rims_iterator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +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. -// -// $URL:$ -// $Id:$ -// -// Author(s) : Ilker O. Yaz - -#ifndef CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H -#define CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H -/// @cond CGAL_DOCUMENT_INTERNAL - -namespace CGAL { -namespace internal { -/** - * Currently this class is not used by surface modeling package, just leave it for possible future need. - * Provide simple functionality for iterating over spoke and rim edges - * - use get_descriptor() to obtain active edge - * - get_iterator() always holds spoke edges */ - /// \code - /// // how to use Spokes_and_rims_iterator - /// boost::tie(e_begin, e_end) = out_edges(vertex, halfedge_graph); - /// Spokes_and_rims_iterator rims_it(e_begin, halfedge_graph); - /// - /// for ( ; rims_it.get_iterator() != e_end; ++rims_it ) - /// { - /// halfedge_descriptor active_hedge = rims_it.get_descriptor(); - /// // use active_edge as you like - /// } - /// \endcode -template -class Spokes_and_rims_iterator -{ -public: - typedef typename boost::graph_traits::out_edge_iterator out_edge_iterator; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - Spokes_and_rims_iterator(out_edge_iterator edge_iterator, HalfedgeGraph& halfedge_graph) - : is_current_rim(false), iterator(edge_iterator), descriptor(halfedge(*edge_iterator)), halfedge_graph(halfedge_graph) - { } - - /// descriptor will be assigned to next valid edge, note that iterator might not change - Spokes_and_rims_iterator& - operator++() - { - // loop through one spoke then one rim edge - if(!is_current_rim && !is_border(descriptor, halfedge_graph)) // it is rim edge's turn - { - is_current_rim = true; - descriptor = next(descriptor, halfedge_graph); - } - else // if current edge is rim OR there is no rim edge (current spoke edge is boudary) - { // then iterate to next spoke edge - is_current_rim = false; - descriptor = halfedge(*(++iterator)); - } - return *this; - } - - out_edge_iterator get_iterator() { return iterator; } - edge_descriptor get_descriptor() { return descriptor; } - -private: - bool is_current_rim; ///< current descriptor is rim or spoke - out_edge_iterator iterator; ///< holds spoke edges (i.e. descriptor is not always = *iterator) - halfedge_descriptor descriptor; ///< current active halfedge descriptor for looping - HalfedgeGraph& halfedge_graph; -}; - -}//namespace internal -/// @endcond -}//namespace CGAL -#endif //CGAL_SURFACE_MODELING_SPOKES_AND_RIMS_ITERATOR_H diff -Nru cgal-4.7/include/CGAL/internal/Surface_modeling/Weights.h cgal-4.8/include/CGAL/internal/Surface_modeling/Weights.h --- cgal-4.7/include/CGAL/internal/Surface_modeling/Weights.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Surface_modeling/Weights.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - - -namespace CGAL { -namespace internal { - -namespace Surface_modeling{ -typedef CGAL::Simple_cartesian::Vector_3 Vector; -} //end of namespace Surface_modeling - -template -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 Cotangent_value_Meyer -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef HalfedgeGraph Halfedge_graph; - - template - 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::max)() : - -(std::numeric_limits::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 - bool collinear(const Point&, const Point&, const Point&) { - return true; - } - template - bool collinear(const CGAL::Point_3& a, const CGAL::Point_3& b, const CGAL::Point_3& 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 Cotangent_value_clamped : CotangentValue -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef HalfedgeGraph Halfedge_graph; - - template - 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 Cotangent_value_minimum_zero : CotangentValue -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - template - 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 Cotangent_weight : CotangentValue -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef HalfedgeGraph Halfedge_graph; - // Returns the cotangent weight of specified halfedge_descriptor - // Edge orientation is trivial - template - 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 Single_cotangent_weight : CotangentValue -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::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 - 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 Mean_value_weight -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::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, - class SecondaryWeight = Mean_value_weight > -class Hybrid_weight : public PrimaryWeight, SecondaryWeight -{ -public: - typedef typename boost::graph_traits::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 Uniform_weight -{ -public: - typedef HalfedgeGraph Halfedge_graph; - typedef typename boost::graph_traits::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 -Nru cgal-4.7/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h cgal-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h --- cgal-4.7/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -30,6 +30,8 @@ #include #endif +/// \cond SKIP_IN_MANUAL + namespace CGAL { namespace Voronoi_covariance_3 { namespace internal { @@ -79,8 +81,8 @@ template inline void operator () (const Point &a, - const Point &c, - const Point &b) + const Point &b, + const Point &c) { internal::covariance_matrix_tetrahedron (a[0], a[1], a[2], b[0], b[1], b[2], @@ -109,8 +111,8 @@ template inline void operator () (const Point &a, - const Point &c, - const Point &b) + const Point &b, + const Point &c) { const double vol = CGAL::volume(a, b, c, Point(CGAL::ORIGIN)); //std::cerr << "vol = " << vol << "\n"; @@ -159,7 +161,10 @@ #else halfspace_intersection_3 #endif - (planes.begin(), planes.end(), P, Point(CGAL::ORIGIN)); + (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(); @@ -168,12 +173,10 @@ typename Polyhedron::Halfedge_around_facet_circulator h0 = it->facet_begin(), hf = h0--, hs = cpp11::next(hf); - while(1) + while(hs != h0) { f (h0->vertex()->point(), hf->vertex()->point(), hs->vertex()->point()); - if (hs == h0) - break; ++hs; ++hf; } } @@ -220,5 +223,7 @@ } // namespace Voronoi_covariance_3 } // namespace CGAL +/// \endcond + #endif // CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_3_HPP diff -Nru cgal-4.7/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h cgal-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h --- cgal-4.7/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/internal/Voronoi_covariance_3/voronoi_covariance_sphere_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,8 @@ #include #include +/// \cond SKIP_IN_MANUAL + namespace CGAL { namespace Voronoi_covariance_3 { template @@ -103,5 +105,7 @@ } // namespace Voronoi_covariance_3 } // namespace CGAL +/// \endcond + #endif // CGAL_INTERNAL_VCM_VORONOI_COVARIANCE_SPHERE_3_HPP diff -Nru cgal-4.7/include/CGAL/intersection_of_Polyhedra_3.h cgal-4.8/include/CGAL/intersection_of_Polyhedra_3.h --- cgal-4.7/include/CGAL/intersection_of_Polyhedra_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/intersection_of_Polyhedra_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -46,6 +46,9 @@ #include #include +#include +#include + #ifdef CGAL_COREFINEMENT_DEBUG #warning look at CGAL/Mesh_3/Robust_intersection_traits.h and the statically filtered decision tree #endif @@ -567,19 +570,20 @@ 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) { - nodes.push_back ( exact_to_double( + add_new_node( compute_triangle_segment_intersection_point(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) { @@ -656,17 +660,20 @@ 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(edge,facet,ek) ); - inodes.push_back( exact_to_interval(enodes.back()) ); - } - 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::get_relative_precision_of_to_double()) || + !has_smaller_relative_precision(p_approx.y(),Lazy_exact_nt::get_relative_precision_of_to_double()) || + !has_smaller_relative_precision(p_approx.z(),Lazy_exact_nt::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(edge,facet,ek) ); + } + //the point is an input void add_new_node(const typename Kernel::Point_3& p){ enodes.push_back(to_exact(p)); @@ -721,6 +728,16 @@ } +#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. @@ -925,6 +942,74 @@ 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& m_reported_facets; + std::vector >& m_intersecting_bboxes; + public: + Map_edge_facet_bbox_intersection_extract_coplanar_filter_self_intersections( + Polyhedron_ref P, + Polyhedron_ref Q, + std::set& reported_facets, + std::vector >& 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 Box; + + // make one box per facet + std::vector 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 box_ptr; + box_ptr.reserve(boxes.size()); + typename std::vector::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 OutputIterator; + OutputIterator out; + internal::Intersect_facets::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) { @@ -958,6 +1043,29 @@ 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 reported_facets; + std::vector > 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 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 @@ -969,6 +1077,7 @@ #endif // not DO_NOT_HANDLE_COPLANAR_FACETS std::ptrdiff_t(2000) ); + #endif } diff -Nru cgal-4.7/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h cgal-4.8/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h --- cgal-4.7/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h 2016-04-04 19:00:12.000000000 +0000 @@ -1242,14 +1242,16 @@ final_map_comes_from_outside=true; final_map_ptr=ptr; } - else{ + else if (!do_not_build_cmap_) { 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; + if(!do_not_build_cmap && !final_map_comes_from_outside) { + delete final_map_ptr; + } } @@ -1855,8 +1857,9 @@ internal_IOP::Non_intersection_halfedge criterium(border_halfedges); - int mark_index=final_map().get_new_mark(); //mark used to tag dart that are on an intersection - + int mark_index = static_cast(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_to_dart_map; diff -Nru cgal-4.7/include/CGAL/Intersections_3/intersection_3_1_impl.h cgal-4.8/include/CGAL/Intersections_3/intersection_3_1_impl.h --- cgal-4.7/include/CGAL/Intersections_3/intersection_3_1_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Intersections_3/intersection_3_1_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -1564,8 +1564,9 @@ if (_max == _min) { return intersection_return(Point_3(_ref_point + _dir * _min )); } + return intersection_return( - Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max)); + Segment_3(_ref_point + _dir*_min, _ref_point + _dir*_max)); } diff -Nru cgal-4.7/include/CGAL/Intersection_traits.h cgal-4.8/include/CGAL/Intersection_traits.h --- cgal-4.7/include/CGAL/Intersection_traits.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Intersection_traits.h 2016-04-04 19:00:11.000000000 +0000 @@ -165,7 +165,7 @@ inline CGAL::Object intersection_return() { return CGAL::Object(); } #else - #if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) +#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template inline typename cpp11::result_of::type intersection_return(const T& t) { return typename cpp11::result_of::type(t); } diff -Nru cgal-4.7/include/CGAL/Interval_arithmetic_impl.h cgal-4.8/include/CGAL/Interval_arithmetic_impl.h --- cgal-4.7/include/CGAL/Interval_arithmetic_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Interval_arithmetic_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/Arrangement_2_writer.h cgal-4.8/include/CGAL/IO/Arrangement_2_writer.h --- cgal-4.7/include/CGAL/IO/Arrangement_2_writer.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Arrangement_2_writer.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 // (based on old version by Michal Meyerovitch and Ester Ezra) // @@ -197,17 +193,17 @@ 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()); + formatter.write_x_monotone_curve(he->curve()); // Write additional user-defined data. formatter.write_halfedge_data(Halfedge_const_handle(he)); @@ -253,7 +249,7 @@ const std::size_t n = _circulator_size(*oc_it); formatter.write_size("halfedges_on_outer_ccb", n); - _write_ccb(formatter, *oc_it); + _write_ccb(formatter, *oc_it); } formatter.write_inner_ccbs_end(); @@ -267,7 +263,7 @@ { const std::size_t n = _circulator_size(*ic_it); formatter.write_size("halfedges_on_inner_ccb", n); - _write_ccb(formatter, *ic_it); + _write_ccb(formatter, *ic_it); } formatter.write_inner_ccbs_end(); @@ -282,7 +278,7 @@ 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)); @@ -291,8 +287,8 @@ } /*! Write the edges along a given CCB. */ - template - void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const + template + void _write_ccb(Formatter& formatter, const DHalfedge* ccb) const { const DHalfedge* curr = ccb; @@ -303,7 +299,7 @@ } while (curr != ccb); formatter.write_ccb_halfedges_end(); } - + /*! Get the mapped index of a given vertex. */ int _index(const DVertex* v) const { @@ -336,9 +332,9 @@ } while (curr != ccb); return (n); - } + } }; } //namespace CGAL -#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H +#endif // CGAL_IO_ARRANGEMENT_2_WRITER_H diff -Nru cgal-4.7/include/CGAL/IO/Arr_iostream.h cgal-4.8/include/CGAL/IO/Arr_iostream.h --- cgal-4.7/include/CGAL/IO/Arr_iostream.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Arr_iostream.h 2016-04-04 19:00:11.000000000 +0000 @@ -12,10 +12,6 @@ // This file is provided 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 // (based on old version by Michal Meyerovitch and Ester Ezra) @@ -44,7 +40,7 @@ template std::ostream& write (const Arrangement_on_surface_2& arr, - std::ostream& os, + std::ostream& os, Formatter& format) { typedef Arrangement_on_surface_2 Arrangement_2; @@ -64,7 +60,7 @@ */ template std::ostream& - operator<< (std::ostream& os, + operator<< (std::ostream& os, const Arrangement_on_surface_2& arr) { typedef Arrangement_on_surface_2 Arrangement_2; @@ -87,7 +83,7 @@ template std::istream& read (Arrangement_on_surface_2& arr, - std::istream& is, + std::istream& is, Formatter& format) { typedef Arrangement_on_surface_2 Arrangement_2; @@ -107,7 +103,7 @@ */ template std::istream& - operator>> (std::istream& is, + operator>> (std::istream& is, Arrangement_on_surface_2& arr) { typedef Arrangement_on_surface_2 Arrangement_2; @@ -116,7 +112,7 @@ Text_formatter text_format (is); Arr_reader reader(arr); - + reader (text_format); return (is); } diff -Nru cgal-4.7/include/CGAL/IO/Color.h cgal-4.8/include/CGAL/IO/Color.h --- cgal-4.7/include/CGAL/IO/Color.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Color.h 2016-04-04 19:00:12.000000000 +0000 @@ -1,9 +1,9 @@ -// Copyright (c) 1997 +// 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. +// and Tel-Aviv University (Israel). All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as @@ -18,7 +18,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Andreas Fabri @@ -32,9 +32,9 @@ class Color { public: Color() {} - Color(unsigned char red, - unsigned char green, - unsigned char blue, + Color(unsigned char red, + unsigned char green, + unsigned char blue, unsigned char alpha = 120) : _red(red), _green(green), _blue(blue), _alpha(alpha) {} @@ -76,15 +76,16 @@ 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 GRAY ; CGAL_EXPORT extern const Color RED ; CGAL_EXPORT extern const Color GREEN ; -CGAL_EXPORT extern const Color DEEPBLUE ; +CGAL_EXPORT extern const Color DEEPBLUE; CGAL_EXPORT extern const Color BLUE ; CGAL_EXPORT extern const Color PURPLE ; CGAL_EXPORT extern const Color VIOLET ; @@ -92,7 +93,12 @@ CGAL_EXPORT extern const Color ORANGE ; CGAL_EXPORT extern const Color YELLOW ; +#endif // CGAL_HEADER_ONLY } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_COLOR_H diff -Nru cgal-4.7/include/CGAL/IO/Color_impl.h cgal-4.8/include/CGAL/IO/Color_impl.h --- cgal-4.7/include/CGAL/IO/Color_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Color_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h cgal-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h --- cgal-4.7/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h 2016-04-04 19:00:13.000000000 +0000 @@ -56,7 +56,6 @@ { 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())); diff -Nru cgal-4.7/include/CGAL/IO/Custom_zoom_layer.h cgal-4.8/include/CGAL/IO/Custom_zoom_layer.h --- cgal-4.7/include/CGAL/IO/Custom_zoom_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Custom_zoom_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -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 -Nru cgal-4.7/include/CGAL/IO/File_avizo.h cgal-4.8/include/CGAL/IO/File_avizo.h --- cgal-4.7/include/CGAL/IO/File_avizo.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_avizo.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include + +namespace CGAL { + +namespace Mesh_3 { + + +template +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 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@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@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 +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 -Nru cgal-4.7/include/CGAL/IO/File_header_extended_OFF.h cgal-4.8/include/CGAL/IO/File_header_extended_OFF.h --- cgal-4.7/include/CGAL/IO/File_header_extended_OFF.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_header_extended_OFF.h 2016-04-04 19:00:12.000000000 +0000 @@ -108,6 +108,9 @@ // 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') ; @@ -124,5 +127,10 @@ } } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_HEADER_EXTENDED_OFF_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_header_extended_OFF_impl.h cgal-4.8/include/CGAL/IO/File_header_extended_OFF_impl.h --- cgal-4.7/include/CGAL/IO/File_header_extended_OFF_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_header_extended_OFF_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + + +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 -Nru cgal-4.7/include/CGAL/IO/File_header_OFF.h cgal-4.8/include/CGAL/IO/File_header_OFF.h --- cgal-4.7/include/CGAL/IO/File_header_OFF.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_header_OFF.h 2016-04-04 19:00:12.000000000 +0000 @@ -116,5 +116,10 @@ CGAL_EXPORT std::istream& operator>>( std::istream& in, File_header_OFF& h); } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_HEADER_OFF_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_header_OFF_impl.h cgal-4.8/include/CGAL/IO/File_header_OFF_impl.h --- cgal-4.7/include/CGAL/IO/File_header_OFF_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_header_OFF_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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( 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(h.size_of_vertices())); + I_Binary_write_big_endian_integer32( out, static_cast(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( 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(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 -Nru cgal-4.7/include/CGAL/IO/File_medit.h cgal-4.8/include/CGAL/IO/File_medit.h --- cgal-4.7/include/CGAL/IO/File_medit.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_medit.h 2016-04-04 19:00:11.000000000 +0000 @@ -778,15 +778,14 @@ //------------------------------------------------------- os << std::setprecision(17); - os << "MeshVersionFormatted 1" << std::endl - << "Dimension 3" << std::endl; + os << "MeshVersionFormatted 1\n" + << "Dimension 3\n"; //------------------------------------------------------- // Vertices //------------------------------------------------------- - os << "Vertices" << std::endl - << tr.number_of_vertices() << std::endl; + os << "Vertices\n" << tr.number_of_vertices() << '\n'; std::map V; int inum = 1; @@ -796,11 +795,11 @@ { V[vit] = inum++; Point_3 p = vit->point(); - os << CGAL::to_double(p.x()) << " " - << CGAL::to_double(p.y()) << " " - << CGAL::to_double(p.z()) << " " + os << CGAL::to_double(p.x()) << ' ' + << CGAL::to_double(p.y()) << ' ' + << CGAL::to_double(p.z()) << ' ' << get(vertex_pmap, vit) - << std::endl; + << '\n'; } //------------------------------------------------------- @@ -811,8 +810,8 @@ if ( print_each_facet_twice ) number_of_triangles += number_of_triangles; - os << "Triangles" << std::endl - << number_of_triangles << std::endl; + os << "Triangles\n" + << number_of_triangles << '\n'; for( Facet_iterator fit = c3t3.facets_in_complex_begin(); fit != c3t3.facets_in_complex_end(); @@ -823,10 +822,10 @@ if (i != fit->second) { const Vertex_handle& vh = (*fit).first->vertex(i); - os << V[vh] << " "; + os << V[vh] << ' '; } } - os << get(facet_pmap, *fit) << std::endl; + os << get(facet_pmap, *fit) << '\n'; // Print triangle again if needed if ( print_each_facet_twice ) @@ -836,33 +835,33 @@ if (i != fit->second) { const Vertex_handle& vh = (*fit).first->vertex(i); - os << V[vh] << " "; + os << V[vh] << ' '; } } - os << get(facet_twice_pmap, *fit) << std::endl; + os << get(facet_twice_pmap, *fit) << '\n'; } } //------------------------------------------------------- // Tetrahedra //------------------------------------------------------- - os << "Tetrahedra" << std::endl - << c3t3.number_of_cells_in_complex() << std::endl; + 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 << V[cit->vertex(i)] << ' '; - os << get(cell_pmap, cit) << std::endl; + os << get(cell_pmap, cit) << '\n'; } //------------------------------------------------------- // End //------------------------------------------------------- - os << "End" << std::endl; + os << "End\n"; } // end output_to_medit(...) diff -Nru cgal-4.7/include/CGAL/IO/File_scanner_OFF.h cgal-4.8/include/CGAL/IO/File_scanner_OFF.h --- cgal-4.7/include/CGAL/IO/File_scanner_OFF.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_scanner_OFF.h 2016-04-04 19:00:12.000000000 +0000 @@ -462,5 +462,9 @@ } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_SCANNER_OFF_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_scanner_OFF_impl.h cgal-4.8/include/CGAL/IO/File_scanner_OFF_impl.h --- cgal-4.7/include/CGAL/IO/File_scanner_OFF_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_scanner_OFF_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/IO/File_writer_inventor.h cgal-4.8/include/CGAL/IO/File_writer_inventor.h --- cgal-4.7/include/CGAL/IO/File_writer_inventor.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_inventor.h 2016-04-04 19:00:12.000000000 +0000 @@ -52,5 +52,10 @@ }; } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_WRITER_INVENTOR_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_writer_inventor_impl.h cgal-4.8/include/CGAL/IO/File_writer_inventor_impl.h --- cgal-4.7/include/CGAL/IO/File_writer_inventor_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_inventor_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include + +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 -Nru cgal-4.7/include/CGAL/IO/File_writer_OFF.h cgal-4.8/include/CGAL/IO/File_writer_OFF.h --- cgal-4.7/include/CGAL/IO/File_writer_OFF.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_OFF.h 2016-04-04 19:00:12.000000000 +0000 @@ -104,5 +104,10 @@ }; } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_WRITER_OFF_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_writer_OFF_impl.h cgal-4.8/include/CGAL/IO/File_writer_OFF_impl.h --- cgal-4.7/include/CGAL/IO/File_writer_OFF_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_OFF_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/IO/File_writer_VRML_2.h cgal-4.8/include/CGAL/IO/File_writer_VRML_2.h --- cgal-4.7/include/CGAL/IO/File_writer_VRML_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_VRML_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -55,5 +55,10 @@ }; } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_WRITER_VRML_2_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_writer_VRML_2_impl.h cgal-4.8/include/CGAL/IO/File_writer_VRML_2_impl.h --- cgal-4.7/include/CGAL/IO/File_writer_VRML_2_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_VRML_2_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/IO/File_writer_wavefront.h cgal-4.8/include/CGAL/IO/File_writer_wavefront.h --- cgal-4.7/include/CGAL/IO/File_writer_wavefront.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_wavefront.h 2016-04-04 19:00:12.000000000 +0000 @@ -56,5 +56,10 @@ }; } //namespace CGAL + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_FILE_WRITER_WAVEFRONT_H // // EOF // diff -Nru cgal-4.7/include/CGAL/IO/File_writer_wavefront_impl.h cgal-4.8/include/CGAL/IO/File_writer_wavefront_impl.h --- cgal-4.7/include/CGAL/IO/File_writer_wavefront_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/File_writer_wavefront_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/IO/Geomview_stream.h cgal-4.8/include/CGAL/IO/Geomview_stream.h --- cgal-4.7/include/CGAL/IO/Geomview_stream.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Geomview_stream.h 2016-04-04 19:00:11.000000000 +0000 @@ -26,6 +26,9 @@ #define CGAL_GEOMVIEW_STREAM_H #include + +#ifdef CGAL_USE_GEOMVIEW + #include #include #include @@ -593,4 +596,10 @@ } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + +#endif // CGAL_USE_GEOMVIEW + #endif // CGAL_GEOMVIEW_STREAM_H diff -Nru cgal-4.7/include/CGAL/IO/Geomview_stream_impl.h cgal-4.8/include/CGAL/IO/Geomview_stream_impl.h --- cgal-4.7/include/CGAL/IO/Geomview_stream_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Geomview_stream_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include + +#include // kill() on SunPro requires these 2 #includes. +#include + +#include + +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(NULL)); // cast to stop gcc warning + } else { + execlp("geomview", "geomview", "-c", "-", + static_cast(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 -Nru cgal-4.7/include/CGAL/IO/io.h cgal-4.8/include/CGAL/IO/io.h --- cgal-4.7/include/CGAL/IO/io.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/io.h 2016-04-04 19:00:12.000000000 +0000 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,17 @@ class IO { public: - CGAL_EXPORT static int mode; +#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}; }; @@ -92,7 +103,6 @@ std::istream& operator()( std::istream& in) const { return (in >> t); } }; - #if CGAL_FORCE_IFORMAT_DOUBLE || \ ( ( _MSC_VER > 1600 ) && (! defined( CGAL_NO_IFORMAT_DOUBLE )) ) template <> @@ -226,7 +236,6 @@ is_binary(std::ios& i); - template < class T > inline void @@ -302,7 +311,7 @@ inline std::ostream& operator<<( std::ostream& out, const Color& col) { - switch(out.iword(IO::mode)) { + switch(get_mode(out)) { case IO::ASCII : return out << static_cast(col.red()) << ' ' << static_cast(col.green()) << ' ' @@ -323,7 +332,7 @@ std::istream &operator>>(std::istream &is, Color& col) { int r = 0, g = 0, b = 0; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> r >> g >> b; break; @@ -352,7 +361,174 @@ 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 . + + if(is.eof()) + return std::istream::traits_type::eof(); + else + return is.peek(); + } + + +template +inline void read_float_or_quotient(std::istream & is, ET& et) +{ + is >> et; +} + + + +template +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 +#endif // CGAL_HEADER_ONLY + #endif // CGAL_IO_H diff -Nru cgal-4.7/include/CGAL/IO/io_impl.h cgal-4.8/include/CGAL/IO/io_impl.h --- cgal-4.7/include/CGAL/IO/io_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/io_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include +#include + +namespace CGAL { + +CGAL_INLINE_FUNCTION +IO::Mode +get_mode(std::ios& i) +{ + return static_cast(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 -Nru cgal-4.7/include/CGAL/IO/Navigation_layer.h cgal-4.8/include/CGAL/IO/Navigation_layer.h --- cgal-4.7/include/CGAL/IO/Navigation_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Navigation_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/alpha_shape.xpm cgal-4.8/include/CGAL/IO/pixmaps/alpha_shape.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/alpha_shape.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/alpha_shape.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/arrow.xpm cgal-4.8/include/CGAL/IO/pixmaps/arrow.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/arrow.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/arrow.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/back.xpm cgal-4.8/include/CGAL/IO/pixmaps/back.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/back.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/back.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/circle.xpm cgal-4.8/include/CGAL/IO/pixmaps/circle.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/circle.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/circle.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/constrained.xpm cgal-4.8/include/CGAL/IO/pixmaps/constrained.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/constrained.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/constrained.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/demoicon.xpm cgal-4.8/include/CGAL/IO/pixmaps/demoicon.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/demoicon.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/demoicon.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus1_mask.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus1_mask.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus1_mask.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus1_mask.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus1.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus1.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus1.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus1.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus2_mask.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus2_mask.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus2_mask.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus2_mask.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus2.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus2.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus2.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus2.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus3_mask.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus3_mask.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus3_mask.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus3_mask.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus3.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus3.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus3.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus3.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/focus.xpm cgal-4.8/include/CGAL/IO/pixmaps/focus.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/focus.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/focus.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/forward.xpm cgal-4.8/include/CGAL/IO/pixmaps/forward.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/forward.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/forward.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/greene_approx.xpm cgal-4.8/include/CGAL/IO/pixmaps/greene_approx.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/greene_approx.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/greene_approx.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/handtool.xpm cgal-4.8/include/CGAL/IO/pixmaps/handtool.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/handtool.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/handtool.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/hand.xpm cgal-4.8/include/CGAL/IO/pixmaps/hand.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/hand.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/hand.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/holddown.xpm cgal-4.8/include/CGAL/IO/pixmaps/holddown.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/holddown.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/holddown.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/iso_rectangle.xpm cgal-4.8/include/CGAL/IO/pixmaps/iso_rectangle.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/iso_rectangle.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/iso_rectangle.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/line.xpm cgal-4.8/include/CGAL/IO/pixmaps/line.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/line.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/line.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/min_parallelogram.xpm cgal-4.8/include/CGAL/IO/pixmaps/min_parallelogram.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/min_parallelogram.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/min_parallelogram.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/min_rectangle.xpm cgal-4.8/include/CGAL/IO/pixmaps/min_rectangle.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/min_rectangle.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/min_rectangle.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/mouse_coord.xpm cgal-4.8/include/CGAL/IO/pixmaps/mouse_coord.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/mouse_coord.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/mouse_coord.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/movepoint.xpm cgal-4.8/include/CGAL/IO/pixmaps/movepoint.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/movepoint.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/movepoint.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/nearest_vertex.xpm cgal-4.8/include/CGAL/IO/pixmaps/nearest_vertex.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/nearest_vertex.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/nearest_vertex.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/notool.xpm cgal-4.8/include/CGAL/IO/pixmaps/notool.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/notool.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/notool.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/optimal_convex.xpm cgal-4.8/include/CGAL/IO/pixmaps/optimal_convex.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/optimal_convex.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/optimal_convex.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/points.xpm cgal-4.8/include/CGAL/IO/pixmaps/points.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/points.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/points.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/point.xpm cgal-4.8/include/CGAL/IO/pixmaps/point.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/point.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/point.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/polygon.xpm cgal-4.8/include/CGAL/IO/pixmaps/polygon.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/polygon.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/polygon.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/rotation.xpm cgal-4.8/include/CGAL/IO/pixmaps/rotation.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/rotation.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/rotation.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/show_polygon.xpm cgal-4.8/include/CGAL/IO/pixmaps/show_polygon.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/show_polygon.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/show_polygon.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/triangulation.xpm cgal-4.8/include/CGAL/IO/pixmaps/triangulation.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/triangulation.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/triangulation.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/voronoi.xpm cgal-4.8/include/CGAL/IO/pixmaps/voronoi.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/voronoi.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/voronoi.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/ymonotone.xpm cgal-4.8/include/CGAL/IO/pixmaps/ymonotone.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/ymonotone.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/ymonotone.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/zoom_in_rect.xpm cgal-4.8/include/CGAL/IO/pixmaps/zoom_in_rect.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/zoom_in_rect.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/zoom_in_rect.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/zoom_in.xpm cgal-4.8/include/CGAL/IO/pixmaps/zoom_in.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/zoom_in.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/zoom_in.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/pixmaps/zoom_out.xpm cgal-4.8/include/CGAL/IO/pixmaps/zoom_out.xpm --- cgal-4.7/include/CGAL/IO/pixmaps/zoom_out.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/pixmaps/zoom_out.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/IO/Qt_help_window.h cgal-4.8/include/CGAL/IO/Qt_help_window.h --- cgal-4.7/include/CGAL/IO/Qt_help_window.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_help_window.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -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 mHistory; -}; - -} //end CGAL namespace - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Alpha_shape_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Alpha_shape_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Alpha_shape_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Alpha_shape_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -namespace CGAL{ - -template< class Dt > -Qt_widget& -operator << ( Qt_widget& ws, const CGAL::Alpha_shape_2

    & As) -{ - //return As.op_window(ws); - typedef typename Alpha_shape_2
    ::Alpha_shape_edges_iterator - Edges_iterator; - typedef typename Alpha_shape_2
    ::Segment Segment_2; - if (As.get_mode() == Alpha_shape_2
    ::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Apollonius_site_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Apollonius_site_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Apollonius_site_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Apollonius_site_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#ifndef CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H -#define CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H - -#include -#include - -namespace CGAL { - -template -Qt_widget& -operator<<(Qt_widget &qt_w, const Apollonius_site_2& 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 - -#endif // CGAL_QT_WIDGET_APOLLONIUS_SITE_2_H diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_circular_arc_2.h cgal-4.8/include/CGAL/IO/Qt_widget_circular_arc_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_circular_arc_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_circular_arc_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -namespace CGAL { - -template < typename CK > -CGAL::Qt_widget & -operator<<(CGAL::Qt_widget & widget, const CGAL::Circular_arc_2 &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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h cgal-4.8/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_circular_arc_endpoint_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL { - -template < typename CK > -CGAL::Qt_widget & -operator<<(CGAL::Qt_widget & widget, const CGAL::Circular_arc_point_2 &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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Conic_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Conic_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Conic_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Conic_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -namespace CGAL{ - -template< class R > -Qt_widget& -operator << ( Qt_widget& ws, const CGAL::Conic_2& 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::Point_2 Point; - std::vector 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::const_iterator CIT; - for(CIT it1 = vcoordinates.begin(); it1!= vcoordinates.end(); ++it1) - ws << *it1; - - return ws; -} - -}//end namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Conic_arc_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Conic_arc_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Conic_arc_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Conic_arc_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Efi Fogel - -#ifndef CGAL_QT_WIDGET_CONIC_ARC_2_H -#define CGAL_QT_WIDGET_CONIC_ARC_2_H - -#include -#include -#include - -namespace CGAL { - -/*! - * Draw an x-monotone conic arc. - */ -template -Qt_widget& operator<< (Qt_widget& ws, - const _Conic_x_monotone_arc_2& 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 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 -Qt_widget& operator<< - (Qt_widget& ws, - const typename Arr_conic_traits_2::Curve_2& cv) -{ - typedef Arr_conic_traits_2 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_arcs; - typename std::list::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Constrained_triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template < class Gt, class Tds, class Itag> -Qt_widget& -operator<<(Qt_widget& w, const Constrained_triangulation_2 &t) -{ - w.lock(); - t.draw_triangulation(w); - w.unlock(); - return w; -} - -}//end namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Delaunay_triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template < class Gt, class Tds > -Qt_widget& -operator<<(Qt_widget& w, const Delaunay_triangulation_2 &dt) -{ - w.lock(); - dt.draw_triangulation(w); - w.unlock(); - return w; -} - -}//end namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_focus.h cgal-4.8/include/CGAL/IO/Qt_widget_focus.h --- cgal-4.7/include/CGAL/IO/Qt_widget_focus.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_focus.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - - -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_circle.h cgal-4.8/include/CGAL/IO/Qt_widget_get_circle.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_circle.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_circle.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - - -namespace CGAL { - -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_iso_rectangle.h cgal-4.8/include/CGAL/IO/Qt_widget_get_iso_rectangle.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_iso_rectangle.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_iso_rectangle.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include - -#ifndef CGAL_QT_LEFT_BUTTON -#define CGAL_QT_LEFT_BUTTON Qt::LeftButton -#endif - - -namespace CGAL { -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_line.h cgal-4.8/include/CGAL/IO/Qt_widget_get_line.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_line.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_line.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - - -namespace CGAL { - -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_point.h cgal-4.8/include/CGAL/IO/Qt_widget_get_point.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_point.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_point.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - -namespace CGAL { - -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_polygon.h cgal-4.8/include/CGAL/IO/Qt_widget_get_polygon.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_polygon.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_polygon.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -namespace CGAL { - -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_segment.h cgal-4.8/include/CGAL/IO/Qt_widget_get_segment.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_segment.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_segment.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -#ifndef CGAL_QT_WIDGET_GET_POINT_BUTTON -#define CGAL_QT_WIDGET_GET_POINT_BUTTON Qt::LeftButton -#endif - - -namespace CGAL { - -template -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_get_simple_polygon.h cgal-4.8/include/CGAL/IO/Qt_widget_get_simple_polygon.h --- cgal-4.7/include/CGAL/IO/Qt_widget_get_simple_polygon.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_get_simple_polygon.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -#include - -namespace CGAL { -template -class Qt_widget_get_simple_polygon : public Qt_widget_get_polygon -{ -public: - typedef Qt_widget_get_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(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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget.h cgal-4.8/include/CGAL/IO/Qt_widget.h --- cgal-4.7/include/CGAL/IO/Qt_widget.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -//temporary, should remove next line!! -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -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 - void x_real(int, FT&) const; - template - 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_layers; - std::list 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 -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 -Qt_widget& operator<<(Qt_widget& w, Qt_widgetManip 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 function(param p) \ -{ return Qt_widgetManip( __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 -Qt_widget& operator<<(Qt_widget& w, const Point_2& 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 -Qt_widget& operator<<(Qt_widget& w, const Segment_2& s) -{ - typedef Simple_cartesian 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 sr; - sr = Segment_2(Point_2(scs_x, scs_y), Point_2(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 r = Iso_rectangle_2(Point_2(xr1, yr1), - Point_2(xr2, yr2)); - CGAL::Object obj = CGAL::intersection(r, sr); - if (const Point_2 *p = object_cast >(&obj)){ - return w << *p; - } - else if (const Segment_2 *s = object_cast >(&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 -Qt_widget& operator<<(Qt_widget& w, const Line_2& l) -{ - typedef Simple_cartesian Rep; - typedef Point_2 Point; - - const Point_2 - 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 -Qt_widget& operator<<(Qt_widget& w, const Ray_2& r) -{ - typedef Simple_cartesian Rep; - typedef Point_2 Point; - - const Point_2 - 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() -Qt_widget& -operator<<(Qt_widget& w, const Triangle_2& t) -{ - CGAL::Iso_rectangle_2 r( Point_2(w.x_real(0), w.y_real(0)), - Point_2(w.x_real(w.geometry().width()), - w.y_real(w.geometry().height()))); - CGAL::Object obj = CGAL::intersection(t, r); - Point_2 pi; - Segment_2 si; - Triangle_2 ti; - typedef Point_2 Point; - std::vector 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::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& 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) -{ - 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 -void Qt_widget::x_real(int x, FT& return_t) const -{ - if(xscal<1) - return_t = static_cast(xmin+(int)(x/xscal)); - else{ - return_t = static_cast(xmin+x/xscal); - } -} - -template -void Qt_widget::y_real(int y, FT& return_t) const -{ - if(yscal<1) - return_t = static_cast(ymax-(int)(y/yscal)); - else{ - return_t = static_cast(ymax-y/yscal); - } -} - -} // namespace CGAL - -#endif // CGAL_QT_WIDGET_H diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_handtool.h cgal-4.8/include/CGAL/IO/Qt_widget_handtool.h --- cgal-4.7/include/CGAL/IO/Qt_widget_handtool.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_handtool.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include - -#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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_history.h cgal-4.8/include/CGAL/IO/Qt_widget_history.h --- cgal-4.7/include/CGAL/IO/Qt_widget_history.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_history.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - -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_list; - std::list::iterator it; - Qt_widget* widget; - }; - -} // namespace CGAL end - -#endif // CGAL_QT_WIDGET_HISTORY_H diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Hyperbola_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Hyperbola_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Hyperbola_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Hyperbola_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_HYPERBOLA_2_H -#define CGAL_QT_WIDGET_HYPERBOLA_2_H - -#include -#include -#include - -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 &H) -{ - H.draw_qt(s); - return s; -} - -} //namespace CGAL - -#endif // CGAL_QT_WIDGET_HYPERBOLA_2_H diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_layer.h cgal-4.8/include/CGAL/IO/Qt_widget_layer.h --- cgal-4.7/include/CGAL/IO/Qt_widget_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include - - -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Linear_object_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Linear_object_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Linear_object_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Linear_object_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Efi Fogel - -#ifndef CGAL_QT_WIDGET_LINEAR_OBJECT_2_H -#define CGAL_QT_WIDGET_LINEAR_OBJECT_2_H - -#include -#include - -namespace CGAL { - -/*! - * Export a polyline to a window stream - */ -template -Qt_widget & operator<<(Qt_widget & ws, const Arr_linear_object_2 & 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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Min_ellipse_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Min_ellipse_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Min_ellipse_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Min_ellipse_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template< class Traits_ > -Qt_widget& -operator<<(Qt_widget &ws, - const CGAL::Min_ellipse_2& min_ellipse) -{ - typedef CGAL::Min_ellipse_2::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Nef_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Nef_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Nef_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Nef_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include - -namespace CGAL{ - -template -CGAL::Quotient -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 q(num,den); - q.normalize(); - return q; -} - - -template -CGAL::Qt_widget& operator<<(CGAL::Qt_widget& ws, const Nef_polyhedron_2& P) -{ - typedef Nef_polyhedron_2 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 wsxq = d_to_q(ws.x_min()-1); - CGAL::Quotient wsyq = d_to_q(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(ws.x_min()-1); - wsyq = d_to_q(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(ws.x_max()+1); - wsyq = d_to_q(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(ws.x_max()+1); - wsyq = d_to_q(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 N1(rect1, rect1+4); - Nef_polyhedron_2 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 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::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, ©_of_pixmap, - 0, 0, ws.width(), ws.height(), Qt::XorROP, true); - return ws; -} - -}//end namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Nef_3.h cgal-4.8/include/CGAL/IO/Qt_widget_Nef_3.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Nef_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Nef_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_NEF_3_H -#define CGAL_QT_WIDGET_NEF_3_H - -#include -#include - -namespace CGAL { - -template -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::convert_to_OGLPolyhedron(N, - static_cast(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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Nef_S2.h cgal-4.8/include/CGAL/IO/Qt_widget_Nef_S2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Nef_S2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Nef_S2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_NEF_S2_H -#define CGAL_QT_WIDGET_NEF_S2_H - -#include -#include - -namespace CGAL { - -template -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::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_OpenGL.h cgal-4.8/include/CGAL/IO/Qt_widget_OpenGL.h --- cgal-4.7/include/CGAL/IO/Qt_widget_OpenGL.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_OpenGL.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_QT_WIDGET_OPENGL_H -#define CGAL_QT_WIDGET_OPENGL_H - -// #include -// #include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -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::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Optimisation_circle_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -namespace CGAL{ -template -Qt_widget& -operator << (Qt_widget &ws, - const CGAL::Optimisation_circle_2& 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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Optimisation_ellipse_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template< class Traits_ > -Qt_widget& -operator << ( Qt_widget &ws, - const CGAL::Optimisation_ellipse_2& oe) -{ - - typedef Cartesian Rep; - typedef Point_2 Point; - typedef Segment_2 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 > - 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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Polygon_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Polygon_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Polygon_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Polygon_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template -Qt_widget& operator<<(Qt_widget& w, const Polygon_2& pol) -{ - typedef typename Polygon_2::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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Polyline_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Polyline_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Polyline_2.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Polyline_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Efi Fogel - -#ifndef CGAL_QT_WIDGET_POLYLINE_2_H -#define CGAL_QT_WIDGET_POLYLINE_2_H - -#include -#include - -namespace CGAL { - -/*! - * Export a polyline to a window stream - */ -template -Qt_widget & operator<<(Qt_widget & ws, const _Polyline_2 & cv) -{ - for (unsigned int i = 0; i < cv.size(); ++i) ws << cv[i]; - return ws; -} - -} //namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Regular_triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -namespace CGAL{ - -template < class Gt, class Tds > -Qt_widget& -operator<<(Qt_widget& w, Regular_triangulation_2 &t) -{ - w.lock(); - t.draw_triangulation(w); - w.unlock(); - return w; -} - -}//end namespace CGAL - -#endif diff -Nru cgal-4.7/include/CGAL/IO/Qt_widget_rotation_layer.h cgal-4.8/include/CGAL/IO/Qt_widget_rotation_layer.h --- cgal-4.7/include/CGAL/IO/Qt_widget_rotation_layer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_rotation_layer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include -#include -#include -#include - -typedef CGAL::Simple_cartesian SCD; -typedef CGAL::Point_2 Point; -typedef CGAL::Vector_2 Vector; -typedef CGAL::Direction_2 Direction; -typedef CGAL::Aff_transformation_2 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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h cgal-4.8/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h --- cgal-4.7/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_show_mouse_coordinates.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include -#include - -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_standard_toolbar.h cgal-4.8/include/CGAL/IO/Qt_widget_standard_toolbar.h --- cgal-4.7/include/CGAL/IO/Qt_widget_standard_toolbar.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_standard_toolbar.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include -#include -#include - -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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_Triangulation_2.h cgal-4.8/include/CGAL/IO/Qt_widget_Triangulation_2.h --- cgal-4.7/include/CGAL/IO/Qt_widget_Triangulation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_Triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include - - -namespace CGAL { - -template -class Draw_triangulation { -private: - const Triangulation_2& t; - Qt_widget& w; -public: - Draw_triangulation(const Triangulation_2& _t, Qt_widget& _w) - : t(_t), w(_w) - {} - void operator()(typename Triangulation_2::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 &t) -{ - if (t.dimension()<2) { - t.draw_triangulation(w); - return w; - } - typedef typename Triangulation_2::Point OpPoint; - w.lock(); - Draw_triangulation 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 -Nru cgal-4.7/include/CGAL/IO/Qt_widget_zoomrect.h cgal-4.8/include/CGAL/IO/Qt_widget_zoomrect.h --- cgal-4.7/include/CGAL/IO/Qt_widget_zoomrect.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/Qt_widget_zoomrect.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include -#include -#include - - -#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 -Nru cgal-4.7/include/CGAL/IO/read_off_points.h cgal-4.8/include/CGAL/IO/read_off_points.h --- cgal-4.7/include/CGAL/IO/read_off_points.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/read_off_points.h 2016-04-04 19:00:12.000000000 +0000 @@ -95,6 +95,11 @@ { iss.clear(); iss.str(line); + + // Ignore empty lines and comments + if (line.empty () || line[0] == '#') + continue; + lineNumber++; // Reads file signature on first line diff -Nru cgal-4.7/include/CGAL/IO/read_ply_points.h cgal-4.8/include/CGAL/IO/read_ply_points.h --- cgal-4.7/include/CGAL/IO/read_ply_points.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/read_ply_points.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include + +#include +#include + +#include +#include +#include + + +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(s); + } + void read_ascii (std::istream& stream, boost::uint8_t& c) const + { + unsigned short s; + stream >> s; + c = static_cast(s); + } + + // Default template when Type is not a char type + template + void read_ascii (std::istream& stream, Type& t) const + { + stream >> t; + } + + template + 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 (this->read (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 (this->read (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 (this->read (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 (this->read (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 (this->read (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 (this->read (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 (this->read (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 (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::%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`. +/// It can be omitted if the value type of `OutputIterator` is convertible to `Point_3`. +/// @tparam NormalPMap is a model of `WritablePropertyMap` with value type `Vector_3`. +/// @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::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 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 + ::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::value_type Point; + typedef typename Kernel_traits::Kernel Kernel; + return read_ply_points_and_normals + (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 + ::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 + (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 + ::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::%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`. +/// It can be omitted if the value type of `OutputIterator` is convertible to `Point_3`. +/// @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 + (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 + ::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::value_type Point; + typedef typename Kernel_traits::Kernel Kernel; + return read_ply_points + (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 + ::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 + (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 + ::type>(stream, + output); +} +//----------------------------------------------------------------------------------- + +/// @endcond + + +} //namespace CGAL + +#endif // CGAL_READ_PLY_POINTS_H diff -Nru cgal-4.7/include/CGAL/IO/write_ply_points.h cgal-4.8/include/CGAL/IO/write_ply_points.h --- cgal-4.7/include/CGAL/IO/write_ply_points.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/IO/write_ply_points.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +#include + +#include +#include + +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`. +/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3`. +/// @tparam NormalPMap is a model of `ReadablePropertyMap` with a value type `Vector_3`. +/// @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::value_type Point; + typedef typename Kernel_traits::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 +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::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`. +/// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3`. +/// @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::value_type Point; + typedef typename Kernel_traits::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::value_type()) +#endif + ); +} +/// @endcond + + +} //namespace CGAL + +#endif // CGAL_WRITE_PLY_POINTS_H diff -Nru cgal-4.7/include/CGAL/Iso_cuboid_3.h cgal-4.8/include/CGAL/Iso_cuboid_3.h --- cgal-4.7/include/CGAL/Iso_cuboid_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Iso_cuboid_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -239,7 +239,7 @@ std::ostream & operator<<(std::ostream& os, const Iso_cuboid_3& r) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << (r.min)() << ' ' << (r.max)(); case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Iso_rectangle_2.h cgal-4.8/include/CGAL/Iso_rectangle_2.h --- cgal-4.7/include/CGAL/Iso_rectangle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Iso_rectangle_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -230,7 +230,7 @@ std::ostream & operator<<(std::ostream &os, const Iso_rectangle_2 &r) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << (r.min)() << ' ' << (r.max)(); case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/iterator.h cgal-4.8/include/CGAL/iterator.h --- cgal-4.7/include/CGAL/iterator.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/iterator.h 2016-04-04 19:00:12.000000000 +0000 @@ -1271,7 +1271,7 @@ // OutputIterator which accepts several types in *o++= and dispatches, -// wraps several other outputiterators, and dispatches accordingly. +// wraps several other output iterators, and dispatches accordingly. template < typename V, typename O > class Dispatch_output_iterator; diff -Nru cgal-4.7/include/CGAL/Iterator_range.h cgal-4.8/include/CGAL/Iterator_range.h --- cgal-4.7/include/CGAL/Iterator_range.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Iterator_range.h 2016-04-04 19:00:12.000000000 +0000 @@ -70,6 +70,13 @@ { return std::distance(begin(), end()); } + + /// returns `std::distance(begin(), end())==0` + bool empty() const + { + return std::distance(begin(), end())==0; + } + }; template @@ -79,6 +86,13 @@ return Iterator_range(b,e); } + template + Iterator_range + make_range(const std::pair& p) + { + return Iterator_range(p.first,p.second); + } + } // namespace CGAL diff -Nru cgal-4.7/include/CGAL/jet_estimate_normals.h cgal-4.8/include/CGAL/jet_estimate_normals.h --- cgal-4.7/include/CGAL/jet_estimate_normals.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/jet_estimate_normals.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,6 +31,12 @@ #include #include +#ifdef CGAL_LINKED_WITH_TBB +#include +#include +#include +#endif // CGAL_LINKED_WITH_TBB + namespace CGAL { @@ -101,6 +107,34 @@ return monge_form.normal_direction(); } +#ifdef CGAL_LINKED_WITH_TBB + template + 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& input; + std::vector& output; + + public: + Jet_estimate_normals(Tree& tree, unsigned int k, std::vector& points, + unsigned int degree_fitting, std::vector& output) + : tree(tree), k (k), degree_fitting (degree_fitting), input (points), output (output) + { } + + void operator()(const tbb::blocked_range& r) const + { + for( std::size_t i = r.begin(); i != r.end(); ++i) + output[i] = CGAL::internal::jet_estimate_normal(input[i], tree, k, degree_fitting); + } + + }; +#endif // CGAL_LINKED_WITH_TBB + + + } /* namespace internal */ /// \endcond @@ -117,7 +151,9 @@ /// /// \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`. /// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3`. @@ -128,7 +164,8 @@ /// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`. // This variant requires all parameters. -template ( +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else + if (boost::is_convertible::value) + { + std::vector normals (kd_tree_points.size ()); + CGAL::internal::Jet_estimate_normals + f (tree, k, kd_tree_points, degree_fitting, normals); + tbb::parallel_for(tbb::blocked_range(0, kd_tree_points.size ()), f); + unsigned int i = 0; + for(it = first; it != beyond; ++ it, ++ i) + { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - get(point_pmap,it), + put (normal_pmap, it, normals[i]); #else - get(point_pmap,*it), + put (normal_pmap, *it, normals[i]); +#endif + } + } + else +#endif + { + for(it = first; it != beyond; it++) + { + Vector normal = internal::jet_estimate_normal( +#ifdef CGAL_USE_PROPERTY_MAPS_API_V1 + get(point_pmap,it), +#else + get(point_pmap,*it), #endif - tree, k, degree_fitting); + tree, k, degree_fitting); #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - put(normal_pmap, it, normal); // normal_pmap[it] = normal + put(normal_pmap, it, normal); // normal_pmap[it] = normal #else - put(normal_pmap, *it, normal); // normal_pmap[it] = normal + 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"); @@ -213,7 +275,8 @@ #if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED) /// @cond SKIP_IN_MANUAL -template ( + jet_estimate_normals( 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 @@ -254,7 +318,7 @@ { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - jet_estimate_normals( + jet_estimate_normals( first,beyond, point_pmap, normal_pmap, @@ -266,7 +330,8 @@ /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map. -template void @@ -277,7 +342,7 @@ unsigned int k, ///< number of neighbors. unsigned int degree_fitting = 2) { - jet_estimate_normals( + jet_estimate_normals( first,beyond, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 make_dereference_property_map(first), diff -Nru cgal-4.7/include/CGAL/jet_smooth_point_set.h cgal-4.8/include/CGAL/jet_smooth_point_set.h --- cgal-4.7/include/CGAL/jet_smooth_point_set.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/jet_smooth_point_set.h 2016-04-04 19:00:12.000000000 +0000 @@ -30,6 +30,12 @@ #include #include +#ifdef CGAL_LINKED_WITH_TBB +#include +#include +#include +#endif // CGAL_LINKED_WITH_TBB + namespace CGAL { @@ -40,7 +46,6 @@ namespace internal { - /// Smoothes one point position using jet fitting on the k /// nearest neighbors and reprojection onto the jet. /// @@ -102,6 +107,36 @@ return monge_form.origin(); } +#ifdef CGAL_LINKED_WITH_TBB + template + 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& input; + std::vector& output; + + public: + Jet_smooth_pwns (Tree& tree, unsigned int k, std::vector& points, + unsigned int degree_fitting, unsigned int degree_monge, std::vector& output) + : tree(tree), k (k), degree_fitting (degree_fitting), + degree_monge (degree_monge), input (points), output (output) + { } + + void operator()(const tbb::blocked_range& r) const + { + for( std::size_t i = r.begin(); i != r.end(); ++i) + output[i] = CGAL::internal::jet_smooth_point(input[i], tree, k, + degree_fitting, + degree_monge); + } + + }; +#endif // CGAL_LINKED_WITH_TBB + + } /* namespace internal */ /// \endcond @@ -120,6 +155,9 @@ /// /// \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`. /// It can be omitted if the value type of `InputIterator` is convertible to `Point_3`. @@ -129,7 +167,8 @@ /// can be ommited under conditions described in the documentation of `Monge_via_jet_fitting`. // This variant requires all parameters. -template = 2); InputIterator it; - + // Instanciate a KD-tree search. // Note: We have to convert each input iterator to Point_3. std::vector kd_tree_points; @@ -175,29 +214,56 @@ 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++) - { + +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else + if (boost::is_convertible::value) + { + std::vector mutated_points (kd_tree_points.size ()); + CGAL::internal::Jet_smooth_pwns + f (tree, k, kd_tree_points, degree_fitting, degree_monge, + mutated_points); + tbb::parallel_for(tbb::blocked_range(0, kd_tree_points.size ()), f); + unsigned int i = 0; + for(it = first; it != beyond; ++ it, ++ i) + { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - const Point& p = get(point_pmap, it); - put(point_pmap, it , - internal::jet_smooth_point( - p,tree,k,degree_fitting,degree_monge) ); + put(point_pmap, it , mutated_points[i]); #else - const Point& p = get(point_pmap, *it); - put(point_pmap, *it , - internal::jet_smooth_point( - p,tree,k,degree_fitting,degree_monge) ); + 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( + p,tree,k,degree_fitting,degree_monge) ); +#else + const Point& p = get(point_pmap, *it); + put(point_pmap, *it , + internal::jet_smooth_point( + p,tree,k,degree_fitting,degree_monge) ); +#endif + } + } } #if defined(CGAL_EIGEN3_ENABLED) || defined(CGAL_LAPACK_ENABLED) /// @cond SKIP_IN_MANUAL -template @@ -216,13 +282,14 @@ #else typedef Lapack_svd SvdTraits; #endif - jet_smooth_point_set( + jet_smooth_point_set( 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 void @@ -236,7 +303,7 @@ { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - jet_smooth_point_set( + jet_smooth_point_set( first,beyond, point_pmap, k, @@ -247,7 +314,8 @@ /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map. -template void jet_smooth_point_set( @@ -257,7 +325,7 @@ const unsigned int degree_fitting = 2, const unsigned int degree_monge = 2) { - jet_smooth_point_set( + jet_smooth_point_set( first,beyond, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 make_dereference_property_map(first), diff -Nru cgal-4.7/include/CGAL/Kd_tree.h cgal-4.8/include/CGAL/Kd_tree.h --- cgal-4.7/include/CGAL/Kd_tree.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Kd_tree.h 2016-04-04 19:00:12.000000000 +0000 @@ -32,9 +32,10 @@ #include #include +#include #ifdef CGAL_HAS_THREADS -#include +#include #endif namespace CGAL { @@ -99,7 +100,7 @@ #ifdef CGAL_HAS_THREADS - mutable boost::mutex building_mutex;//mutex used to protect const calls inducing build() + mutable CGAL_MUTEX building_mutex;//mutex used to protect const calls inducing build() #endif bool built_; @@ -283,7 +284,7 @@ void const_build() const { #ifdef CGAL_HAS_THREADS //this ensure that build() will be called once - boost::mutex::scoped_lock scoped_lock(building_mutex); + CGAL_SCOPED_LOCK(building_mutex); if(!is_built()) #endif const_cast(this)->build(); //THIS IS NOT THREADSAFE @@ -355,6 +356,23 @@ return it; } + + template + boost::optional + search_any_point(const FuzzyQueryItem& q) const + { + if(! pts.empty()){ + + if(! is_built()){ + const_build(); + } + Kd_tree_rectangle b(*bbox); + return tree_root->search_any_point(q,b); + } + return boost::none; + } + + ~Kd_tree() { if(is_built()){ delete bbox; diff -Nru cgal-4.7/include/CGAL/Kd_tree_node.h cgal-4.8/include/CGAL/Kd_tree_node.h --- cgal-4.7/include/CGAL/Kd_tree_node.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Kd_tree_node.h 2016-04-04 19:00:12.000000000 +0000 @@ -126,6 +126,29 @@ return it; } + + boost::optional + any_tree_item() const { + boost::optional result = boost::none; + if (is_leaf()) { + Leaf_node_const_handle node = + static_cast(this); + if (node->size()>0){ + return boost::make_optional(*(node->begin())); + } + } + else { + Internal_node_const_handle node = + static_cast(this); + result = node->lower()->any_tree_item(); + if(! result){ + result = node->upper()->any_tree_item(); + } + } + return result; + } + + void indent(int d) const { @@ -196,8 +219,53 @@ }; return it; } + + + template + boost::optional + search_any_point(const FuzzyQueryItem& q, + Kd_tree_rectangle& b) const + { + boost::optional result = boost::none; + if (is_leaf()) { + Leaf_node_const_handle node = + static_cast(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(this); + // after splitting b denotes the lower part of b + Kd_tree_rectangle 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 >{ diff -Nru cgal-4.7/include/CGAL/Kernel_checker.h cgal-4.8/include/CGAL/Kernel_checker.h --- cgal-4.7/include/CGAL/Kernel_checker.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_checker.h 2016-04-04 19:00:11.000000000 +0000 @@ -34,6 +34,7 @@ // So the template parameter will be a comparator, not a converter. #include +#include #include #include @@ -52,28 +53,28 @@ struct Pairify { typedef bool result_type; result_type operator()(const bool &t1, const bool &t2) const - { CGAL_kernel_assertion(t1 == t2); return t1; } + { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; } }; template <> struct Pairify { typedef Sign result_type; result_type operator()(const Sign &t1, const Sign &t2) const - { CGAL_kernel_assertion(t1 == t2); return t1; } + { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; } }; template <> struct Pairify { typedef Bounded_side result_type; result_type operator()(const Bounded_side &t1, const Bounded_side &t2) const - { CGAL_kernel_assertion(t1 == t2); return t1; } + { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; } }; template <> struct Pairify { typedef Angle result_type; result_type operator()(const Angle &t1, const Angle &t2) const - { CGAL_kernel_assertion(t1 == t2); return t1; } + { CGAL_kernel_assertion(t1 == t2); CGAL_USE(t2); return t1; } }; diff -Nru cgal-4.7/include/CGAL/Kernel_d/function_objectsCd.h cgal-4.8/include/CGAL/Kernel_d/function_objectsCd.h --- cgal-4.7/include/CGAL/Kernel_d/function_objectsCd.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/function_objectsCd.h 2016-04-04 19:00:11.000000000 +0000 @@ -27,6 +27,7 @@ #include #include +#include #include #undef CGAL_KD_TRACE @@ -142,6 +143,7 @@ template result_type operator()(Forward_iterator start, Forward_iterator end) const { + CGAL_USE(end); CGAL_assertion(start!=end); int d = start->dimension(); Matrix M(d); diff -Nru cgal-4.7/include/CGAL/Kernel_d/function_objectsHd.h cgal-4.8/include/CGAL/Kernel_d/function_objectsHd.h --- cgal-4.7/include/CGAL/Kernel_d/function_objectsHd.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/function_objectsHd.h 2016-04-04 19:00:11.000000000 +0000 @@ -128,6 +128,7 @@ template 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); diff -Nru cgal-4.7/include/CGAL/Kernel_d/Matrix__.h cgal-4.8/include/CGAL/Kernel_d/Matrix__.h --- cgal-4.7/include/CGAL/Kernel_d/Matrix__.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/Matrix__.h 2016-04-04 19:00:11.000000000 +0000 @@ -749,7 +749,7 @@ int d = M.row_dimension(); int k = M.column_dimension(); - switch (os.iword(CGAL::IO::mode)) { + switch (get_mode(os)) { case CGAL::IO::BINARY: CGAL::write( os, d); CGAL::write( os, k); @@ -793,7 +793,7 @@ x_d2,0 ... x_d2,d1-1 */ int cdim, rdim, i; - switch(is.iword(CGAL::IO::mode)) { + switch(get_mode(is)) { case CGAL::IO::BINARY : CGAL::read(is,rdim); CGAL::read(is,cdim); diff -Nru cgal-4.7/include/CGAL/Kernel_d/Pair_d.h cgal-4.8/include/CGAL/Kernel_d/Pair_d.h --- cgal-4.7/include/CGAL/Kernel_d/Pair_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/Pair_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -69,7 +69,7 @@ void read(std::istream& is) { - switch( is.iword(CGAL::IO::mode) ) { + switch( get_mode(is) ) { case CGAL::IO::ASCII : is >> _p[0] >> _p[1]; break; case CGAL::IO::BINARY : @@ -81,7 +81,7 @@ void print(std::ostream& os, const char* _name) const { - switch( os.iword(CGAL::IO::mode) ) { + switch( get_mode(os) ) { case CGAL::IO::ASCII : os << _p[0] << " " << _p[1]; break; case CGAL::IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Kernel_d/Sphere_d.h cgal-4.8/include/CGAL/Kernel_d/Sphere_d.h --- cgal-4.7/include/CGAL/Kernel_d/Sphere_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/Sphere_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include namespace CGAL { @@ -56,6 +57,7 @@ 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()); } diff -Nru cgal-4.7/include/CGAL/Kernel_d/Tuple_d.h cgal-4.8/include/CGAL/Kernel_d/Tuple_d.h --- cgal-4.7/include/CGAL/Kernel_d/Tuple_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/Tuple_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -220,15 +220,17 @@ template void Tuple_d::print(std::ostream& os, const char* l) const { int i; - switch( os.iword(CGAL::IO::mode) ) { + switch( get_mode(os) ) { case CGAL::IO::ASCII : os << size() << " "; for (i = 0; i < size(); ++i) - os << v[i] << " "; break; + os << v[i] << " "; + break; case CGAL::IO::BINARY : CGAL::write(os, size()); for (i = 0; i < size(); ++i) - CGAL::write(os, v[i]); break; + CGAL::write(os, v[i]); + break; default : os << l << "(" << size() << ", "; for (i = 0; i < size(); ++i) { @@ -241,7 +243,7 @@ template void Tuple_d::read(std::istream& is) { int i = 0, d; - switch( is.iword(CGAL::IO::mode) ) { + switch( get_mode(is) ) { case CGAL::IO::ASCII : is >> d; v = Vector(d); while (i < d && is >> v[i] ) ++i; diff -Nru cgal-4.7/include/CGAL/Kernel_d/Vector__.h cgal-4.8/include/CGAL/Kernel_d/Vector__.h --- cgal-4.7/include/CGAL/Kernel_d/Vector__.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kernel_d/Vector__.h 2016-04-04 19:00:11.000000000 +0000 @@ -405,7 +405,7 @@ /*{\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)) { + switch (get_mode(os)) { case CGAL::IO::BINARY: CGAL::write( os, d); for ( int i = 0; i < d; ++i) @@ -434,7 +434,7 @@ /*{\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)) { + switch (get_mode(is)) { case CGAL::IO::ASCII : case CGAL::IO::BINARY : is >> d; diff -Nru cgal-4.7/include/CGAL/Kinetic/Active_objects_vector.h cgal-4.8/include/CGAL/Kinetic/Active_objects_vector.h --- cgal-4.7/include/CGAL/Kinetic/Active_objects_vector.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Active_objects_vector.h 2016-04-04 19:00:11.000000000 +0000 @@ -313,7 +313,7 @@ iss >> d; if (!iss) { CGAL_ERROR("ERROR reading object from line " << buf); - ++internal::io_errors__; + ++internal::get_static_io_errors(); } else { //CGAL_LOG(Log::LOTS, "Read " << d << std::endl); insert(d); diff -Nru cgal-4.7/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h cgal-4.8/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h --- cgal-4.7/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Handle_degeneracy_function_kernel.h 2016-04-04 19:00:11.000000000 +0000 @@ -45,7 +45,7 @@ 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__; + ++ internal::get_static_zero_certificates(); } #ifndef NDEBUG if (!SLOPPY && k.sign_at_object()(uf, lb) == CGAL::NEGATIVE) { @@ -61,7 +61,7 @@ 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__; + ++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); diff -Nru cgal-4.7/include/CGAL/Kinetic/internal/debug_counters.h cgal-4.8/include/CGAL/Kinetic/internal/debug_counters.h --- cgal-4.7/include/CGAL/Kinetic/internal/debug_counters.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/internal/debug_counters.h 2016-04-04 19:00:11.000000000 +0000 @@ -18,15 +18,62 @@ // // Author(s) : Daniel Russel +#ifndef CGAL_DEBUG_COUNTERS_H_ +#define CGAL_DEBUG_COUNTERS_H_ + #include namespace CGAL { namespace Kinetic { namespace internal { - CGAL_EXPORT extern unsigned int zero_certificates__; + +#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 +#endif // CGAL_HEADER_ONLY + +#endif // CGAL_DEBUG_COUNTERS_H_ diff -Nru cgal-4.7/include/CGAL/Kinetic/internal/debug_counters_impl.h cgal-4.8/include/CGAL/Kinetic/internal/debug_counters_impl.h --- cgal-4.7/include/CGAL/Kinetic/internal/debug_counters_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/internal/debug_counters_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#if defined(BOOST_MSVC) +# pragma warning(disable:4251) +#endif +#include + +#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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/GUI_base.h cgal-4.8/include/CGAL/Kinetic/IO/internal/GUI_base.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/GUI_base.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/GUI_base.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_CGAL_GRAPHICAL_SIMULATOR_BASE_H -#define CGAL_KINETIC_CGAL_GRAPHICAL_SIMULATOR_BASE_H -#include -#include -#include - -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 Gui_base: public CGAL::Kinetic::Ref_counted > -{ -protected: - typedef Simulator_t Simulator; - typedef Gui_base This; - - typedef typename Simulator::Time TT; - -public: - //typedef CGAL::Ref_counted_pointer 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)), - /*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 ""; - break; - case RUNNING_TO_EVENT: - return ""; - break; - case RUNNING_THROUGH_EVENT: - return ""; - break; - case PAUSED: - return ""; - break; - case STOPPED: - return ""; - break; - default: - return ""; - } - } - - - - 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_listener timer_callback_; - //Listener *drawable_; - bool processing_; -}; -} } //namespace CGAL::Kinetic -#endif diff -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/pixmaps.h cgal-4.8/include/CGAL/Kinetic/IO/internal/pixmaps.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/pixmaps.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/pixmaps.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_core.h cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_core.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_core.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_core.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_CORE_H -#define CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_CORE_H -#include -#include -#include -#include -#include -#include - -namespace CGAL -{ - namespace Kinetic - { - namespace internal - { - class Qt_core: public QObject, public Non_ref_counted - { - 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 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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_timer.h cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_timer.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_timer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_timer.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_INTERNAL_QT_TIMER_H -#define CGAL_KINETIC_IO_INTERNAL_QT_TIMER_H -#include -#include -#include -#include -namespace CGAL -{ - namespace Kinetic - { - namespace internal - { - class Qt_timer: public QObject, public Non_ref_counted - { - 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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_widget_2_core.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_INTERNAL_QT_WIDGET_2_CORE_H -#define CGAL_KINETIC_IO_INTERNAL_QT_WIDGET_2_CORE_H - -#include -#include -#include -#include -#include - -namespace CGAL -{ - namespace Kinetic - { - namespace internal - { - class Qt_widget_2_core: public ::CGAL::Qt_widget, public Non_ref_counted - { - Q_OBJECT - private: - struct Listener_core{ - typedef This Notifier; - typedef enum {PICTURE_IS_CURRENT} Notification_type; - }; - public: - typedef CGAL::Kinetic::Listener_base Listener; - friend class CGAL::Kinetic::Listener_base; - 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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_window_2.h cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_window_2.h --- cgal-4.7/include/CGAL/Kinetic/IO/internal/Qt_window_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/internal/Qt_window_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_2_GUI_H -#define CGAL_KINETIC_IO_INTERNAL_QT_SIMULATOR_2_GUI_H -//#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -// 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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/Qt_moving_points_2.h cgal-4.8/include/CGAL/Kinetic/IO/Qt_moving_points_2.h --- cgal-4.7/include/CGAL/Kinetic/IO/Qt_moving_points_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/Qt_moving_points_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_MOVING_POINT_SET_2_H -#define CGAL_KINETIC_IO_MOVING_POINT_SET_2_H -#include -#include -#include -#include -#include -#include - -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 Qt_moving_points_2: public Ref_counted > -{ -protected: - typedef TraitsC Traits; - //typedef Moving_object_set Parent; - typedef Qt_moving_points_2 This; - - typedef typename Traits::Simulator Simulator; - // typedef typename GUI::Listener Gui_listener; - //typedef typename Simulator::Listener Simulator_listener; - //typedef CGAL::Kinetic::Simulator_objects_listener Siml; - // friend class CGAL::Kinetic::Simulator_objects_listener; - 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 Pointer; - //typedef typename CGAL::Const_ref_counted_pointer 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)), - //siml_(tr.simulator_handle(),const_cast( 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 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 -void Qt_moving_points_2::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 -void Qt_moving_points_2::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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/Qt_triangulation_2.h cgal-4.8/include/CGAL/Kinetic/IO/Qt_triangulation_2.h --- cgal-4.7/include/CGAL/Kinetic/IO/Qt_triangulation_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/Qt_triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_IO_QT_TRIANGULATION_2_H -#define CGAL_KINETIC_IO_QT_TRIANGULATION_2_H - -#include -#include -#include -#include - -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 Qt_triangulation_2: public Ref_counted > -{ - typedef Qt_triangulation_2 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 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 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 - 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 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 -Nru cgal-4.7/include/CGAL/Kinetic/IO/Qt_widget_2.h cgal-4.8/include/CGAL/Kinetic/IO/Qt_widget_2.h --- cgal-4.7/include/CGAL/Kinetic/IO/Qt_widget_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/IO/Qt_widget_2.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#ifndef CGAL_KINETIC_QT_SIMULATOR_2_H_ -#define CGAL_KINETIC_QT_SIMULATOR_2_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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 Qt_widget_2: public Ref_counted > -{ -public: - // VC is complaningx - typedef Qt_widget_2 This; - typedef Gui_base Graphical_base; - typedef typename Simulator_t::Time Time; - typedef typename internal::Qt_core_listener 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 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; - void set_widget(Qt_widget *w){ widget_=w;} - protected: - Qt_widget *widget_; - }; - - //! The base class for listeners for events. - typedef Multi_listener Listener; - friend class Multi_listener;*/ - 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 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(std::floor(xmin)), - static_cast(std::ceil(xmax)), - static_cast(std::floor(ymin)), - static_cast(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(new Window_listener(window()->button_handler(), base_)); - //widget_l_ = std::auto_ptr(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 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 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::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(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 app_; - typename Graphical_base::Handle base_; - //std::set drawables_; - //Base_listener base_l_; - Window_listener window_l_; - //std::auto_ptr widget_l_; -}; - -} } //namespace CGAL::Kinetic -#endif // guard diff -Nru cgal-4.7/include/CGAL/Kinetic/Ref_counted.h cgal-4.8/include/CGAL/Kinetic/Ref_counted.h --- cgal-4.7/include/CGAL/Kinetic/Ref_counted.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Ref_counted.h 2016-04-04 19:00:11.000000000 +0000 @@ -51,8 +51,9 @@ return reference_count_ != 0; } - virtual ~Ref_counted_base() { - CGAL_assertion(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); diff -Nru cgal-4.7/include/CGAL/Kinetic/Regular_triangulation_3.h cgal-4.8/include/CGAL/Kinetic/Regular_triangulation_3.h --- cgal-4.7/include/CGAL/Kinetic/Regular_triangulation_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Regular_triangulation_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -464,6 +464,7 @@ 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); @@ -471,12 +472,15 @@ } 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); } @@ -886,7 +890,7 @@ 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_code(Cell_handle ech= get_cell_handle(pk)); CGAL_assertion(ch== ech); } } diff -Nru cgal-4.7/include/CGAL/Kinetic/Sort.h cgal-4.8/include/CGAL/Kinetic/Sort.h --- cgal-4.7/include/CGAL/Kinetic/Sort.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Sort.h 2016-04-04 19:00:11.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -277,7 +278,7 @@ #endif write(std::cerr); std::cerr << std::endl; - ++internal::audit_failures__; + ++internal::get_static_audit_failures(); if (!wrote_objects_) { wrote_objects_=true; @@ -311,7 +312,7 @@ #endif write(std::cerr); std::cerr << std::endl; - ++internal::audit_failures__; + ++internal::get_static_audit_failures(); if (!wrote_objects_) { wrote_objects_=true; @@ -453,15 +454,12 @@ 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 { + 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_; }; diff -Nru cgal-4.7/include/CGAL/Kinetic/Two_list_pointer_event_queue.h cgal-4.8/include/CGAL/Kinetic/Two_list_pointer_event_queue.h --- cgal-4.7/include/CGAL/Kinetic/Two_list_pointer_event_queue.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Kinetic/Two_list_pointer_event_queue.h 2016-04-04 19:00:11.000000000 +0000 @@ -717,7 +717,7 @@ #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__; + ++internal::get_static_audit_failures(); } #endif //CGAL_assertion(tc >= tp); diff -Nru cgal-4.7/include/CGAL/Labeled_image_mesh_domain_3.h cgal-4.8/include/CGAL/Labeled_image_mesh_domain_3.h --- cgal-4.7/include/CGAL/Labeled_image_mesh_domain_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Labeled_image_mesh_domain_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -31,7 +31,7 @@ #include #include #include - +#include namespace CGAL { @@ -42,7 +42,11 @@ */ template > + typename Image_word_type = unsigned char, + typename Subdomain_index = int, + class Wrapper = Mesh_3::Image_to_labeled_function_wrapper > class Labeled_image_mesh_domain_3 : public Labeled_mesh_domain_3 { @@ -64,9 +68,20 @@ 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 diff -Nru cgal-4.7/include/CGAL/Labeled_mesh_domain_3.h cgal-4.8/include/CGAL/Labeled_mesh_domain_3.h --- cgal-4.7/include/CGAL/Labeled_mesh_domain_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Labeled_mesh_domain_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -72,6 +72,8 @@ public: // Kernel_traits compatibility typedef BGT R; + // access Function type from inherited class + typedef Function Fct; //------------------------------------------------------- // Index Types @@ -141,6 +143,13 @@ } /** + * 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. diff -Nru cgal-4.7/include/CGAL/Lapack/Linear_algebra_lapack.h cgal-4.8/include/CGAL/Lapack/Linear_algebra_lapack.h --- cgal-4.7/include/CGAL/Lapack/Linear_algebra_lapack.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Lapack/Linear_algebra_lapack.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -#include - -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(M.number_of_rows()), - n = static_cast(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 -Nru cgal-4.7/include/CGAL/Lapack_svd.h cgal-4.8/include/CGAL/Lapack_svd.h --- cgal-4.7/include/CGAL/Lapack_svd.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Lapack_svd.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +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(M.number_of_rows()), + n = static_cast(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 -Nru cgal-4.7/include/CGAL/Lazy_exact_nt.h cgal-4.8/include/CGAL/Lazy_exact_nt.h --- cgal-4.7/include/CGAL/Lazy_exact_nt.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Lazy_exact_nt.h 2016-04-04 19:00:12.000000000 +0000 @@ -48,6 +48,9 @@ #include #include +#include + + /* * This file contains the definition of the number type Lazy_exact_nt, * where ET is an exact number type (must provide the exact operations needed). @@ -1302,7 +1305,7 @@ operator>> (std::istream & is, Lazy_exact_nt & a) { ET e; - is >> e; + internal::read_float_or_quotient(is, e); if (is) a = e; return is; diff -Nru cgal-4.7/include/CGAL/Lazy.h cgal-4.8/include/CGAL/Lazy.h --- cgal-4.7/include/CGAL/Lazy.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Lazy.h 2016-04-04 19:00:11.000000000 +0000 @@ -33,13 +33,13 @@ #include #include #include - -#ifdef CGAL_HAS_THREADS -# include -#endif +#include #include #include +#ifdef CGAL_LAZY_KERNEL_DEBUG +# include +#endif #include @@ -787,16 +787,10 @@ // which is in particular heavily used for pruning DAGs. static const Self & zero() { -#ifdef CGAL_HAS_THREADS - static boost::thread_specific_ptr z; - if (z.get() == NULL) { - z.reset(new Self(new Lazy_rep_0())); - } - return * z.get(); -#else - static const Self z = new Lazy_rep_0(); + // 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())); return z; -#endif } Self_rep * ptr() const { return (Self_rep*) PTR; } diff -Nru cgal-4.7/include/CGAL/leda_rational.h cgal-4.8/include/CGAL/leda_rational.h --- cgal-4.7/include/CGAL/leda_rational.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/leda_rational.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,6 +25,7 @@ #ifndef CGAL_LEDA_RATIONAL_H #define CGAL_LEDA_RATIONAL_H +#include #include #include @@ -279,6 +280,17 @@ }; +namespace internal { + // See: Stream_support/include/CGAL/IO/io.h + template + 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(is, et); + } +} // namespace internal } //namespace CGAL diff -Nru cgal-4.7/include/CGAL/Line_2.h cgal-4.8/include/CGAL/Line_2.h --- cgal-4.7/include/CGAL/Line_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Line_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -233,7 +233,7 @@ std::ostream& insert(std::ostream& os, const Line_2& l) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << l.a() << ' ' << l.b() << ' ' << l.c(); case IO::BINARY : @@ -260,7 +260,7 @@ extract(std::istream& is, Line_2& l) { typename R::RT a, b, c; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(a) >> iformat(b) >> iformat(c); break; diff -Nru cgal-4.7/include/CGAL/Line_3.h cgal-4.8/include/CGAL/Line_3.h --- cgal-4.7/include/CGAL/Line_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Line_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -145,7 +145,7 @@ std::ostream & operator<<(std::ostream &os, const Line_3 &l) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << l.point(0) << ' ' << l.point(1); case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Linear_cell_complex_constructors.h cgal-4.8/include/CGAL/Linear_cell_complex_constructors.h --- cgal-4.7/include/CGAL/Linear_cell_complex_constructors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Linear_cell_complex_constructors.h 2016-04-04 19:00:11.000000000 +0000 @@ -577,7 +577,7 @@ alcc.vertex_attributes().end()); writer.write_facet_header(); - int m = alcc.get_new_mark(); + 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 ) diff -Nru cgal-4.7/include/CGAL/Linear_cell_complex.h cgal-4.8/include/CGAL/Linear_cell_complex.h --- cgal-4.7/include/CGAL/Linear_cell_complex.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Linear_cell_complex.h 2016-04-04 19:00:11.000000000 +0000 @@ -105,6 +105,8 @@ 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; @@ -361,9 +363,9 @@ // Copy of the code in CMap::correct_invalid_attributes() to avoid // 2 iterations through the darts of the map. - std::vector marks(dimension+1); + std::vector marks(dimension+1); for ( unsigned int i=0; i<=dimension; ++i) - marks[i] = -1; + marks[i] = Base::INVALID_MARK; Helper::template Foreach_enabled_attributes >:: @@ -384,7 +386,7 @@ } for ( unsigned int i=0; i<=dimension; ++i) - if ( marks[i]!=-1 ) + if ( marks[i]!=Base::INVALID_MARK ) { CGAL_assertion( this->is_whole_map_marked(marks[i]) ); free_mark(marks[i]); @@ -414,13 +416,12 @@ /// 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 sew3_same_facets(size_type AMark) { unsigned int res = 0; std::map > one_dart_per_facet; - int mymark = this->get_new_mark(); - CGAL_assertion( mymark!=-1 ); + 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. @@ -486,7 +487,7 @@ /// (all the facets of the map are considered) unsigned int sew3_same_facets() { - int mark = this->get_new_mark(); + size_type mark = this->get_new_mark(); this->negate_mark(mark); unsigned int res=sew3_same_facets(mark); this->free_mark(mark); @@ -899,6 +900,8 @@ 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() {} diff -Nru cgal-4.7/include/CGAL/Linear_cell_complex_incremental_builder.h cgal-4.8/include/CGAL/Linear_cell_complex_incremental_builder.h --- cgal-4.7/include/CGAL/Linear_cell_complex_incremental_builder.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Linear_cell_complex_incremental_builder.h 2016-04-04 19:00:11.000000000 +0000 @@ -47,10 +47,11 @@ ++new_vertices; return res; } - + void begin_facet() { - CGAL_assertion( first_dart==lcc.null_handle && prev_dart==lcc.null_handle ); + first_dart = lcc.null_handle; + prev_dart = lcc.null_handle; // std::cout<<"Begin facet: "<(prev_dart, first_dart); @@ -98,8 +100,7 @@ add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex ); - first_dart = lcc.null_handle; - prev_dart = lcc.null_handle; + return first_dart; // std::cout<<" end facet."< +#include +#if (BOOST_GCC >= 50000) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") +#endif + namespace CGAL { /** @file Linear_cell_complex_storages.h @@ -153,21 +159,21 @@ 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 + 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, int amark, bool avalue) const + 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, int amark) const + void flip_dart_mark(Dart_const_handle ADart, size_type amark) const { CGAL_assertion( ADart!=NULL ); ADart->flip_mark(amark); @@ -437,5 +443,8 @@ } // namespace CGAL +#if (BOOST_GCC >= 50000) + _Pragma("GCC diagnostic pop") +#endif #endif // CGAL_LINEAR_CELL_COMPLEX_STORAGES_H // // EOF // diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -29,14 +29,15 @@ #include #include #include - +#include #include namespace CGAL { template < typename InputIterator, typename Kernel, - typename Tag> + typename Tag, + typename DiagonalizeTraits> inline typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, @@ -44,35 +45,39 @@ typename Kernel::Line_2& line, typename Kernel::Point_2& centroid, const Tag& tag, - const Kernel& kernel) + const Kernel& kernel, + const DiagonalizeTraits& diagonalize_traits) { typedef typename std::iterator_traits::value_type Value_type; return internal::linear_least_squares_fitting_2(first, beyond, line, - centroid,(Value_type*)NULL,kernel,tag); + 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> + typename Tag> inline typename Kernel_traits::Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, Line& line, Point& centroid, - const Tag& tag) + const Tag& tag) { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_2 + (first,beyond,line,centroid,tag,Kernel(), + Default_diagonalize_traits()); } - template < typename InputIterator, typename Line, - typename Tag > + typename Tag> inline typename Kernel_traits::Kernel::FT linear_least_squares_fitting_2(InputIterator first, @@ -83,7 +88,8 @@ typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; typename Kernel::Point_2 centroid; // unused - return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_2(first,beyond,line,centroid,tag,Kernel(), + Default_diagonalize_traits()); } diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,8 +21,6 @@ #define CGAL_LINEAR_LEAST_SQUARES_FITTING_3_H #include -//#include -//#include #include #include @@ -31,6 +29,8 @@ #include #include +#include + #include #include @@ -42,7 +42,8 @@ template < typename InputIterator, typename Object, typename Kernel, - typename Tag > + typename Tag, + typename DiagonalizeTraits > inline typename Kernel::FT linear_least_squares_fitting_3(InputIterator first, @@ -50,32 +51,38 @@ Object& object, // plane or line typename Kernel::Point_3& centroid, const Tag& tag, // dimension tag, ranges from 0 to 3 - const Kernel& kernel) + const Kernel& kernel, + const DiagonalizeTraits& diagonalize_traits) { typedef typename std::iterator_traits::value_type Value_type; return internal::linear_least_squares_fitting_3(first, beyond, object, - centroid, (Value_type*) NULL, kernel, tag); + 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> + typename Point, + typename Tag > inline typename Kernel_traits::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 + const Tag& tag) // dimension tag, ranges from 0 to 3 { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; - return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel()); + return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(), + Default_diagonalize_traits()); + } // deduces kernel and does not write centroid +// use default DiagonalizeTraits template < typename InputIterator, typename Object, typename Tag> @@ -84,12 +91,14 @@ linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, Object& object, // plane or line - const Tag& tag) // dimension tag, ranges from 0 to 3 + const Tag& tag) // dimension tag, ranges from 0 to 3 { typedef typename std::iterator_traits::value_type Value_type; typedef typename Kernel_traits::Kernel Kernel; typename Kernel::Point_3 centroid; // not used by caller - return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag); + return CGAL::linear_least_squares_fitting_3(first,beyond,object,centroid,tag,Kernel(), + Default_diagonalize_traits()); + } } //namespace CGAL diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_circles_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_circles_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_circles_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_circles_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ typename K::Point_2& c, // centroid const typename K::Circle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits&) { // types typedef typename K::FT FT; @@ -67,11 +66,11 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 + // 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}; + typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {0.25, 0.0, @@ -120,22 +119,19 @@ covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(final_cov, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(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])); + 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.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector (eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -148,7 +144,7 @@ } // end linear_least_squares_fitting_2 for circle set with 2D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -156,7 +152,8 @@ typename K::Point_2& c, // centroid const typename K::Circle_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& ) { // types typedef typename K::FT FT; @@ -174,11 +171,11 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 + // 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}; + typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {1.0, 0.0, @@ -226,22 +223,19 @@ covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(final_cov, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(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])); + 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.first != eigen_values.second) + if(eigen_values[1] != eigen_values[0]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_cuboids_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_cuboids_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_cuboids_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_cuboids_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -36,7 +35,8 @@ // fits a plane to a 3D cuboid set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -44,9 +44,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; // precondition: at least one element in the container. @@ -56,18 +56,19 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -75,9 +76,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; // precondition: at least one element in the container. @@ -87,18 +88,19 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,7 +108,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -135,13 +138,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -149,7 +154,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Point_3 Point; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -174,13 +180,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -188,9 +196,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; // precondition: at least one element in the container. @@ -200,17 +208,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -218,9 +227,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; // precondition: at least one element in the container. @@ -230,18 +239,19 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -249,7 +259,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -278,13 +289,15 @@ } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -292,7 +305,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Point_3 Point; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -317,7 +331,8 @@ } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_points_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_points_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_points_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_points_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include - #include #include @@ -37,7 +35,8 @@ // 0 is worst (isotropic case, returns a line with horizontal // direction by default). template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits> typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -45,7 +44,8 @@ typename K::Point_2& c, // centroid const typename K::Point_2*,// used for indirection const K&, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits&) { // types typedef typename K::FT FT; @@ -63,9 +63,11 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - FT covariance[3] = {0,0,0}; + // 0 1 + // 2 + + typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }}; + for(InputIterator it = first; it != beyond; it++) @@ -78,18 +80,19 @@ } // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - internal::eigen_symmetric_2(covariance, eigen_vectors, eigen_values); + 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.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector (eigen_vectors[2], eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_points_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_points_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_points_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_points_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -35,7 +34,8 @@ // 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, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -43,9 +43,9 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Point_3 Point; // precondition: at least one element in the container. @@ -55,11 +55,11 @@ c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6]; - assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag); + 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); + return fitting_plane_3(covariance,c,plane,k,diagonalize_traits); } // end fit plane to point set // fits a line to a 3D point set @@ -67,7 +67,8 @@ // 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, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -75,9 +76,9 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Point_3 Point; // precondition: at least one element in the container. @@ -87,11 +88,11 @@ c = centroid(first,beyond,K(),tag); // assemble covariance matrix - FT covariance[6]; - assemble_covariance_matrix_3(first,beyond,covariance,c,k,(Point*) NULL,tag); + 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); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end fit line to point set } // end namespace internal diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_rectangles_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_rectangles_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_rectangles_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_rectangles_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits&) { // types typedef typename K::FT FT; @@ -70,7 +69,7 @@ // 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}; + typename DiagonalizeTraits::Covariance_matrix covariance = {{ 0., 0., 0. }}; // assemble 2nd order moment about the origin. FT temp[4] = {1/3.0, 0.25, @@ -123,22 +122,19 @@ covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(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])); + 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.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -150,7 +146,7 @@ } } // end linear_least_squares_fitting_2 for rectangle set with 2D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -158,7 +154,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { // types typedef typename K::Iso_rectangle_2 Iso_rectangle; @@ -179,13 +176,15 @@ segments.push_back(Segment_2(t[3],t[0])); } - return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,K(),tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -193,7 +192,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { // types typedef typename K::Iso_rectangle_2 Iso_rectangle; @@ -214,7 +214,8 @@ points.push_back(Point_2(t[3])); } - return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,K(),tag); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_segments_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_segments_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_segments_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_segments_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -40,7 +38,7 @@ // 0 is worst (isotropic case, returns a line with horizontal // direction by default) -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -48,7 +46,8 @@ 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>()) + const CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits&) { // types typedef typename K::FT FT; @@ -69,7 +68,7 @@ // 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}; + 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}; @@ -111,22 +110,19 @@ covariance[2] += mass * (-1.0 * c.y() * c.y()); // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - std::pair eigen_values; - std::pair eigen_vectors; - // internal::eigen_symmetric_2(covariance, eigen_vectors, eigen_values); - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(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])); + 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.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -138,7 +134,7 @@ } } // end linear_least_squares_fitting_2 for segment set with 1D tag -template < typename InputIterator, typename K > +template < typename InputIterator, typename K, typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -146,7 +142,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { // types typedef typename K::Point_2 Point; @@ -164,7 +161,8 @@ 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); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_segments_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_segments_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_segments_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_segments_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -35,7 +34,8 @@ // fits a plane to a 3D segment set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -43,9 +43,9 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Segment_3 Segment; // precondition: at least one element in the container. @@ -55,17 +55,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -73,7 +74,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Point_3 Point; @@ -92,13 +94,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,9 +110,9 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Segment_3 Segment; // precondition: at least one element in the container. @@ -118,17 +122,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -136,7 +141,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Segment_3 Segment; typedef typename K::Point_3 Point; @@ -155,7 +161,8 @@ } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_spheres_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_spheres_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_spheres_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_spheres_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -33,7 +32,8 @@ // fits a plane to a set of 3D balls (3D) template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -41,9 +41,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; // precondition: at least one element in the container. @@ -53,17 +53,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -71,9 +72,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; // precondition: at least one element in the container. @@ -83,18 +84,19 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -102,9 +104,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; // precondition: at least one element in the container. @@ -114,18 +116,19 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -133,9 +136,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; // precondition: at least one element in the container. @@ -145,11 +148,11 @@ 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); + 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); + return fitting_line_3(covariance,c,line,k,diagonalize_traits); } // end linear_least_squares_fitting_spheres_3 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_tetrahedra_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -37,7 +36,8 @@ // fits a plane to a 3D tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -45,9 +45,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron; // precondition: at least one element in the container. @@ -57,16 +57,17 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -74,7 +75,8 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Triangle_3 Triangle; @@ -95,13 +97,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),plane,c,(Triangle*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -109,7 +113,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Segment_3 Segment; @@ -133,13 +138,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -147,7 +154,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Point_3 Point; @@ -168,13 +176,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -182,9 +192,9 @@ 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 CGAL::Dimension_tag<3>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron; // precondition: at least one element in the container. @@ -194,17 +204,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -212,7 +223,8 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Triangle_3 Triangle; @@ -233,13 +245,15 @@ } // compute fitting line - return linear_least_squares_fitting_3(triangles.begin(),triangles.end(),line,c,(Triangle*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -247,7 +261,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Segment_3 Segment; @@ -270,13 +285,15 @@ } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -284,7 +301,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Tetrahedron_3 Tetrahedron; typedef typename K::Point_3 Point; @@ -305,7 +323,8 @@ } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_triangles_2.h cgal-4.8/include/CGAL/linear_least_squares_fitting_triangles_2.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_triangles_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_triangles_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,8 +22,6 @@ #include #include -#include -#include #include #include @@ -41,7 +39,7 @@ // direction by default) template < typename InputIterator, - typename Kernel > + typename Kernel, typename DiagonalizeTraits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -49,7 +47,8 @@ typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<2>& tag) + const CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits&) { // types typedef typename Kernel::FT FT; @@ -71,7 +70,7 @@ // 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}; + 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, @@ -123,21 +122,19 @@ // std::cout<<"cov: "< eigen_values; - std::pair eigen_vectors; - FT eigen_vectors1[4]; - FT eigen_values1[2]; - eigen_symmetric(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])); + 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.first != eigen_values.second) + if(eigen_values[0] != eigen_values[1]) { // regular case - line = Line(c, eigen_vectors.first); - return (FT)1.0 - eigen_values.second / eigen_values.first; + line = Line(c, Vector(eigen_vectors[2],eigen_vectors[3])); + return (FT)1.0 - eigen_values[0] / eigen_values[1]; } else { @@ -150,7 +147,8 @@ } // end linear_least_squares_fitting_2 for triangle set with 2D tag template < typename InputIterator, - typename Kernel > + typename Kernel, + typename DiagonalizeTraits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -158,7 +156,8 @@ typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<1>& tag) + const CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { // types typedef typename Kernel::Triangle_2 Triangle; @@ -178,12 +177,14 @@ segments.push_back(Segment(t[2],t[0])); } - return linear_least_squares_fitting_2(segments.begin(),segments.end(),line,c,tag,Kernel()); + 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 Kernel, + typename DiagonalizeTraits > typename Kernel::FT linear_least_squares_fitting_2(InputIterator first, InputIterator beyond, @@ -191,7 +192,8 @@ typename Kernel::Point_2& c, // centroid const typename Kernel::Triangle_2*,// used for indirection const Kernel&, // kernel - const CGAL::Dimension_tag<0>& tag) + const CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { // types @@ -212,7 +214,8 @@ points.push_back(Point(t[2])); } - return linear_least_squares_fitting_2(points.begin(),points.end(),line,c,tag,Kernel()); + 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 diff -Nru cgal-4.7/include/CGAL/linear_least_squares_fitting_triangles_3.h cgal-4.8/include/CGAL/linear_least_squares_fitting_triangles_3.h --- cgal-4.7/include/CGAL/linear_least_squares_fitting_triangles_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/linear_least_squares_fitting_triangles_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -34,7 +33,8 @@ // fits a plane to a 3D triangle set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -42,9 +42,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Triangle_3 Triangle; // precondition: at least one element in the container. @@ -54,17 +54,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -72,7 +73,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Segment_3 Segment; @@ -92,13 +94,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(segments.begin(),segments.end(),plane,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -106,7 +110,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Point_3 Point; @@ -125,13 +130,15 @@ } // compute fitting plane - return linear_least_squares_fitting_3(points.begin(),points.end(),plane,c,(Point*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -139,9 +146,9 @@ 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 CGAL::Dimension_tag<2>& tag, + const DiagonalizeTraits& diagonalize_traits) { - typedef typename K::FT FT; typedef typename K::Triangle_3 Triangle; // precondition: at least one element in the container. @@ -151,17 +158,18 @@ 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); + 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); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -169,7 +177,8 @@ 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 CGAL::Dimension_tag<1>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Segment_3 Segment; @@ -189,13 +198,15 @@ } // compute fitting line - return linear_least_squares_fitting_3(segments.begin(),segments.end(),line,c,(Segment*)NULL,k,tag); + 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 K, + typename DiagonalizeTraits > typename K::FT linear_least_squares_fitting_3(InputIterator first, InputIterator beyond, @@ -203,7 +214,8 @@ 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 CGAL::Dimension_tag<0>& tag, + const DiagonalizeTraits& diagonalize_traits) { typedef typename K::Triangle_3 Triangle; typedef typename K::Point_3 Point; @@ -222,7 +234,8 @@ } // compute fitting line - return linear_least_squares_fitting_3(points.begin(),points.end(),line,c,(Point*)NULL,k,tag); + 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 diff -Nru cgal-4.7/include/CGAL/lloyd_optimize_mesh_2.h cgal-4.8/include/CGAL/lloyd_optimize_mesh_2.h --- cgal-4.7/include/CGAL/lloyd_optimize_mesh_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/lloyd_optimize_mesh_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -21,6 +21,8 @@ #ifndef CGAL_LLOYD_OPTIMIZE_MESH_2_H #define CGAL_LLOYD_OPTIMIZE_MESH_2_H + + #include #include #include @@ -29,7 +31,20 @@ #include -#define BOOST_PARAMETER_MAX_ARITY 12 +#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 #include @@ -37,11 +52,7 @@ { namespace parameters { -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunused-variable" -#pragma clang diagnostic ignored "-Wunused-parameter" -#endif + BOOST_PARAMETER_NAME( cdt ) BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ ) @@ -52,11 +63,6 @@ BOOST_PARAMETER_NAME( (seeds_end, tag) seeds_end_) BOOST_PARAMETER_NAME( (mark, tag) mark_) -//CGAL_PRAGMA_DIAG_POP -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - }//end namespace parameters }//end namespace CGAL @@ -162,4 +168,11 @@ } //end namespace CGAL +//CGAL_PRAGMA_DIAG_POP +#if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000) +#pragma GCC diagnostic pop +#endif + + + #endif diff -Nru cgal-4.7/include/CGAL/lloyd_optimize_mesh_3.h cgal-4.8/include/CGAL/lloyd_optimize_mesh_3.h --- cgal-4.7/include/CGAL/lloyd_optimize_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/lloyd_optimize_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,9 +31,15 @@ #include #include #include +#include namespace CGAL { +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + BOOST_PARAMETER_FUNCTION( (Mesh_optimization_return_code), lloyd_optimize_mesh_3, @@ -52,6 +58,7 @@ convergence_, freeze_bound_ , do_freeze_); } +CGAL_PRAGMA_DIAG_POP @@ -65,6 +72,9 @@ 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 Sizing; diff -Nru cgal-4.7/include/CGAL/LSCM_parameterizer_3.h cgal-4.8/include/CGAL/LSCM_parameterizer_3.h --- cgal-4.7/include/CGAL/LSCM_parameterizer_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/LSCM_parameterizer_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,6 +26,10 @@ #include #include +#ifdef CGAL_EIGEN3_ENABLED +#include +#endif + #include #include #include @@ -43,15 +47,17 @@ /// \ingroup PkgSurfaceParameterizationMethods /// -/// The class LSCM_parameterizer_3 implements the +/// 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 +/// 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` /// /// @@ -66,11 +72,15 @@ < class ParameterizationMesh_3, ///< 3D surface mesh. class BorderParameterizer_3 - = Two_vertices_parameterizer_3, + = Two_vertices_parameterizer_3, ///< Strategy to parameterize the surface border. ///< The minimum is to parameterize two vertices. class SparseLinearAlgebraTraits_d - = OpenNL::SymmetricLinearSolverTraits +#if defined(CGAL_EIGEN3_ENABLED) || defined(DOXYGEN_RUNNING) + = Eigen_solver_traits::EigenType> > +#else + = OpenNL::SymmetricLinearSolverTraits +#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. @@ -94,11 +104,11 @@ /// Export BorderParameterizer_3 template parameter. typedef BorderParameterizer_3 Border_param; - /// Export SparseLinearAlgebraTraits_d template parameter. + +// Private types +private: typedef SparseLinearAlgebraTraits_d Sparse_LA; -// Private types -private: // Mesh_Adaptor_3 subtypes: typedef typename Adaptor::NT NT; typedef typename Adaptor::Point_2 Point_2; @@ -611,7 +621,7 @@ is_one_to_one_mapping(const Adaptor& mesh, const LeastSquaresSolver& ) { - Vector_3 first_triangle_normal; + Vector_3 first_triangle_normal(0., 0., 0.); for (Facet_const_iterator facetIt = mesh.mesh_facets_begin(); facetIt != mesh.mesh_facets_end(); diff -Nru cgal-4.7/include/CGAL/make_mesh_3.h cgal-4.8/include/CGAL/make_mesh_3.h --- cgal-4.7/include/CGAL/make_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/make_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -135,7 +135,8 @@ template < typename C3T3, typename MeshDomain, typename MeshCriteria > void -init_c3t3(C3T3& c3t3, const MeshDomain& domain, const MeshCriteria&) +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; @@ -145,7 +146,11 @@ // 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)); + 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() ; @@ -211,7 +216,8 @@ void operator()(C3T3& c3t3, const MD& domain, const MC& criteria, - bool with_features) + bool with_features, + const int nb_initial_points = -1) { if ( with_features ) { @@ -219,7 +225,7 @@ << " without features !" << std::endl; } - init_c3t3(c3t3,domain,criteria); + init_c3t3(c3t3,domain,criteria,nb_initial_points); } }; @@ -231,10 +237,11 @@ void operator()(C3T3& c3t3, const MD& domain, const MC& criteria, - bool with_features) + bool with_features, + const int nb_initial_points = -1) { C3t3_initializer < C3T3, MD, MC, true, typename MD::Has_features >() - (c3t3,domain,criteria,with_features); + (c3t3,domain,criteria,with_features,nb_initial_points); } }; @@ -247,10 +254,11 @@ void operator()(C3T3& c3t3, const MD& domain, const MC& criteria, - bool with_features) + 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); } + else { init_c3t3(c3t3,domain,criteria,nb_initial_points); } } }; @@ -263,7 +271,8 @@ void operator()(C3T3& c3t3, const MD& domain, const MC& criteria, - bool with_features) + bool with_features, + const int nb_initial_points = -1) { if ( with_features ) { @@ -271,7 +280,7 @@ << " without features !" << std::endl; } - init_c3t3(c3t3,domain,criteria); + init_c3t3(c3t3,domain,criteria,nb_initial_points); } }; @@ -354,6 +363,10 @@ #endif +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS BOOST_PARAMETER_FUNCTION( (void), @@ -377,7 +390,7 @@ 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 @@ -412,15 +425,17 @@ MeshDomain, MeshCriteria, internal::Mesh_3::has_Has_features::value > () (c3t3, - domain, - criteria, - with_features); - + 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); + internal::Mesh_3::init_c3t3(c3t3, domain, criteria, + mesh_options.number_of_initial_points); } CGAL_assertion( c3t3.triangulation().dimension() == 3 ); diff -Nru cgal-4.7/include/CGAL/Mean_curvature_flow_skeletonization.h cgal-4.8/include/CGAL/Mean_curvature_flow_skeletonization.h --- cgal-4.7/include/CGAL/Mean_curvature_flow_skeletonization.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Mean_curvature_flow_skeletonization.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -38,7 +39,7 @@ #include // Compute cotangent Laplacian -#include +#include // Compute the vertex normal #include @@ -58,7 +59,7 @@ #include // Some helper functions -#include +#include // For detect_degenarcy #include @@ -74,7 +75,6 @@ // for default parameters #if defined(CGAL_EIGEN3_ENABLED) #include // for sparse linear system solver -#include // #include #endif @@ -225,9 +225,11 @@ typedef typename boost::graph_traits::edge_iterator edge_iterator; // Cotangent weight calculator - typedef typename internal::Cotangent_weight > > Weight_calculator; + typedef internal::Cotangent_weight::type, + internal::Cotangent_value_minimum_zero::type, + internal::Cotangent_value_Meyer_secure > > Weight_calculator; typedef internal::Curve_skeleton(num_vertices(m_tmesh)); m_max_id = m_vertex_id_count; @@ -883,7 +890,7 @@ 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, m_tmesh, m_traits)); + m_edge_weight.push_back(m_weight_calculator(hd)); } } diff -Nru cgal-4.7/include/CGAL/Mean_value_coordinates_parameterizer_3.h cgal-4.8/include/CGAL/Mean_value_coordinates_parameterizer_3.h --- cgal-4.7/include/CGAL/Mean_value_coordinates_parameterizer_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Mean_value_coordinates_parameterizer_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,6 +24,7 @@ #include #include +#include /// \file Mean_value_coordinates_parameterizer_3.h @@ -56,7 +57,7 @@ /// \sa `CGAL::Barycentric_mapping_parameterizer_3` /// \sa `CGAL::Discrete_authalic_parameterizer_3` /// \sa `CGAL::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::LSCM_parameterizer_3` +/// \sa `CGAL::LSCM_parameterizer_3` template < @@ -64,8 +65,9 @@ class BorderParameterizer_3 ///< Strategy to parameterize the surface border = Circular_border_arc_length_parameterizer_3, class SparseLinearAlgebraTraits_d ///< Traits class to solve a sparse linear system - = OpenNL::DefaultLinearSolverTraits + = Eigen_solver_traits::EigenType, Eigen::IncompleteLUT< double > > > > + class Mean_value_coordinates_parameterizer_3 : public Fixed_border_parameterizer_3 +#include +#include // This has only been implemented for MacOSX/Darwin, Linux and VC++ for now. #if !defined _MSC_VER && !defined __linux__ && !defined __APPLE__ diff -Nru cgal-4.7/include/CGAL/Mesh_2/Lloyd_move_2.h cgal-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h --- cgal-4.7/include/CGAL/Mesh_2/Lloyd_move_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_2/Lloyd_move_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -66,6 +66,8 @@ 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; @@ -74,7 +76,7 @@ // Compute mass FT density = density_2d(tri_centroid, sizing_field); - FT abs_area = CGAL::abs(tri.area()); + 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); diff -Nru cgal-4.7/include/CGAL/Mesh_2/README cgal-4.8/include/CGAL/Mesh_2/README --- cgal-4.7/include/CGAL/Mesh_2/README 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_2/README 2016-04-04 19:00:11.000000000 +0000 @@ -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 ) so that we can see if I can move +some internal details to the documented interface. diff -Nru cgal-4.7/include/CGAL/Mesh_3/C3T3_helpers.h cgal-4.8/include/CGAL/Mesh_3/C3T3_helpers.h --- cgal-4.7/include/CGAL/Mesh_3/C3T3_helpers.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/C3T3_helpers.h 2016-04-04 19:00:11.000000000 +0000 @@ -1215,8 +1215,8 @@ if(update_c3t3) { // Update status in c3t3 - if(surface) - c3t3_.add_to_complex(facet,*surface); + if(surface != boost::none) + c3t3_.add_to_complex(facet, surface.get()); else c3t3_.remove_from_complex(facet); } @@ -3026,6 +3026,9 @@ 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); diff -Nru cgal-4.7/include/CGAL/Mesh_3/config.h cgal-4.8/include/CGAL/Mesh_3/config.h --- cgal-4.7/include/CGAL/Mesh_3/config.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/config.h 2016-04-04 19:00:11.000000000 +0000 @@ -65,7 +65,8 @@ #if defined(__clang__) || (BOOST_GCC >= 40600) # define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES \ - _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") + _Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \ + _Pragma("GCC diagnostic ignored \"-Wunused-parameter\"") #else # define CGAL_MESH_3_IGNORE_UNUSED_VARIABLES #endif diff -Nru cgal-4.7/include/CGAL/Mesh_3/Dump_c3t3.h cgal-4.8/include/CGAL/Mesh_3/Dump_c3t3.h --- cgal-4.7/include/CGAL/Mesh_3/Dump_c3t3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Dump_c3t3.h 2016-04-04 19:00:11.000000000 +0000 @@ -58,19 +58,35 @@ struct Dump_c3t3 { 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::value) + << " 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::value) { std::cerr << " - C3t3::Triangulation::Vertex is not streamble\n"; + std::cerr << " " + << typeid(typename C3t3::Triangulation::Vertex).name() + << "\n"; + } - if(!is_streamable::value) + if(!is_streamable::value) { std::cerr << " - C3t3::Triangulation::Cell is not streamble\n"; + std::cerr << " " + << typeid(typename C3t3::Triangulation::Cell).name() + << "\n"; + } - if(!is_streamable::value) + if(!is_streamable::value) { std::cerr << " - C3t3::Surface_patch_index is not streamable\n"; - - if(!is_streamable::value) + std::cerr << " " + << typeid(typename C3t3::Surface_patch_index).name() + << "\n"; + } + if(!is_streamable::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 diff -Nru cgal-4.7/include/CGAL/Mesh_3/global_parameters.h cgal-4.8/include/CGAL/Mesh_3/global_parameters.h --- cgal-4.7/include/CGAL/Mesh_3/global_parameters.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/global_parameters.h 2016-04-04 19:00:11.000000000 +0000 @@ -28,7 +28,14 @@ #include #include -#define BOOST_PARAMETER_MAX_ARITY 12 +#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 @@ -79,6 +86,7 @@ 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 diff -Nru cgal-4.7/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h cgal-4.8/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h --- cgal-4.7/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h 2016-04-04 19:00:11.000000000 +0000 @@ -27,9 +27,9 @@ #ifndef CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H #define CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H - - #include +#include + namespace CGAL { @@ -46,6 +46,8 @@ class BGT, typename Image_word_type = unsigned char, typename Return_type = int, + typename Transform = Identity, + bool labeled_image = true, bool use_trilinear_interpolation=true> class Image_to_labeled_function_wrapper { @@ -56,8 +58,15 @@ typedef typename BGT::Point_3 Point_3; /// Constructor - Image_to_labeled_function_wrapper(const Image_& image) - : r_im_(image) {} + 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 @@ -73,12 +82,23 @@ { if ( use_trilinear_interpolation ) { - return static_cast( + if ( labeled_image ) + { + return static_cast(transform( r_im_.labellized_trilinear_interpolation( CGAL::to_double(p.x()), CGAL::to_double(p.y()), CGAL::to_double(p.z()), - word_type(0))); + value_outside))); + } else { + return static_cast(transform( + static_cast( + r_im_.template trilinear_interpolation( + CGAL::to_double(p.x()), + CGAL::to_double(p.y()), + CGAL::to_double(p.z()), + value_outside)))); + } } else { @@ -101,13 +121,16 @@ } const word_type* data = static_cast(r_im_.data()); - return data[ pz*dimy*dimx + py*dimx + px ]; + return static_cast(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 diff -Nru cgal-4.7/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h cgal-4.8/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h --- cgal-4.7/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -119,6 +119,13 @@ } /** + * 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}. diff -Nru cgal-4.7/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h cgal-4.8/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h --- cgal-4.7/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,4 +1,5 @@ -// Copyright (c) 2009 INRIA Sophia-Antipolis (France). +// 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). @@ -16,7 +17,7 @@ // $Id$ // // -// Author(s) : Stéphane Tayeb +// Author(s) : Laurent Rineau, Stéphane Tayeb // //****************************************************************************** // File Description : Implements class Mesh_complex_3_in_triangulation_3. @@ -35,6 +36,7 @@ #include #include #include +#include #ifdef CGAL_LINKED_WITH_TBB #include @@ -43,6 +45,46 @@ namespace CGAL { namespace Mesh_3 { + namespace details { + + template + 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 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 @@ -50,8 +92,10 @@ */ template class Mesh_complex_3_in_triangulation_3_base + : public details::C3t3_helper_class { typedef Mesh_complex_3_in_triangulation_3_base Self; + typedef details::C3t3_helper_class Base; public: // Triangulation types @@ -67,6 +111,26 @@ 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 //------------------------------------------------------- @@ -75,7 +139,10 @@ * Builds an empty 3D complex. */ Mesh_complex_3_in_triangulation_3_base() - : tr_() + : 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 @@ -85,7 +152,10 @@ /// Copy constructor Mesh_complex_3_in_triangulation_3_base(const Self& rhs) - : tr_(rhs.tr_) + : 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_; @@ -98,6 +168,8 @@ number_of_cells_ = 0; number_of_facets_ = 0; tr_.clear(); + manifold_info_initialized_ = false; + edge_facet_counter_.clear(); } /// Assignment operator @@ -146,6 +218,87 @@ 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 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::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 { @@ -250,7 +403,7 @@ CGAL::output_to_medit(os,*this,rebind,show_patches); } - /// Outputs the mesh to medit + /// Outputs the mesh to maya void output_to_maya(std::ofstream& os, bool surfaceOnly = true) const { @@ -314,6 +467,102 @@ /// 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 facets; + { // fill the union find + std::vector non_filtered_facets; + tr_.incident_facets(v, std::back_inserter(non_filtered_facets)); + + for(typename std::vector::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::handle> Vertex_set_map; + typedef typename Vertex_set_map::iterator Vertex_set_map_iterator; + + Vertex_set_map vsmap; + + for(typename Union_find::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 //------------------------------------------------------- @@ -525,8 +774,16 @@ // Private date members Triangulation tr_; + + typedef typename Base::Pair_of_vertices Pair_of_vertices; + typedef std::map Edge_facet_counter; + + mutable Edge_facet_counter edge_facet_counter_; + typename Number_of_elements::type number_of_facets_; typename Number_of_elements::type number_of_cells_; + + mutable bool manifold_info_initialized_; }; // end class Mesh_complex_3_in_triangulation_3_base @@ -545,6 +802,31 @@ 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(); + } + } + } } } @@ -559,6 +841,34 @@ 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(); + } + } + } } } diff -Nru cgal-4.7/include/CGAL/Mesh_3/Mesher_3.h cgal-4.8/include/CGAL/Mesh_3/Mesher_3.h --- cgal-4.7/include/CGAL/Mesh_3/Mesher_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Mesher_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -42,7 +43,7 @@ #endif #include -#include +#include #ifdef CGAL_MESH_3_PROFILING #include @@ -160,6 +161,8 @@ //------------------------------------------------------- // Mesher_levels //------------------------------------------------------- + // typedef Refine_facets_manifold_base Rf_manifold_base; + /// Facets mesher level typedef Refine_facets_3< Triangulation, @@ -167,7 +170,9 @@ MeshDomain, C3T3, Null_mesher_level, - Concurrency_tag> Facets_level; + Concurrency_tag, + Refine_facets_manifold_base + > Facets_level; /// Cells mesher level typedef Refine_cells_3< @@ -306,7 +311,7 @@ double Mesher_3::refine_mesh(std::string dump_after_refine_surface_prefix) { - CGAL::Timer timer; + CGAL::Real_timer timer; timer.start(); double elapsed_time = 0.; @@ -484,27 +489,11 @@ #if defined(CGAL_LINKED_WITH_TBB) || \ defined(CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE) - Bbox_3 estimated_bbox; - CGAL_assertion_code(bool is_estimated_bbox_initialized = false); - #ifndef CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE if(boost::is_convertible::value) #endif // If that macro is defined, then estimated_bbox must be initialized { - typedef std::vector > 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(); - estimated_bbox = it->first.bbox(); - ++it; - for( ; it != it_end ; ++it) - estimated_bbox = estimated_bbox + it->first.bbox(); - - Base::set_bbox(estimated_bbox); - CGAL_assertion_code(is_estimated_bbox_initialized = true); + Base::set_bbox(r_oracle_.bbox()); } #endif // CGAL_LINKED_WITH_TBB||"sequential use far sphere" @@ -523,8 +512,7 @@ if (r_c3t3_.number_of_far_points() == 0 && r_c3t3_.number_of_facets() == 0) { - CGAL_assertion(is_estimated_bbox_initialized); - const Bbox_3 &bbox = estimated_bbox; + const Bbox_3 &bbox = r_oracle_.bbox(); // Compute radius for far sphere const double xdelta = bbox.xmax()-bbox.xmin(); diff -Nru cgal-4.7/include/CGAL/Mesh_3/Mesher_level.h cgal-4.8/include/CGAL/Mesh_3/Mesher_level.h --- cgal-4.7/include/CGAL/Mesh_3/Mesher_level.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Mesher_level.h 2016-04-04 19:00:11.000000000 +0000 @@ -819,7 +819,7 @@ return derived().test_point_conflict_from_superior_impl(p, zone, visitor); } - /** Refines elements of this level and previous levels (SEQUENTIAL VERSION). */ + /** Refines elements of this level and previous levels (PARALLEL VERSION). */ template void refine(Mesh_visitor visitor) { diff -Nru cgal-4.7/include/CGAL/Mesh_3/Mesh_global_optimizer.h cgal-4.8/include/CGAL/Mesh_3/Mesh_global_optimizer.h --- cgal-4.7/include/CGAL/Mesh_3/Mesh_global_optimizer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Mesh_global_optimizer.h 2016-04-04 19:00:11.000000000 +0000 @@ -27,7 +27,7 @@ #include -#include +#include #include #include #include @@ -621,7 +621,7 @@ MoveFunction move_function_; Sizing_field sizing_field_; double time_limit_; - CGAL::Timer running_time_; + CGAL::Real_timer running_time_; bool do_freeze_; mutable Nb_frozen_points_type nb_frozen_points_; @@ -666,7 +666,7 @@ #ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE std::cerr << "Fill sizing field..."; - CGAL::Timer timer; + CGAL::Real_timer timer; timer.start(); #endif @@ -759,8 +759,7 @@ % initial_vertices_nb % (running_time_.time() - step_begin) % (running_time_.time() / (i+1)) - % sum_moves_ - << std::endl; + % sum_moves_; step_begin = running_time_.time(); #endif @@ -770,6 +769,10 @@ if(check_convergence()) break; } +#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE + std::cerr << std::endl; +#endif + running_time_.stop(); #ifdef CGAL_MESH_3_PROFILING diff -Nru cgal-4.7/include/CGAL/Mesh_3/polylines_to_protect.h cgal-4.8/include/CGAL/Mesh_3/polylines_to_protect.h --- cgal-4.7/include/CGAL/Mesh_3/polylines_to_protect.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/polylines_to_protect.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include +#include + +namespace CGAL { + + + template + void + polylines_to_protect(const CGAL::Image_3& cgal_image, + const double, const double, const double, + std::vector >& polylines) + { + typedef typename Kernel_traits

    ::Kernel K; + typedef P Point_3; + typedef boost::adjacency_list Graph; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + // typedef typename boost::graph_traits::edge_iterator edge_iterator; + + const int xdim = static_cast(cgal_image.xdim()); + const int ydim = static_cast(cgal_image.ydim()); + const int zdim = static_cast(cgal_image.zdim()); + + const int image_dims[3] = { xdim, ydim, zdim }; + + Graph graph; + internal::Mesh_3::Graph_manipulations 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 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 Enriched_pixel; + + array, 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 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(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 + void + polylines_to_protect(const CGAL::Image_3& cgal_image, + std::vector >& polylines) + { + polylines_to_protect

    + (cgal_image, + cgal_image.vx(), cgal_image.vy(),cgal_image.vz(), + polylines); + } + + +} // namespace CGAL + + +#endif // CGAL_POLYLINES_TO_PROTECT_H + diff -Nru cgal-4.7/include/CGAL/Mesh_3/Protect_edges_sizing_field.h cgal-4.8/include/CGAL/Mesh_3/Protect_edges_sizing_field.h --- cgal-4.7/include/CGAL/Mesh_3/Protect_edges_sizing_field.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Protect_edges_sizing_field.h 2016-04-04 19:00:11.000000000 +0000 @@ -1251,7 +1251,7 @@ CGAL_assertion_code(Tr& tr = c3t3_.triangulation()); CGAL_assertion_code(Cell_handle ch = tr.locate(p)); CGAL_assertion_code(std::vector hidden_vertices); - CGAL_assertion_code(if(tr.dimension() > 1) + CGAL_assertion_code(if(tr.dimension() > 2) tr.vertices_inside_conflict_zone(Weighted_point(p, w), ch, std::back_inserter(hidden_vertices))); diff -Nru cgal-4.7/include/CGAL/Mesh_3/Refine_facets_3.h cgal-4.8/include/CGAL/Mesh_3/Refine_facets_3.h --- cgal-4.7/include/CGAL/Mesh_3/Refine_facets_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Refine_facets_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -144,16 +144,16 @@ }; /************************************************ -// Class Refine_facets_3_base +// Class Refine_facets_3_handle_queue_base // Two versions: sequential / parallel ************************************************/ // Sequential template -class Refine_facets_3_base +class Refine_facets_3_handle_queue_base { protected: - Refine_facets_3_base() : m_last_vertex_index() {} + Refine_facets_3_handle_queue_base() : m_last_vertex_index() {} Index get_last_vertex_index() const { @@ -212,10 +212,10 @@ #ifdef CGAL_LINKED_WITH_TBB // Parallel template -class Refine_facets_3_base +class Refine_facets_3_handle_queue_base { protected: - Refine_facets_3_base() : m_last_vertex_index(Index()) {} + Refine_facets_3_handle_queue_base() : m_last_vertex_index(Index()) {} Index get_last_vertex_index() const { @@ -250,209 +250,41 @@ }; #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::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 Criteria::Facet_quality, - Facet_to_refine_is_not_zombie, - Concurrency_tag - >, - // Sequential -# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE - Meshes::Filtered_deque_container - < - CGAL::cpp11::tuple, - typename Criteria::Facet_quality, - Facet_to_refine_is_not_zombie, - Concurrency_tag - > -# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) - Meshes::Filtered_multimap_container - < - CGAL::cpp11::tuple, - typename Criteria::Facet_quality, - Facet_to_refine_is_not_zombie, - Concurrency_tag - > -# else - Meshes::Double_map_container -# 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 Criteria::Facet_quality, - Facet_to_refine_is_not_zombie, - Concurrency_tag - > -# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) - Meshes::Filtered_multimap_container - < - CGAL::cpp11::tuple, - typename Criteria::Facet_quality, - Facet_to_refine_is_not_zombie, - Concurrency_tag - > -# else - Meshes::Double_map_container -# endif -#endif // CGAL_LINKED_WITH_TBB -> -class Refine_facets_3 -: public Refine_facets_3_base -, public Mesh_3::Mesher_level, - typename Tr::Facet, - Previous_level_, - Triangulation_mesher_level_traits_3, - Concurrency_tag > -, public Container_ -, public No_after_no_insertion -, public No_before_conflicts + class Container_ + > +class Refine_facets_3_base + : public Refine_facets_3_handle_queue_base + , public Container_ { - // Self - typedef Refine_facets_3 Self; - - typedef Refine_facets_3_base Base; - - typedef Mesher_level, - typename Tr::Facet, - Previous_level_, - Triangulation_mesher_level_traits_3, - 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 Tr::Cell_handle Cell_handle; typedef typename Triangulation_mesher_level_traits_3::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 - 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() - { - } + 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; - Facet get_next_element_impl() - { - return this->extract_element_from_container_value( - Container_::get_next_element_impl()); - } +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) + {} - Facet get_next_local_element_impl() - { - return extract_element_from_container_value( - Container_::get_next_local_element_impl()); - } + void scan_triangulation_impl_amendement() const {} /// Gets the point to insert from the element to refine Point refinement_point_impl(const Facet& facet) const @@ -466,48 +298,17 @@ << c->vertex((i+3)&3)->point() << ") : refinement point is " << get_facet_surface_center(facet) << std::endl; #endif - CGAL_assertion (is_facet_on_surface(facet)); + 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); }; - /// 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 - 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) + Facet get_next_element_impl() { - 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; + return this->extract_element_from_container_value( + Container_::get_next_element_impl()); } - /// 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, @@ -519,17 +320,6 @@ 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 { @@ -563,41 +353,13 @@ return sstr.str(); } - /// for debugging - std::string display_dual(Facet f) const +protected: + + // Functor for scan_triangulation_impl function + template + class Scan_facet { - std::stringstream stream; - stream.precision(17); - Object dual = r_tr_.dual(f); - - if ( const Segment_3* p_segment = object_cast(&dual) ) { - stream << "Segment(" << p_segment->source() - << " , " << p_segment->target() << ")"; - } - else if ( const Ray_3* p_ray = object_cast(&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(&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 - class Scan_facet - { - Refine_facets_ & m_refine_facets; + Refine_facets_ & m_refine_facets; typedef typename Refine_facets_::Facet Facet; @@ -621,26 +383,20 @@ }; +protected: //------------------------------------------------------- // 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::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 Gt::Bare_point Bare_point; typedef typename boost::optional< CGAL::cpp11::tuple > 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 @@ -661,12 +417,6 @@ 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, @@ -687,136 +437,442 @@ 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); - } + /// 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(&dual) ) { + stream << "Segment(" << p_segment->source() + << " , " << p_segment->target() << ")"; + } + else if ( const Ray_3* p_ray = object_cast(&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(&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 Base_ = Refine_facets_3_base, +#ifdef CGAL_LINKED_WITH_TBB + class Container_ = typename boost::mpl::if_c // (parallel/sequential?) + < + boost::is_convertible::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 Criteria::Facet_quality, + Facet_to_refine_is_not_zombie, + Concurrency_tag + >, + // Sequential +# ifdef CGAL_MESH_3_USE_LAZY_UNSORTED_REFINEMENT_QUEUE + Meshes::Filtered_deque_container + < + CGAL::cpp11::tuple, + typename Criteria::Facet_quality, + Facet_to_refine_is_not_zombie, + Concurrency_tag + > +# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) + Meshes::Filtered_multimap_container + < + CGAL::cpp11::tuple, + typename Criteria::Facet_quality, + Facet_to_refine_is_not_zombie, + Concurrency_tag + > +# else + Meshes::Double_map_container +# 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 Criteria::Facet_quality, + Facet_to_refine_is_not_zombie, + Concurrency_tag + > +# elif defined(CGAL_MESH_3_USE_LAZY_SORTED_REFINEMENT_QUEUE) + Meshes::Filtered_multimap_container + < + CGAL::cpp11::tuple, + typename Criteria::Facet_quality, + Facet_to_refine_is_not_zombie, + Concurrency_tag + > +# else + Meshes::Double_map_container +# endif +#endif // CGAL_LINKED_WITH_TBB +> +class Refine_facets_3 +: public Base_ +, public Mesh_3::Mesher_level, + typename Tr::Facet, + Previous_level_, + Triangulation_mesher_level_traits_3, + Concurrency_tag > +, public No_after_no_insertion +, public No_before_conflicts +{ + // Self + typedef Refine_facets_3 Self; + + typedef Base_ Rf_base; + + typedef Rf_base Base; + + typedef Mesher_level, + 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::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(); - /// 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); - } + int number_of_bad_elements_impl(); - /// Returns index of facet \c f - Surface_patch_index get_facet_surface_index(const Facet& f) const + Point circumcenter_impl(const Facet& facet) const { - return r_c3t3_.surface_patch_index(f.first, f.second); + return get_facet_surface_center(facet); } - /// Removes \c f from surface facets - void remove_facet_from_surface(const Facet& f) + template + void before_next_element_refinement_in_superior_impl(Mesh_visitor visitor) { - r_c3t3_.remove_from_complex(f); + // Before refining any cell, we refine the facets in the local refinement + // queue + this->treat_local_refinement_queue(visitor); } - /// Returns to if f is on surface - bool is_facet_on_surface(const Facet& f) const + void before_next_element_refinement_impl() { - return r_c3t3_.is_in_complex(f) ; } - /// Sets index and dimension of vertex \v - void set_vertex_properties(Vertex_handle& v, const Index& index) + Facet get_next_local_element_impl() { - r_c3t3_.set_index(v, index); - // Set dimension of v: v is on surface by construction, so dimension=2 - v->set_dimension(2); + return extract_element_from_container_value( + Container_::get_next_local_element_impl()); } - /// 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; + /// Tests if p encroaches facet from zone + // For sequential + Mesher_level_conflict_status + test_point_conflict_from_superior_impl(const Point& p, Zone& zone); - /// 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); - } + /// Tests if p encroaches facet from zone + // For parallel + template + Mesher_level_conflict_status + test_point_conflict_from_superior_impl(const Point& p, Zone& zone, + Mesh_visitor &visitor); - /// Insert encroached facet into refinement queue - void insert_encroached_facet_in_queue(Facet& facet) + /// Useless here + Mesher_level_conflict_status private_test_point_conflict_impl( + const Point& p, + Zone& zone) { - insert_bad_facet(facet,Quality()); + 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; } - /// 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 + /// 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); - /** - * 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); + /// Insert p into triangulation + Vertex_handle insert_impl(const Point& p, const Zone& zone); - /** - * 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) + bool try_lock_element(const Facet &f, int lock_radius = 0) const { - // perform the same operations as for an internal facet - return before_insertion_handle_facet_in_conflict_zone(facet, source_facet); + return this->triangulation().try_lock_facet(f, lock_radius); } - /// Action to perform on a facet incident to the new vertex - void after_insertion_handle_incident_facet(Facet& facet); +#ifdef CGAL_MESH_3_MESHER_STATUS_ACTIVATED + std::size_t queue_size() const { return this->size(); } +#endif - /// 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 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 @@ -829,29 +885,25 @@ // For sequential -template -Refine_facets_3:: +template class B_, class C_> +Refine_facets_3:: Refine_facets_3(Tr& triangulation, const Cr& criteria, const MD& oracle, P_& previous, C3T3& c3t3) - : Mesher_level, 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 -Refine_facets_3:: +template class B_, class C_> +Refine_facets_3:: Refine_facets_3(Tr& triangulation, const Cr& criteria, const MD& oracle, @@ -859,24 +911,20 @@ C3T3& c3t3, Lock_data_structure *lock_ds, WorksharingDataStructureType *worksharing_ds) - : Mesher_level, 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 +template class B_, class C_> void -Refine_facets_3:: +Refine_facets_3:: scan_triangulation_impl() { typedef typename Tr::Finite_facets_iterator Finite_facet_iterator; @@ -887,9 +935,9 @@ #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; + << "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 @@ -899,15 +947,15 @@ # 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() << "..." + << this->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(*this) + this->r_tr_.finite_facets_begin(), this->r_tr_.finite_facets_end(), + typename Rf_base::template Scan_facet(*this) ); splice_local_lists(); @@ -920,11 +968,11 @@ #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() << "..." + << this->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(); + 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 @@ -932,7 +980,7 @@ /*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); + this->treat_new_facet(facet); } } @@ -949,13 +997,14 @@ std::cerr << "Refining... "; Base_ML::m_timer.reset(); #endif + Base::scan_triangulation_impl_amendement(); } -template +template class B_, class C_> int -Refine_facets_3:: +Refine_facets_3:: number_of_bad_elements_impl() { typedef typename Tr::Finite_facets_iterator Finite_facet_iterator; @@ -965,15 +1014,15 @@ #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() << "..."; + << this->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(); + 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; - Facet_properties properties; + typename Rf_base::Facet_properties properties; compute_facet_properties(facet, properties); #ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED @@ -984,7 +1033,7 @@ if ( properties ) { // This facet should be on surface... - if (!is_facet_on_surface(facet)) + 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; @@ -1008,14 +1057,14 @@ if (i != ind) { const Facet f1(c, i); - if (is_facet_on_surface(f1)) + if (this->is_facet_on_surface(f1)) { - std::cerr << "*** f1 is " << (r_criteria_(f1) ? "bad" : "good") << std::endl; + std::cerr << "*** f1 is " << (this->r_criteria_(f1) ? "bad" : "good") << std::endl; #ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED c->mark = i; #endif - Facet_properties properties; + typename Rf_base::Facet_properties properties; compute_facet_properties(f1, properties); if (properties) ++num_real_surface_facets_in_c; @@ -1026,15 +1075,15 @@ if (i != mind) { const Facet f2(c, i); - if (is_facet_on_surface(f2)) + if (this->is_facet_on_surface(f2)) { - std::cerr << "*** f2 is " << (r_criteria_(f2) ? "bad" : "good") << std::endl; + std::cerr << "*** f2 is " << (this->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); + typename Rf_base::Facet_properties properties; + this->compute_facet_properties(f2, properties); if (properties) ++num_real_surface_facets_in_mc; else @@ -1049,12 +1098,12 @@ << "*** 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)); + 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: " << r_c3t3_.is_in_complex(c) + 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: " << r_c3t3_.is_in_complex(mc) + << " / mc is marked in domain: " << this->r_c3t3_.is_in_complex(mc) << " / mc is really in domain: " << is_mc_in_domain << std::endl; @@ -1072,11 +1121,11 @@ //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); + const typename Rf_base::Is_facet_bad is_facet_bad = this->r_criteria_(facet); if ( is_facet_bad ) { ++count; - if (is_facet_on_surface(facet)) + if (this->is_facet_on_surface(facet)) ++count_num_bad_surface_facets; #ifdef SHOW_REMAINING_BAD_ELEMENT_IN_RED @@ -1092,7 +1141,7 @@ //remove_facet_from_surface(facet); // Marked on surface? - if (is_facet_on_surface(facet)) + 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 @@ -1113,9 +1162,9 @@ } // For sequential -template +template class B_, class C_> Mesher_level_conflict_status -Refine_facets_3:: +Refine_facets_3:: test_point_conflict_from_superior_impl(const Point& point, Zone& zone) { typedef typename Zone::Facets_iterator Facet_iterator; @@ -1126,11 +1175,11 @@ { // surface facets which are internal facets of the conflict zone are // encroached - if( is_facet_on_surface(*facet_it) ) + if( this->is_facet_on_surface(*facet_it) ) { - if ( is_encroached_facet_refinable(*facet_it) ) + if ( this->is_encroached_facet_refinable(*facet_it) ) { - insert_encroached_facet_in_queue(*facet_it); + this->insert_encroached_facet_in_queue(*facet_it); return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED; } else @@ -1142,12 +1191,12 @@ facet_it != zone.boundary_facets.end(); ++facet_it) { - if( is_facet_encroached(*facet_it, point) ) + if( this->is_facet_encroached(*facet_it, point) ) { // Insert already existing surface facet into refinement queue - if ( is_encroached_facet_refinable(*facet_it) ) + if ( this->is_encroached_facet_refinable(*facet_it) ) { - insert_encroached_facet_in_queue(*facet_it); + this->insert_encroached_facet_in_queue(*facet_it); return CONFLICT_BUT_ELEMENT_CAN_BE_RECONSIDERED; } else @@ -1159,10 +1208,10 @@ } // For parallel -template +template class B_, class C_> template Mesher_level_conflict_status -Refine_facets_3:: +Refine_facets_3:: test_point_conflict_from_superior_impl(const Point& point, Zone& zone, Mesh_visitor &visitor) { @@ -1174,9 +1223,9 @@ { // surface facets which are internal facets of the conflict zone are // encroached - if( is_facet_on_surface(*facet_it) ) + if( this->is_facet_on_surface(*facet_it) ) { - if ( is_encroached_facet_refinable(*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); @@ -1191,10 +1240,10 @@ facet_it != zone.boundary_facets.end(); ++facet_it) { - if( is_facet_encroached(*facet_it, point) ) + if( this->is_facet_encroached(*facet_it, point) ) { // Insert already existing surface facet into refinement queue - if ( is_encroached_facet_refinable(*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); @@ -1209,9 +1258,9 @@ } -template -typename Refine_facets_3::Zone -Refine_facets_3:: +template class B_, class C_> +typename Refine_facets_3::Zone +Refine_facets_3:: conflicts_zone_impl(const Point& point , const Facet& facet , bool &facet_is_in_its_cz) @@ -1219,34 +1268,34 @@ Zone zone; // TODO may be avoid the locate here - zone.cell = r_tr_.locate(point, - zone.locate_type, - zone.i, - zone.j, - facet.first); + 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); - 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); + 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 its conflict zone. " - "Switching to exact computation." << std::endl; + std::cerr << "Info: the facet is not in the conflict zone of (" << point + << "). Switching to exact computation." << std::endl; # endif - Facet_properties properties; - compute_facet_properties(facet, properties, /*force_exact=*/true); + 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); @@ -1254,13 +1303,13 @@ 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); + 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 - remove_facet_from_surface(facet); + this->remove_facet_from_surface(facet); } } } @@ -1268,9 +1317,9 @@ return zone; } -template -typename Refine_facets_3::Zone -Refine_facets_3:: +template class B_, class C_> +typename Refine_facets_3::Zone +Refine_facets_3:: conflicts_zone_impl(const Point& point , const Facet& facet , bool &facet_is_in_its_cz @@ -1279,25 +1328,25 @@ 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); + 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); - 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); + 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) { @@ -1306,8 +1355,8 @@ "Switching to exact computation." << std::endl; #endif - Facet_properties properties; - compute_facet_properties(facet, properties, /*force_exact=*/true); + 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); @@ -1315,13 +1364,13 @@ 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); + 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 - remove_facet_from_surface(facet); + this->remove_facet_from_surface(facet); } } } @@ -1330,10 +1379,9 @@ } - -template +template void -Refine_facets_3:: +Refine_facets_3_base:: before_insertion_impl(const Facet& facet, const Point& point, Zone& zone) @@ -1411,9 +1459,9 @@ -template -typename Refine_facets_3::Vertex_handle -Refine_facets_3:: +template class B_, class C_> +typename Refine_facets_3::Vertex_handle +Refine_facets_3:: insert_impl(const Point& point, const Zone& zone) { @@ -1426,23 +1474,23 @@ 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); + 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 - set_vertex_properties(v, Base::get_last_vertex_index()); + this->set_vertex_properties(v, Base::get_last_vertex_index()); return v; } -template +template void -Refine_facets_3:: +Refine_facets_3_base:: restore_restricted_Delaunay(const Vertex_handle& vertex) { typedef std::vector Cell_handle_vector; @@ -1474,9 +1522,9 @@ //------------------------------------------------------- // Private methods //------------------------------------------------------- -template +template void -Refine_facets_3:: +Refine_facets_3_base:: treat_new_facet(Facet& facet) { // Treat facet @@ -1509,7 +1557,7 @@ else { // Facet is not on surface - remove_facet_from_surface(facet); + this->remove_facet_from_surface(facet); } // Set facet visited @@ -1518,34 +1566,93 @@ set_facet_visited(mirror); } -template -Object -Refine_facets_3:: -dual_exact(const Facet& facet) const +template +void +Refine_facets_3_base:: +dual_segment(const Facet & facet, Bare_point& p, Bare_point& q) const { - typedef typename Gt::Bare_point Bare_point; + 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 +void +Refine_facets_3_base:: +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); - if ( ! r_tr_.is_infinite(c) && ! r_tr_.is_infinite(n) ) - { - Bare_point p1 = Gt().construct_weighted_circumcenter_3_object()( + 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); - Bare_point p2 = Gt().construct_weighted_circumcenter_3_object()( + q = 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)); +} + +template +void +Refine_facets_3_base:: +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 +void +Refine_facets_3_base:: +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) ) @@ -1565,20 +1672,22 @@ 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()( + + 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)); + true), l); } -template + + + + +template void -Refine_facets_3:: +Refine_facets_3_base:: compute_facet_properties(const Facet& facet, Facet_properties& fp, bool force_exact) const @@ -1587,6 +1696,7 @@ // Facet must be finite //------------------------------------------------------- CGAL_assertion( ! r_tr_.is_infinite(facet) ); + CGAL_assertion( r_tr_.dimension() == 3 ); // types typedef boost::optional Surface_patch; @@ -1600,35 +1710,37 @@ r_oracle_.do_intersect_surface_object(); #endif // not CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 - // 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(&dual) ) - { - if (is_degenerate(*p_segment)) { fp = Facet_properties(); return; } + 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(*p_segment); + 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(); - // Trick to have canonical vector : thus, we compute always 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 @@ -1643,11 +1755,10 @@ fp = Facet_properties(CGAL::cpp11::make_tuple(*surface, CGAL::cpp11::get<1>(intersect), Point(CGAL::cpp11::get<0>(intersect)))); - return; } } // If the dual is a ray - else if ( const Ray_3* p_ray = object_cast(&dual) ) + 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 @@ -1655,17 +1766,23 @@ // 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; } + 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(*p_ray); + 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(*p_ray); + 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() : @@ -1677,70 +1794,19 @@ fp = Facet_properties(CGAL::cpp11::make_tuple(*surface, CGAL::cpp11::get<1>(intersect), Point(CGAL::cpp11::get<0>(intersect)))); - return; - } - } - } - // If the dual is a line - else if ( const Line_3* p_line = object_cast(&dual) ) - { -#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3 - Surface_patch surface = do_intersect_surface(*p_line); - 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 always 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); -#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)))); - 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 +template bool -Refine_facets_3:: +Refine_facets_3_base:: is_facet_encroached(const Facet& facet, const Point& point) const { - if ( r_tr_.is_infinite(facet) || ! is_facet_on_surface(facet) ) + if ( r_tr_.is_infinite(facet) || ! this->is_facet_on_surface(facet) ) { return false; } @@ -1758,9 +1824,9 @@ return ( compare_distance(center, reference_point, point) != CGAL::SMALLER ); } -template +template bool -Refine_facets_3:: +Refine_facets_3_base:: is_encroached_facet_refinable(Facet& facet) const { typedef typename Gt::Point_3 Point_3; @@ -1847,16 +1913,16 @@ * \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 +template bool -Refine_facets_3:: +Refine_facets_3_base:: 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) ) + if ( this->is_facet_on_surface(facet) ) { // Remove element (if needed - see remove_bad_facet implementation) remove_bad_facet(facet, Ct()); @@ -1874,9 +1940,9 @@ -template +template void -Refine_facets_3:: +Refine_facets_3_base:: after_insertion_handle_incident_facet(Facet& facet) { // If the facet is infinite or has been already visited, diff -Nru cgal-4.7/include/CGAL/Mesh_3/Refine_facets_manifold_base.h cgal-4.8/include/CGAL/Mesh_3/Refine_facets_manifold_base.h --- cgal-4.7/include/CGAL/Mesh_3/Refine_facets_manifold_base.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Refine_facets_manifold_base.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +namespace CGAL { + +namespace Mesh_3 { + +BOOST_MPL_HAS_XXX_TRAIT_DEF(Has_manifold_criterion) + +template ::value> +struct Has_manifold_criterion : + public CGAL::Boolean_tag +// when Criteria has the nested type Has_manifold_criterion +{}; + +template +struct Has_manifold_criterion : public CGAL::Tag_false +// when Criteria does not have the nested type Has_manifold_criterion +{}; + + + +template +bool get_with_manifold(const Criteria&, CGAL::Tag_false) +{ + return false; +} + +template +bool get_with_manifold(const Criteria& c, CGAL::Tag_true) +{ + return (c.topology() & MANIFOLD_WITH_BOUNDARY) != 0; +} + +template +bool get_with_manifold(const Criteria& c) +{ + return get_with_manifold(c, Has_manifold_criterion()); +} + +template +bool get_with_boundary(const Criteria&, CGAL::Tag_false) +{ + return false; +} + +template +bool get_with_boundary(const Criteria& c, CGAL::Tag_true) +{ + return (c.topology() & NO_BOUNDARY) == 0; +} + +template +bool get_with_boundary(const Criteria& c) +{ + return get_with_boundary(c, Has_manifold_criterion()); +} + +template +class Refine_facets_manifold_base + : public Refine_facets_3_base +{ + typedef Refine_facets_3_base 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::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 EdgeVV; + +protected: + typedef ::boost::bimap< EdgeVV, + ::boost::bimaps::multiset_of > Bad_edges; + typedef typename Bad_edges::value_type Bad_edge; + + mutable Bad_edges m_bad_edges; + mutable std::set 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 facets; + facets.reserve(64); + this->r_tr_.incident_facets(v, std::back_inserter(facets)); + + typename std::vector::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 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 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::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 -Nru cgal-4.7/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h cgal-4.8/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h --- cgal-4.7/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Robust_weighted_circumcenter_filtered_traits_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -169,29 +169,43 @@ 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; diff -Nru cgal-4.7/include/CGAL/Mesh_3/Sliver_perturber.h cgal-4.8/include/CGAL/Mesh_3/Sliver_perturber.h --- cgal-4.7/include/CGAL/Mesh_3/Sliver_perturber.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Sliver_perturber.h 2016-04-04 19:00:11.000000000 +0000 @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include @@ -747,7 +747,7 @@ // Timer double time_limit_; - CGAL::Timer running_time_; + CGAL::Real_timer running_time_; }; @@ -927,7 +927,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const { #ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY - CGAL::Timer timer; + CGAL::Real_timer timer; timer.start(); std::streamsize prec = std::cerr.precision(4); std::cerr << "Perturb sliver vertices (bound: " << sliver_bound @@ -1113,7 +1113,7 @@ CGAL_precondition(pqueue.empty()); #ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY - CGAL::Timer timer; + CGAL::Real_timer timer; timer.start(); std::cerr << "Build pqueue..."; #endif @@ -1178,7 +1178,7 @@ CGAL_precondition(pqueue.empty()); #ifdef CGAL_MESH_3_PERTURBER_HIGH_VERBOSITY - CGAL::Timer timer; + CGAL::Real_timer timer; timer.start(); std::cerr << "Build pqueue..."; #endif diff -Nru cgal-4.7/include/CGAL/Mesh_3/Slivers_exuder.h cgal-4.8/include/CGAL/Mesh_3/Slivers_exuder.h --- cgal-4.7/include/CGAL/Mesh_3/Slivers_exuder.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_3/Slivers_exuder.h 2016-04-04 19:00:11.000000000 +0000 @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include @@ -874,7 +874,7 @@ // Timer double time_limit_; - CGAL::Timer running_time_; + CGAL::Real_timer running_time_; #ifdef CGAL_MESH_3_DEBUG_SLIVERS_EXUDER // ----------------------------------- diff -Nru cgal-4.7/include/CGAL/Mesh_domain_with_polyline_features_3.h cgal-4.8/include/CGAL/Mesh_domain_with_polyline_features_3.h --- cgal-4.7/include/CGAL/Mesh_domain_with_polyline_features_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_domain_with_polyline_features_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -166,7 +166,9 @@ // Increment iterators and update length ++previous; ++pit; - CGAL_assertion(pit != points_.end()); + + if (pit == points_.end()) + return *previous; segment_length = this->distance(*previous,*pit); } diff -Nru cgal-4.7/include/CGAL/Meshes/Double_map_container.h cgal-4.8/include/CGAL/Meshes/Double_map_container.h --- cgal-4.7/include/CGAL/Meshes/Double_map_container.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Meshes/Double_map_container.h 2016-04-04 19:00:11.000000000 +0000 @@ -74,7 +74,7 @@ m.pop_front(); } - void remove_element(Element& e) + void remove_element(const Element& e) { #if CGAL_MESHES_DEBUG_DOUBLE_MAP std::cerr << "remove_element(" << &*e << ")\n"; diff -Nru cgal-4.7/include/CGAL/Mesh_facet_criteria_3.h cgal-4.8/include/CGAL/Mesh_facet_criteria_3.h --- cgal-4.7/include/CGAL/Mesh_facet_criteria_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_facet_criteria_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -50,6 +50,8 @@ typedef Mesh_facet_criteria_3 Self; public: + typedef CGAL::Tag_true Has_manifold_criterion; + /** * @brief Constructor */ @@ -110,6 +112,10 @@ criteria_.add(criterion); } + Mesh_facet_topology topology() const { + return topology_; + } + private: void init_aspect(const FT& angle_bound) { @@ -138,7 +144,8 @@ void init_topo(const Mesh_facet_topology topology) { - switch ( topology ) + topology_ = topology; + switch ( topology % MANIFOLD ) { case FACET_VERTICES_ON_SURFACE: { @@ -166,6 +173,7 @@ private: Criteria criteria_; + Mesh_facet_topology topology_; }; // end class Mesh_facet_criteria_3 } // end namespace CGAL diff -Nru cgal-4.7/include/CGAL/Mesh_facet_topology.h cgal-4.8/include/CGAL/Mesh_facet_topology.h --- cgal-4.7/include/CGAL/Mesh_facet_topology.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_facet_topology.h 2016-04-04 19:00:12.000000000 +0000 @@ -29,9 +29,12 @@ enum Mesh_facet_topology { FACET_VERTICES_ON_SURFACE = 1, - FACET_VERTICES_ON_SAME_SURFACE_PATCH, - FACET_VERTICES_ON_SAME_SURFACE_PATCH_WITH_ADJACENCY_CHECK -}; + 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 diff -Nru cgal-4.7/include/CGAL/Mesh_vertex_base_3.h cgal-4.8/include/CGAL/Mesh_vertex_base_3.h --- cgal-4.7/include/CGAL/Mesh_vertex_base_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mesh_vertex_base_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -205,19 +205,19 @@ cache_validity = false; } - void set_c2t3_cache(const int i, const int j) + 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; } - int cached_number_of_incident_facets() const + std::size_t cached_number_of_incident_facets() const { return number_of_incident_facets_; } - int cached_number_of_components() const + std::size_t cached_number_of_components() const { return number_of_components_; } @@ -232,8 +232,8 @@ } private: - int number_of_incident_facets_; - int number_of_components_; // number of components in the adjacency + 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) @@ -272,11 +272,11 @@ } else { CGAL::read(is, dimension); } - CGAL_assertion(dimension >= 0); - CGAL_assertion(dimension < 4); - typename Vertex::Index index = - internal::Mesh_3::Read_mesh_domain_index()(dimension, is); 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()(v.in_dimension(), is); v.set_index(index); return is; } diff -Nru cgal-4.7/include/CGAL/Min_annulus_d.h cgal-4.8/include/CGAL/Min_annulus_d.h --- cgal-4.7/include/CGAL/Min_annulus_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Min_annulus_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include // here is how it works. We have d+2 variables: // R (big radius), r (small radius), c (center). The problem is @@ -256,7 +257,7 @@ typedef QP_access_by_index ::const_iterator, int> Point_by_index; - typedef std::binder2nd< std::divides > + typedef boost::binder2nd< std::divides > Divide; typedef std::vector Index_vector; @@ -331,7 +332,7 @@ solver->basic_original_variable_indices_begin(), CGAL::compose1_1( Point_by_index( points.begin()), - std::bind2nd( std::divides(), 2))); + boost::bind2nd( std::divides(), 2))); } Support_point_iterator @@ -342,7 +343,7 @@ solver->basic_original_variable_indices_end(), CGAL::compose1_1( Point_by_index( points.begin()), - std::bind2nd( std::divides(), 2))); + boost::bind2nd( std::divides(), 2))); } int number_of_inner_support_points() const { return static_cast(inner_indices.size());} @@ -589,7 +590,7 @@ bool check_dimension( std::size_t offset = 0) { return ( std::find_if( points.begin()+offset, points.end(), - CGAL::compose1_1( std::bind2nd( + CGAL::compose1_1( boost::bind2nd( std::not_equal_to(), d), tco.access_dimension_d_object())) == points.end()); } diff -Nru cgal-4.7/include/CGAL/Min_circle_2.h cgal-4.8/include/CGAL/Min_circle_2.h --- cgal-4.7/include/CGAL/Min_circle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Min_circle_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -58,7 +58,7 @@ Min_circle_2( InputIterator first, InputIterator last, bool randomize = false, - Random& random = default_random, + Random& random = get_default_random(), const Traits& traits = Traits()); Min_circle_2( const Traits& traits = Traits()); @@ -302,7 +302,7 @@ = false #endif , - Random& random = default_random, + Random& random = get_default_random(), const Traits& traits = Traits()) : tco( traits) { diff -Nru cgal-4.7/include/CGAL/Min_ellipse_2.h cgal-4.8/include/CGAL/Min_ellipse_2.h --- cgal-4.7/include/CGAL/Min_ellipse_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Min_ellipse_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -57,7 +57,7 @@ Min_ellipse_2( InputIterator first, InputIterator last, bool randomize = false, - Random& random = default_random, + Random& random = get_default_random(), const Traits& traits = Traits()); Min_ellipse_2( const Traits& traits = Traits()); @@ -328,7 +328,7 @@ = false #endif , - Random& random = default_random, + Random& random = get_default_random(), const Traits& traits = Traits()) : tco( traits) { diff -Nru cgal-4.7/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h cgal-4.8/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h --- cgal-4.7/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,7 +31,7 @@ #include #ifdef CGAL_HAS_THREADS -#include +#include #endif /// \file AABB_tree.h @@ -506,7 +506,7 @@ { #ifdef CGAL_HAS_THREADS //this ensures that this is done once at a time - boost::mutex::scoped_lock scoped_lock(kd_tree_mutex); + CGAL_SCOPED_LOCK(kd_tree_mutex); #endif clear_search_tree(); return accelerate_distance_queries_impl(first,beyond); @@ -623,8 +623,8 @@ // 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 + 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 { @@ -632,7 +632,7 @@ 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); + CGAL_SCOPED_LOCK(internal_tree_mutex); if(m_need_build) #endif const_cast< AABB_tree_with_join* >(this)->build(); @@ -1070,7 +1070,7 @@ 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); + CGAL_SCOPED_LOCK(kd_tree_mutex); #endif //we only redo computation only if needed diff -Nru cgal-4.7/include/CGAL/Min_sphere_d.h cgal-4.8/include/CGAL/Min_sphere_d.h --- cgal-4.7/include/CGAL/Min_sphere_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Min_sphere_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -325,7 +325,7 @@ points.push_front (p); // ensure postcondition of insert } else points.push_back (p); // just append p - if (support_end == points.end()) --support_end; + if (support_end == points.end()) --support_end; } template diff -Nru cgal-4.7/include/CGAL/Modular_arithmetic/Residue_type.h cgal-4.8/include/CGAL/Modular_arithmetic/Residue_type.h --- cgal-4.7/include/CGAL/Modular_arithmetic/Residue_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Modular_arithmetic/Residue_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -22,13 +22,12 @@ #define CGAL_RESIDUE_TYPE_H #include +#include #include + #include -#ifdef CGAL_HAS_THREADS -# include -#endif namespace CGAL { @@ -60,47 +59,51 @@ 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; - -#ifdef CGAL_HAS_THREADS - CGAL_EXPORT static boost::thread_specific_ptr prime_int_; - CGAL_EXPORT static boost::thread_specific_ptr prime_; - CGAL_EXPORT static boost::thread_specific_ptr 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 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(){ - if (prime_int_.get() == NULL) - init_class_for_thread(); - return *prime_int_.get(); + return prime_int_internal(); } + + static double& prime_internal() + { + CGAL_STATIC_THREAD_LOCAL_VARIABLE(double, prime, 67111067.0); + return prime; + } + static inline double get_prime(){ - if (prime_.get() == NULL) - init_class_for_thread(); - return *prime_.get(); + 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(){ - 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 + return prime_inv_internal(); + } + + + /* Quick integer rounding, valid if a<2^51. for double */ static inline @@ -108,7 +111,7 @@ // call CGAL::Protect_FPU_rounding pfr(CGAL_FE_TONEAREST) // before using modular arithmetic CGAL_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - return ( (a + CST_CUT) - CST_CUT); + return ( (a + get_static_CST_CUT()) - get_static_CST_CUT()); } /* Big modular reduction (e.g. after multiplication) */ @@ -195,15 +198,10 @@ 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 + prime_int_internal() = p; + prime_internal() = double(p); + prime_inv_internal() = 1.0 / double(p); + return old_prime; } @@ -229,6 +227,7 @@ } //! constructor of Residue, from long + Residue (long n) { x_= RES_soft_reduce (static_cast< double > (n % get_prime_int())); } diff -Nru cgal-4.7/include/CGAL/Monge_via_jet_fitting.h cgal-4.8/include/CGAL/Monge_via_jet_fitting.h --- cgal-4.7/include/CGAL/Monge_via_jet_fitting.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Monge_via_jet_fitting.h 2016-04-04 19:00:11.000000000 +0000 @@ -22,8 +22,8 @@ #include #include #include -#include #include +#include #include #include #ifdef CGAL_EIGEN3_ENABLED @@ -362,27 +362,30 @@ // 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]; + // 0 1 2 + // 3 4 + // 5 + CGAL::cpp11::array covariance = {{ xx,xy,xz,yy,yz,zz }}; + CGAL::cpp11::array eigen_values = {{ 0., 0., 0. }}; + CGAL::cpp11::array eigen_vectors = {{ 0., 0., 0. }}; // solve for eigenvalues and eigenvectors. - // eigen values are sorted in descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - CGAL::internal::eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + CGAL::Default_diagonalize_traits::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[i]; + m_pca_basis[i].first = eigen_values[2-i]; } - Vector_3 v1(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]); + + 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[6],eigen_vectors[7],eigen_vectors[8]); + 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, @@ -524,15 +527,17 @@ //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(W,2,evec,eval); + // diagonalization of weingarten + CGAL::cpp11::array W = {{ weingarten(0,0), weingarten(1,0), weingarten(1,1) }}; + CGAL::cpp11::array eval = {{ 0., 0. }}; + CGAL::cpp11::array evec = {{ 0., 0., 0., 0. }}; + + //eval in increasing order + CGAL::Default_diagonalize_traits::diagonalize_selfadjoint_covariance_matrix + (W, eval, evec); - Vector_3 d_max = evec[0]*Y + evec[1]*Z, - d_min = evec[2]*Y + evec[3]*Z; + 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], @@ -548,8 +553,8 @@ 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]); + monge_form.coefficients()[0] = L2D_NTconverter()(eval[1]); + monge_form.coefficients()[1] = L2D_NTconverter()(eval[0]); } //end else } diff -Nru cgal-4.7/include/CGAL/MP_Float.h cgal-4.8/include/CGAL/MP_Float.h --- cgal-4.7/include/CGAL/MP_Float.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/MP_Float.h 2016-04-04 19:00:12.000000000 +0000 @@ -116,9 +116,10 @@ class MP_Float { public: - typedef short limb; - typedef int limb2; - typedef double exponent_type; + typedef short limb; + typedef unsigned short unsigned_limb; + typedef int limb2; + typedef double exponent_type; typedef std::vector V; typedef V::const_iterator const_iterator; @@ -159,7 +160,8 @@ void split(limb2 l, limb & high, limb & low) { const unsigned int sizeof_limb=8*sizeof(limb); - const limb2 mask= ~( static_cast(-1) << sizeof_limb ); //0000ffff + 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(l & mask); //extract low bits from l @@ -186,6 +188,7 @@ 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. diff -Nru cgal-4.7/include/CGAL/Mpzf.h cgal-4.8/include/CGAL/Mpzf.h --- cgal-4.7/include/CGAL/Mpzf.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Mpzf.h 2016-04-04 19:00:12.000000000 +0000 @@ -75,30 +75,11 @@ #include #endif -#include +#include #include #include #include -// Standard way to deal with clang's __has_warning -// http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros -#ifndef __has_warning -# define __has_warning(x) 0 -#endif - -// If Clang has the warning -Wunused-local-typedef, then disable it temporarily. -#if BOOST_WORKAROUND(BOOST_VERSION, BOOST_TESTED_AT(105800)) && BOOST_CLANG && __has_warning("-Wunused-local-typedef") -# define CGAL_CLANG_PUSH_AND_IGNORE_UNUSED_LOCAL_TYPEDEF \ - _Pragma("clang diagnostic push") \ - _Pragma("clang diagnostic ignored \"-Wunused-local-typedef\"") -# define CGAL_CLANG_POP_DIAGNOSTIC _Pragma("clang diagnostic pop") -#else -# define CGAL_CLANG_PUSH_AND_IGNORE_UNUSED_LOCAL_TYPEDEF -# define CGAL_CLANG_POP_DIAGNOSTIC -#endif - -CGAL_CLANG_PUSH_AND_IGNORE_UNUSED_LOCAL_TYPEDEF - #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4146 4244 4267 4800) @@ -108,11 +89,6 @@ // 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 @@ -178,7 +154,7 @@ 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*)); + CGAL_static_assertion(sizeof(T) >= sizeof(T*)); static T& data () { static CGAL_MPZF_TLS T data_ = 0; return data_; @@ -193,7 +169,7 @@ 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*)); + CGAL_static_assertion(sizeof(T) >= sizeof(T*)); struct cleaner { T data_ = 0; ~cleaner(){ @@ -442,7 +418,7 @@ } int e1 = (int)dexp+13; // FIXME: make it more general! But not slower... - BOOST_STATIC_ASSERT(GMP_NUMB_BITS == 64); + CGAL_static_assertion(GMP_NUMB_BITS == 64); int e2 = e1 % 64; exp = e1 / 64 - 17; // 52+1023+13==17*64 ? @@ -883,6 +859,7 @@ 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; @@ -1147,14 +1124,38 @@ } +/* There isn't much Eigen can do with such a type, + * mostly this is here for IsInteger to protect people. + */ +namespace Eigen { + template struct NumTraits; + template<> struct NumTraits + { + typedef CGAL::Mpzf Real; + /* Should this be Quotient? 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 -CGAL_CLANG_POP_DIAGNOSTIC - -#undef CGAL_CLANG_PUSH_AND_IGNORE_UNUSED_LOCAL_TYPEDEF -#undef CGAL_CLANG_POP_DIAGNOSTIC - #endif // GMP_NUMB_BITS == 64 #endif // CGAL_MPZF_H diff -Nru cgal-4.7/include/CGAL/mst_orient_normals.h cgal-4.8/include/CGAL/mst_orient_normals.h --- cgal-4.7/include/CGAL/mst_orient_normals.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/mst_orient_normals.h 2016-04-04 19:00:12.000000000 +0000 @@ -153,7 +153,7 @@ typedef typename MST_graph::vertex_descriptor vertex_descriptor; // Gets source normal - vertex_descriptor source_vertex = boost::source(edge, mst_graph); + 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 @@ -161,7 +161,7 @@ #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); + 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 @@ -394,9 +394,9 @@ // Add edge typename boost::graph_traits::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); + boost::tie(e, inserted) = add_edge(vertex(it_index, riemannian_graph), + vertex(neighbor_index, riemannian_graph), + riemannian_graph); CGAL_point_set_processing_assertion(inserted); // -> -> @@ -472,7 +472,7 @@ CGAL_point_set_processing_precondition(first != beyond); // Number of input points - const std::size_t num_input_points = boost::num_vertices(riemannian_graph); + 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"); @@ -484,7 +484,7 @@ 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) )); + .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"); @@ -514,9 +514,9 @@ // 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); + add_edge(vertex(predecessor[i], mst_graph), + vertex(i, mst_graph), + mst_graph); } } @@ -631,7 +631,7 @@ Propagate_normal_orientation 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 + 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[]. @@ -639,7 +639,7 @@ 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); + typename MST_graph::vertex_descriptor v = vertex(it_index, mst_graph); if (mst_graph[v].is_oriented) oriented_points.push_back(*it); else diff -Nru cgal-4.7/include/CGAL/mutex.h cgal-4.8/include/CGAL/mutex.h --- cgal-4.7/include/CGAL/mutex.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/mutex.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HAS_THREADS +#ifdef CGAL_CAN_USE_CXX11_MUTEX +#include +#define CGAL_MUTEX std::mutex +#define CGAL_SCOPED_LOCK(M) std::unique_lock scoped_lock(M) +#else +#include +#define CGAL_MUTEX boost::mutex +#define CGAL_SCOPED_LOCK(M) boost::mutex::scoped_lock scoped_lock(M) +#endif +#endif +#endif // CGAL_MUTEX_H diff -Nru cgal-4.7/include/CGAL/Nef_2/iterator_tools.h cgal-4.8/include/CGAL/Nef_2/iterator_tools.h --- cgal-4.7/include/CGAL/Nef_2/iterator_tools.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_2/iterator_tools.h 2016-04-04 19:00:12.000000000 +0000 @@ -105,7 +105,8 @@ template std::string PH(H h) -{ if (h == H()) return "nil"; return h->debug(); } +{ if (h == H()) return "nil"; + return h->debug(); } } //namespace CGAL #endif // CGAL_ITERATORTOOLS_H diff -Nru cgal-4.7/include/CGAL/Nef_2/PM_point_locator.h cgal-4.8/include/CGAL/Nef_2/PM_point_locator.h --- cgal-4.7/include/CGAL/Nef_2/PM_point_locator.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_2/PM_point_locator.h 2016-04-04 19:00:12.000000000 +0000 @@ -174,8 +174,9 @@ 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) ) + if ( K.strictly_ordered_ccw(d_res, direction(el), d) ){ e_res = el; d_res = direction(e_res); + } } CGAL_NEF_TRACEN(" determined "< abs() const /*{\Mop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| otherwise.}*/ - { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; } + { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; } NT content() const @@ -692,7 +692,7 @@ Polynomial abs() const /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| otherwise.}*/ - { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; } + { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; } int content() const /*{\Xop returns the content of |\Mvar| (the gcd of its coefficients). @@ -993,7 +993,7 @@ Polynomial abs() const /*{\Xop returns |-\Mvar| if |\Mvar.sign()==NEGATIVE| and |\Mvar| otherwise.}*/ - { if ( sign()==CGAL::NEGATIVE ) return -*this; return *this; } + { return ( sign()==CGAL::NEGATIVE ) ? - *this : *this; } double content() const @@ -1751,7 +1751,7 @@ std::ostream& operator << (std::ostream& os, const Polynomial& p) { int i; - switch( os.iword(CGAL::IO::mode) ) + switch( get_mode(os) ) { case CGAL::IO::ASCII : os << p.degree() << ' '; @@ -1787,7 +1787,7 @@ char ch; NT c; bool pretty = false; - switch( is.iword(CGAL::IO::mode) ) { + switch( get_mode(is) ) { case CGAL::IO::ASCII : case CGAL::IO::PRETTY : is >> ch; @@ -1972,12 +1972,8 @@ } //namespace CGAL - - - - - - - +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY #endif // CGAL_NEF_2_POLYNOMIAL_H diff -Nru cgal-4.7/include/CGAL/Nef_2/Polynomial_impl.h cgal-4.8/include/CGAL/Nef_2/Polynomial_impl.h --- cgal-4.7/include/CGAL/Nef_2/Polynomial_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_2/Polynomial_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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::euclidean_div( + const Polynomial& f, const Polynomial& g, + Polynomial& q, Polynomial& r) +{ + r = f; r.copy_on_write(); + int rd=r.degree(), gd=g.degree(), qd; + if ( rd < gd ) { q = Polynomial(int(0)); } + else { qd = rd-gd+1; q = Polynomial(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::pseudo_div( + const Polynomial& f, const Polynomial& g, + Polynomial& q, Polynomial& r, int& D) +{ + CGAL_NEF_TRACEN("pseudo_div "<(0); r = f; D = 1; + CGAL_postcondition(Polynomial(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( 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 res = Polynomial(D)*f; + CGAL_NEF_TRACEN(" pseudo_div start "<= 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(D)*f==q*g+r); + CGAL_NEF_TRACEN(" returning "< Polynomial::gcd( + const Polynomial& p1, const Polynomial& p2) +{ CGAL_NEF_TRACEN("gcd("<(int(1)); + else return p2.abs(); + } + if ( p2.is_zero() ) + return p1.abs(); + + Polynomial f1 = p1.abs(); + Polynomial f2 = p2.abs(); + int f1c = f1.content(), f2c = f2.content(); + f1 /= f1c; f2 /= f2c; + int F = CGAL::gcd(f1c,f2c); + Polynomial q,r; int M=1,D; + bool first = true; + while ( ! f2.is_zero() ) { + Polynomial::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(F)*f1.abs(); +} + + + + +CGAL_INLINE_FUNCTION +void Polynomial::euclidean_div( + const Polynomial& f, const Polynomial& g, + Polynomial& q, Polynomial& r) +{ + r = f; r.copy_on_write(); + int rd=r.degree(), gd=g.degree(), qd; + if ( rd < gd ) { q = Polynomial(double(0)); } + else { qd = rd-gd+1; q = Polynomial(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::pseudo_div( + const Polynomial& f, const Polynomial& g, + Polynomial& q, Polynomial& r, double& D) +{ + CGAL_NEF_TRACEN("pseudo_div "<(0); r = f; D = 1; + CGAL_postcondition(Polynomial(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( std::size_t(delta) ); + double G = g[gd]; // highest order coeff of g + D = G; while (--delta) D*=G; // D = G^delta + Polynomial res = Polynomial(D)*f; + CGAL_NEF_TRACEN(" pseudo_div start "<= 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(D)*f==q*g+r); + CGAL_NEF_TRACEN(" returning "< Polynomial::gcd( + const Polynomial& p1, const Polynomial& p2) +{ CGAL_NEF_TRACEN("gcd("<(double(1)); + else return p2.abs(); + } + if ( p2.is_zero() ) + return p1.abs(); + + Polynomial f1 = p1.abs(); + Polynomial f2 = p2.abs(); + double f1c = f1.content(), f2c = f2.content(); + f1 /= f1c; f2 /= f2c; + Polynomial q,r; double M=1,D; + bool first = true; + while ( ! f2.is_zero() ) { + Polynomial::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(1)*f1.abs(); +} + + +} // end namespace Nef +}//end namespace CGAL diff -Nru cgal-4.7/include/CGAL/Nef_3/Pluecker_line_3.h cgal-4.8/include/CGAL/Nef_3/Pluecker_line_3.h --- cgal-4.7/include/CGAL/Nef_3/Pluecker_line_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_3/Pluecker_line_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -321,7 +321,7 @@ template std::ostream& operator<<(std::ostream& os, const Pluecker_line_3& l) { - switch( os.iword(CGAL::IO::mode) ) { + switch( get_mode(os) ) { case CGAL::IO::ASCII : for (unsigned i=0; i<6; ++i) os << l[i] << " "; return os; diff -Nru cgal-4.7/include/CGAL/Nef_3/SNC_external_structure.h cgal-4.8/include/CGAL/Nef_3/SNC_external_structure.h --- cgal-4.7/include/CGAL/Nef_3/SNC_external_structure.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_3/SNC_external_structure.h 2016-04-04 19:00:12.000000000 +0000 @@ -123,21 +123,64 @@ } struct Plane_lt { - template - bool operator()(const CGAL::Plane_3& h1, - const CGAL::Plane_3& 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; - } + template + bool operator()(const CGAL::Plane_3& h1, + const CGAL::Plane_3& 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 bool operator()(const CGAL::Plane_3& h1, diff -Nru cgal-4.7/include/CGAL/Nef_3/SNC_io_parser.h cgal-4.8/include/CGAL/Nef_3/SNC_io_parser.h --- cgal-4.7/include/CGAL/Nef_3/SNC_io_parser.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_3/SNC_io_parser.h 2016-04-04 19:00:12.000000000 +0000 @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Michael Seel // Miguel Granados @@ -123,16 +123,16 @@ template 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()); @@ -145,12 +145,12 @@ 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 + else return 1; } if(vec1.z() < vec2.z()) @@ -158,7 +158,7 @@ else return 1; } - + Vector_3 minus(-1,0,0); FT sk1(minus*vec1), sk2(minus*vec2); if((sk1 >= FT(0) && sk2 <= FT(0)) || @@ -172,11 +172,11 @@ 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) && diffFT(0))) return -1; - else + else return 1; } @@ -186,30 +186,30 @@ template class sort_vertices : public SNC_decorator { - + typedef T SNC_structure; typedef CGAL::SNC_decorator 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 class sort_edges : public SNC_decorator { - - typedef T SNC_structure; + + typedef T SNC_structure; typedef CGAL::SNC_decorator 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 SORT(*this->sncp()); if(e1->source() != e2->source()) @@ -220,8 +220,8 @@ template class sort_facets : public SNC_decorator { - - typedef T SNC_structure; + + typedef T SNC_structure; typedef SNC_decorator Base; typedef typename T::Halffacet_handle Halffacet_handle; typedef typename T::SHalfedge_handle SHalfedge_handle; @@ -230,25 +230,25 @@ 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(); + return p1.b() < p2.b(); else if(p1.c() != p2.c()) - return 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 SORT(*this->sncp()); if(se1->source()->source() != se2->source()->source()) return SORT(se1->source()->source(), se2->source()->source()); @@ -258,14 +258,14 @@ CGAL_assertion(se1->source()->source() != se2->source()->source()); return SORT(se1->source()->source(), se2->source()->source()); - + } }; template class sort_sedges : public SNC_decorator { - - typedef T SNC_structure; + + typedef T SNC_structure; typedef CGAL::SNC_decorator Base; typedef CGAL::SM_decorator SM_decorator; typedef typename T::Vertex_handle Vertex_handle; @@ -274,12 +274,12 @@ 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 SORT(*this->sncp()); - CGAL_NEF_TRACEN(" center verices: " << se1->source()->source()->point() << + 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()); @@ -291,23 +291,23 @@ return vec1.a() < vec2.a(); else if(vec1.b() != vec2.b()) return vec1.b() < vec2.b(); - return vec1.c() < vec2.c(); + return vec1.c() < vec2.c(); } else return SORT(se1->source()->twin()->source(), se2->source()->twin()->source()); } - if(SORT(se1->twin()->source()->twin()->source(), + if(SORT(se1->twin()->source()->twin()->source(), se1->source()->twin()->source())) se1 = se1->twin(); - if(SORT(se2->twin()->source()->twin()->source(), + if(SORT(se2->twin()->source()->twin()->source(), se2->source()->twin()->source())) se2 = se2->twin(); - CGAL_NEF_TRACEN(" ssources " << se1->source()->twin()->source()->point() + 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() << + 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()); @@ -315,26 +315,26 @@ 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(); + return vec1.c() < vec2.c(); } }; template class sort_sloops : public SNC_decorator { - - typedef T SNC_structure; + + typedef T SNC_structure; typedef CGAL::SNC_decorator 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 SORTV(*this->sncp()); @@ -347,8 +347,8 @@ template class sort_sface_cycle_entries : public SNC_decorator { - - typedef T SNC_structure; + + typedef T SNC_structure; typedef CGAL::SNC_decorator Base; typedef typename T::SM_decorator SM_decorator; typedef typename T::Object_handle Object_handle; @@ -358,10 +358,10 @@ 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; @@ -370,10 +370,10 @@ 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"); - + CGAL_error_msg("wrong handle"); + if(se1 != SHalfedge_handle() && se2 == SHalfedge_handle()) return true; @@ -408,7 +408,7 @@ else if(vec1.y() != vec2.y()) return vec1.y() < vec2.y(); else if(vec1.z() != vec2.z()) - return vec1.z() < vec2.z(); + return vec1.z() < vec2.z(); } CGAL_assertion(sv1 != SVertex_handle() && sv2 != SVertex_handle()); @@ -419,7 +419,7 @@ template class sort_sfaces : public SNC_decorator { - + typedef T SNC_structure; typedef CGAL::SNC_decorator Base; typedef typename T::SM_decorator SM_decorator; @@ -432,16 +432,16 @@ 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 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()); @@ -454,7 +454,7 @@ Vector_3 plus(1,0,0); SFace_cycle_iterator fc; - + CGAL_NEF_TRACEN(" sface 1"); SHalfedge_handle se1; @@ -464,7 +464,7 @@ SHalfedge_handle se(fc); SHalfedge_around_sface_circulator ec(se),ee(se); CGAL_For_all(ec,ee) { - CGAL_NEF_TRACEN(" " << ec->source()->point() << + CGAL_NEF_TRACEN(" " << ec->source()->point() << " | " << ec->circle().orthogonal_vector()); if(ml(ec, se1) == -1) se1 = ec; @@ -477,15 +477,15 @@ } 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() << + CGAL_For_all(ec,ee) { + CGAL_NEF_TRACEN(" " << ec->source()->point() << " | " << ec->circle().orthogonal_vector()); if(ml(ec, se2) == -1) se2 = ec; @@ -496,15 +496,15 @@ else CGAL_assertion(fc.is_svertex()); } - - CGAL_NEF_TRACEN(" sedge cycles existing? " << (se1 != SHalfedge_handle()) + + 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; - + return false; + if(se1 == SHalfedge_handle() && se2 == SHalfedge_handle()) { Vector_3 vec1 = sl1->circle().orthogonal_vector(); Vector_3 vec2 = sl2->circle().orthogonal_vector(); @@ -514,14 +514,14 @@ else if(vec1.y() != vec2.y()) return vec1.y() < vec2.y(); else if(vec1.z() != vec2.z()) - return 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() << + 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() << + 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)) { @@ -535,19 +535,19 @@ template class sort_volumes : public SNC_decorator { - + typedef T SNC_structure; typedef CGAL::SNC_decorator 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()); + SFace_handle sf1 = SFace_handle(c1->shells_begin()); + SFace_handle sf2 = SFace_handle(c2->shells_begin()); sort_sfaces SORT(*this->sncp()); return SORT(sf1, sf2); @@ -556,7 +556,7 @@ template 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; @@ -565,21 +565,21 @@ 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"); - + CGAL_error_msg("wrong handle"); + if(se1 != SHalfedge_handle() && se2 != SHalfedge_handle()) { sort_vertices SORT(*this->sncp()); return SORT(se1->source()->source(), se2->source()->source()); @@ -590,7 +590,7 @@ if(se2 != SHalfedge_handle()) return false; - CGAL_assertion(sl1 != SHalfloop_handle() && + CGAL_assertion(sl1 != SHalfloop_handle() && sl2 != SHalfloop_handle()); SM_decorator SD(&*sl1->incident_sface()->center_vertex()); @@ -602,21 +602,21 @@ else if(vec1.y() != vec2.y()) return vec1.y() < vec2.y(); else - return vec1.z() < vec2.z(); + return vec1.z() < vec2.z(); } }; template 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); @@ -632,7 +632,7 @@ template struct find_minimal_sface_of_shell : public SNC_decorator { - + typedef T SNC_structure; typedef CGAL::SNC_decorator Base; typedef typename T::Vertex_handle Vertex_handle; @@ -646,11 +646,11 @@ SFace_visited_hash& Done; SFace_handle sf_min; sort_sfaces SORT; - - find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi) + + find_minimal_sface_of_shell(T& D, SFace_visited_hash& Vi) : Base(D), Done(Vi), SORT(D) {} - - void visit(SFace_handle h) { + + void visit(SFace_handle h) { Done[h]=true; if(sf_min == SFace_handle()) sf_min = h; @@ -659,7 +659,7 @@ sf_min = h; } } - + void visit(Vertex_handle ) {} void visit(Halfedge_handle ) {} void visit(Halffacet_handle ) {} @@ -884,32 +884,32 @@ 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_iterator Vertex_iterator; typedef typename SNC_structure::Vertex_handle Vertex_handle; - typedef typename SNC_structure::Halfedge_iterator Halfedge_iterator; + 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_iterator Halffacet_iterator; typedef typename SNC_structure::Halffacet_handle Halffacet_handle; - typedef typename SNC_structure::Volume_iterator Volume_iterator; + 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_iterator SVertex_iterator; typedef typename SNC_structure::SVertex_handle SVertex_handle; - typedef typename SNC_structure::SHalfedge_iterator SHalfedge_iterator; + 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_iterator SFace_iterator; typedef typename SNC_structure::SFace_handle SFace_handle; - typedef typename SNC_structure::SHalfloop_iterator SHalfloop_iterator; + 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_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 + typedef typename SNC_structure::SHalfedge_around_svertex_circulator SHalfedge_around_svertex_circulator; - typedef typename SNC_structure::SHalfedge_around_sface_circulator + typedef typename SNC_structure::SHalfedge_around_sface_circulator SHalfedge_around_sface_circulator; - typedef typename SNC_structure::SHalfedge_around_facet_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; @@ -939,7 +939,7 @@ bool sorted; bool addInfiBox; - CGAL::Object_index VI; + CGAL::Object_index VI; CGAL::Object_index EI; CGAL::Object_index FI; CGAL::Object_index CI; @@ -957,7 +957,7 @@ std::vector Edge_of; std::vector Halffacet_of; std::vector Volume_of; - std::vector SVertex_of; + std::vector SVertex_of; std::vector SEdge_of; std::vector SLoop_of; std::vector SFace_of; @@ -965,22 +965,22 @@ public: SNC_io_parser(std::istream& is, SNC_structure& W); - SNC_io_parser(std::ostream& os, 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 VI(v,verbose); } + std::string index(Halfedge_iterator e) const { return EI(e,verbose); } - std::string index(Halffacet_iterator f) const + std::string index(Halffacet_iterator f) const { return FI(f,verbose); } - std::string index(Volume_iterator c) const + std::string index(Volume_iterator c) const { return CI(c,verbose); } - std::string index(SHalfedge_iterator e) const + std::string index(SHalfedge_iterator e) const { return SEI(e,verbose); } - std::string index(SHalfloop_iterator l) const + std::string index(SHalfloop_iterator l) const { return SLI(l,verbose); } - std::string index(SFace_iterator f) const + std::string index(SFace_iterator f) const { return SFI(f,verbose); } std::string index(Object_iterator o) const { if( o == 0 ) @@ -1050,44 +1050,44 @@ }; template -SNC_io_parser::SNC_io_parser(std::istream& is, SNC_structure& W) : - Base(W), in(is), out(std::cout) { +SNC_io_parser::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; + verbose = false; } template -SNC_io_parser::SNC_io_parser(std::ostream& os, SNC_structure& W, - bool sort, bool reduce_) : +SNC_io_parser::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()), + 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); +{ + 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; + Vertex_iterator vi; CGAL_forall_vertices(vi, *this->sncp()) { VL.push_back(vi); if(sorted) { vi->point() = normalized(vi->point()); - if(vi->has_shalfloop() && + if(vi->has_shalfloop() && sort_sloops(*this->sncp())(vi->shalfloop()->twin(), vi->shalfloop())) vi->shalfloop() = vi->shalfloop()->twin(); @@ -1095,7 +1095,7 @@ } if(sorted) { VL.sort(sort_vertices(*this->sncp())); - } + } if(reduce) for(int k=0; k<4; k++){ VL.pop_front(); VL.pop_back(); @@ -1104,9 +1104,9 @@ typename std::list::iterator vl; for(vl = VL.begin(); vl != VL.end(); vl++) VI[*vl] = i++; - + SM_decorator SD; - Halfedge_iterator ei; + Halfedge_iterator ei; CGAL_forall_halfedges(ei, *this->sncp()) { EL.push_back(ei); if(sorted) { @@ -1133,12 +1133,12 @@ for(el = EL.begin(); el != EL.end(); el++) EI[*el] = i++; - Halffacet_iterator fi; + Halffacet_iterator fi; CGAL_forall_halffacets(fi, *this->sncp()){ if(sorted) { sort_sedges sortSE(*this->sncp()); Halffacet_cycle_iterator fc; - for(fc = fi->facet_cycles_begin(); + for(fc = fi->facet_cycles_begin(); fc != fi->facet_cycles_end(); ++fc) { if(fc.is_shalfedge()) { SHalfedge_handle se(fc); @@ -1170,7 +1170,7 @@ for(fl = FL.begin(); fl != FL.end(); fl++) FI[*fl] = i++; - SHalfedge_iterator sei; + SHalfedge_iterator sei; CGAL_forall_shalfedges(sei, *this->sncp()) { SEL.push_back(sei); if(sorted) @@ -1186,7 +1186,7 @@ for(sel = SEL.begin(); sel != SEL.end(); sel++) SEI[*sel] = i++; - SHalfloop_iterator sli; + SHalfloop_iterator sli; CGAL_forall_shalfloops(sli, *this->sncp()) { SLL.push_back(sli); if(sorted) @@ -1198,7 +1198,7 @@ for(sll = SLL.begin(); sll != SLL.end(); sll++) SLI[*sll] = i++; - SFace_iterator sfi; + SFace_iterator sfi; CGAL_forall_sfaces(sfi, *this->sncp()) { if(sorted) { SFace_cycle_iterator fc; @@ -1214,7 +1214,7 @@ se->source()->twin()->source()->point())) se = cb; } - else + else if(lexicographically_xyz_smaller(cb->twin()->source()->twin()->source()->point(), se->twin()->source()->twin()->source()->point())) se = cb; @@ -1237,7 +1237,7 @@ for(sfl = SFL.begin(); sfl != SFL.end(); sfl++) SFI[*sfl] = i++; - Volume_iterator ci; + Volume_iterator ci; CGAL::Unique_hash_map Done(false); find_minimal_sface_of_shell findMinSF(*this->sncp(),Done); CGAL_forall_volumes(ci, *this->sncp()) { @@ -1249,10 +1249,10 @@ *it = make_object(findMinSF.minimal_sface()); } ci->shell_entry_objects().sort(sort_shell_entries((Base)*this)); - } + } CL.push_back(ci); } - + if(sorted) CL.sort(sort_volumes(*this->sncp())); if(reduce) CL.pop_front(); @@ -1273,9 +1273,9 @@ template bool SNC_io_parser::check_sep(const char* sep) const { - char c; + char c; do in.get(c); while (isspace(c)); - while (*sep != '\0') { + while (*sep != '\0') { if (*sep != c) { in.putback(c); return false; @@ -1283,7 +1283,7 @@ ++sep; in.get(c); } in.putback(c); - return true; + return true; } template @@ -1295,7 +1295,7 @@ template void SNC_io_parser::print() const -{ +{ out << "Selective Nef Complex" << std::endl; if(this->is_extended_kernel() && (!reduce || !this->is_bounded())) out << "extended" << std::endl; @@ -1309,46 +1309,46 @@ out << "shalfloops " << SLL.size() << std::endl; out << "sfaces " << SFL.size() << std::endl; - if (verbose) + if (verbose) out << "/* Vertex: index { svs sve ses see sfs sfe sl," << " mark, point } */\n"; typename std::list::const_iterator v; for(v=VL.begin();v!=VL.end();v++) print_vertex(*v); - if (verbose) + if (verbose) out << "/* Edge: index { twin, source, isolated incident_object," << " mark } */\n"; typename std::list::const_iterator e; for(e=EL.begin();e!=EL.end();e++) print_edge(*e); - if (verbose) + if (verbose) out << "/* Facet: index { twin, fclist, ivlist, volume | plane } mark */\n"; typename std::list::const_iterator f; for(f=FL.begin();f!=FL.end();f++) print_facet(*f); - if (verbose) + if (verbose) out << "/* Volume: index { shlist } mark */\n"; typename std::list::const_iterator c; for(c=CL.begin();c!=CL.end();c++) print_volume(*c); - if (verbose) + if (verbose) out << "/* SEdge: index { twin, sprev, snext, source, sface," << " prev, next, facet } */\n"; typename std::list::const_iterator se; for(se=SEL.begin();se!=SEL.end();se++) print_sedge(*se); - if (verbose) + if (verbose) out << "/* SLoop: index { twin, sface, facet } */" << std::endl; typename std::list::const_iterator sl; for(sl=SLL.begin();sl!=SLL.end();sl++) print_sloop(*sl); - if (verbose) + if (verbose) out << "/* SFace: index { fclist, ivlist, sloop, volume } */" << std::endl; typename std::list::const_iterator sf; for(sf=SFL.begin();sf!=SFL.end();sf++) @@ -1359,13 +1359,13 @@ template void SNC_io_parser::read() -{ - if ( !check_sep("Selective Nef Complex") ) +{ + 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)) ) + 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."); @@ -1407,13 +1407,13 @@ if (!read_vertex(*vi)) CGAL_error_msg("SNC_io_parser::read: error in node line"); } - + typename std::vector::iterator ei; for(ei=Edge_of.begin(); ei!=Edge_of.end(); ++ei) { if (!read_edge(*ei)) CGAL_error_msg("SNC_io_parser::read: error in edge line"); } - + typedef typename std::vector::iterator vhf_iterator; vhf_iterator fi; for(fi=Halffacet_of.begin(); fi!=Halffacet_of.end(); ++fi) { @@ -1442,7 +1442,7 @@ } SNC_constructor C(*this->sncp()); - C.assign_indices(); + C.assign_indices(); } @@ -1452,17 +1452,17 @@ SM_decorator SD(&*v); out << index(v) << " { "; if(sorted) { - - output_sorted_indexes(v->svertices_begin(), + + output_sorted_indexes(v->svertices_begin(), v->svertices_end(), EI); - output_sorted_indexes(v->shalfedges_begin(), + output_sorted_indexes(v->shalfedges_begin(), v->shalfedges_end(), SEI); - output_sorted_indexes(v->sfaces_begin(), + output_sorted_indexes(v->sfaces_begin(), v->sfaces_end(), SFI); out << index(SD.shalfloop()) << " | "; } else { - out + out << index(v->svertices_begin()) << " " << index(v->svertices_last()) << ", " << index(v->shalfedges_begin()) << " " @@ -1473,7 +1473,7 @@ } if(reduce) { Geometry_io:: - print_point(out, Infi_box::standard_point(v->point())); + print_point(out, Infi_box::standard_point(v->point())); } else Geometry_io::print_point(out, v->point()); @@ -1492,7 +1492,7 @@ 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; @@ -1515,12 +1515,12 @@ in >> hx >> hy >> hz >> hw; vh->point() = Point_3(hx,hy,hz,hw); #else - vh->point() = + vh->point() = Geometry_io::template read_point(in); #endif OK = OK && test_string("}"); in >> vh->mark(); - + return OK; } @@ -1536,7 +1536,7 @@ if(reduce) { Standard_point sp = Infi_box::standard_point(e->point()); Geometry_io:: - print_vector(out, sp-CGAL::ORIGIN); + print_vector(out, sp-CGAL::ORIGIN); } else Geometry_io:: @@ -1557,10 +1557,10 @@ 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(","); @@ -1571,7 +1571,7 @@ if(index == 0) { in >> index; eh->out_sedge() = SEdge_of[index]; - } else { + } else { in >> index; eh->incident_sface() = SFace_of[index]; } @@ -1580,7 +1580,7 @@ in >> hx >> hy >> hz >> hw; eh->point() = Sphere_point(hx,hy,hz); #else - eh->point() = + eh->point() = Geometry_io::template read_point(in); #endif OK = OK && test_string("}"); @@ -1592,9 +1592,9 @@ template void SNC_io_parser::print_facet(Halffacet_handle f) const { // syntax: index { twin, fclist, ivlist, volume | plane } mark - out << index(f) << " { "; + out << index(f) << " { "; out << index(f->twin()) << ", "; - Halffacet_cycle_iterator it; + Halffacet_cycle_iterator it; CGAL_forall_facet_cycles_of(it,f) if ( it.is_shalfedge() ) out << index(SHalfedge_handle(it)) << ' '; out << ", "; @@ -1623,11 +1623,11 @@ 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); @@ -1635,7 +1635,7 @@ fh->boundary_entry_objects().push_back(make_object(SEdge_of[index])); in >> cc; } - + in >> cc; while(isdigit(cc)) { in.putback(cc); @@ -1643,7 +1643,7 @@ 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("|"); @@ -1651,7 +1651,7 @@ in >> a >> b >> c >> d; fh->plane() = Plane_3(a,b,c,d); #else - fh->plane() = + fh->plane() = Geometry_io:: template read_plane(in); #endif @@ -1664,9 +1664,9 @@ template void SNC_io_parser::print_volume(Volume_handle c) const { // syntax: index { shlist } mark - out << index(c) << " { "; + out << index(c) << " { "; Shell_entry_iterator it; - CGAL_forall_shells_of(it,c) + 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; @@ -1679,10 +1679,10 @@ bool OK = true; int index; char cc; - + in >> index; OK = OK && test_string("{"); - + in >> cc; while(isdigit(cc)) { in.putback(cc); @@ -1697,14 +1697,14 @@ template void SNC_io_parser:: -print_sedge(SHalfedge_handle e) const { +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->twin()) << ", " << index(e->sprev()) << ", " << index(e->snext()) << ", " << index(e->source()) << ", " << index(e->incident_sface()) << ", " << index(e->prev()) << ", " << index(e->next()) << ", " - << index(e->facet()) + << index(e->facet()) << " | "; if(reduce) { Geometry_io:: @@ -1716,9 +1716,9 @@ out << " } " << e->mark(); #ifdef CGAL_NEF_OUTPUT_INDEXES - out << " " << e->get_forward_index() + out << " " << e->get_forward_index() << " " << e->get_backward_index(); -#endif +#endif out << std::endl; } @@ -1730,10 +1730,10 @@ 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(","); @@ -1762,7 +1762,7 @@ in >> a >> b >> c >> d; seh->circle() = Sphere_circle(Plane_3(a,b,c,d)); #else - seh->circle() = + seh->circle() = Geometry_io:: template read_plane(in); #endif @@ -1778,8 +1778,8 @@ { // syntax: index { twin, sface, facet | circle } mark out << index(l) << " { " << index(l->twin()) << ", " << index(l->incident_sface()) << ", " - << index(l->facet()) - << " | "; + << index(l->facet()) + << " | "; if(reduce) { Geometry_io:: print_plane(out, Infi_box::standard_plane(l->circle())); @@ -1802,7 +1802,7 @@ in >> index; OK = OK && test_string("{"); - + in >> index; slh->twin() = SLoop_of[index]; OK = OK && test_string(","); @@ -1811,18 +1811,18 @@ OK = OK && test_string(","); in >> index; slh->facet() = Halffacet_of[index]; - OK = OK && test_string("|"); + 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:: - template read_plane(in); + template read_plane(in); #endif - OK = OK && test_string("}"); + OK = OK && test_string("}"); in >> slh->mark(); - + return OK; } @@ -1831,7 +1831,7 @@ 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()) << ", "; + 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)) << ' '; @@ -1854,11 +1854,11 @@ 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); @@ -1868,7 +1868,7 @@ SD.link_as_face_cycle(SEdge_of[index],sfh); in >> cc; } - + in >> cc; while(isdigit(cc)) { in.putback(cc); @@ -1886,36 +1886,36 @@ 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("}"); + OK = OK && test_string("}"); in >> sfh->mark(); - + return OK; } template void SNC_io_parser::print_local_graph(Vertex_handle v) const { SM_decorator D(&*v); - out << "Local Graph " + out << "Local Graph " << D.number_of_vertices() << " " << D.number_of_edges() << " " << D.number_of_loops() << " " << D.number_of_faces() << " " << std::endl; - if (verbose) + 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) + 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) + if (verbose) out << "/* index { twin, sface, facet } */" << std::endl; - if ( D.has_sloop() ) + if ( D.has_sloop() ) { print_sloop(D.loop()); print_sloop(twin(D.loop())); } - if (verbose) + if (verbose) out << "/* index { fclist, ivlist, sloop, volume } */" << std::endl; SFace_iterator fit; CGAL_forall_sfaces_of(fit,v) print_sface(fit); @@ -1945,10 +1945,10 @@ 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->mark() = 1; vh->sncp() = this->sncp(); } - + int seOff[3] = {0, 1, 3}; int twinIdx[24] = { 3, 7,14, 0,10,17, @@ -1958,14 +1958,14 @@ 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 : + case 0 : hx = i % 6 ? 1 : -1; hy = hz = 0; break; @@ -1981,7 +1981,7 @@ 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) { @@ -2005,11 +2005,11 @@ 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, @@ -2040,10 +2040,10 @@ -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)]; @@ -2067,14 +2067,14 @@ 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)], + 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]; diff -Nru cgal-4.7/include/CGAL/Nef_3/SNC_ray_shooter.h cgal-4.8/include/CGAL/Nef_3/SNC_ray_shooter.h --- cgal-4.7/include/CGAL/Nef_3/SNC_ray_shooter.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_3/SNC_ray_shooter.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Miguel Granados -// Susan Hert -// Lutz Kettner -#ifndef CGAL_SNC_RAY_SHOOTER_H -#define CGAL_SNC_RAY_SHOOTER_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef SM_VISUALIZOR -#include -#endif // SM_VISUALIZOR -#include -#include -#undef CGAL_NEF_DEBUG -#define CGAL_NEF_DEBUG 37 -#include - -#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO -#include -#endif - -namespace CGAL { - -// ---------------------------------------------------------------------------- -// SNC_ray_shooting -// ---------------------------------------------------------------------------- - -/*{\Manpage{SNC_ray_shooting}{SNC}{ray shoot functionality}{O}}*/ - -template -class SNC_ray_shooter : public SNC_decorator -{ - -protected: - typedef typename SNC_decorator::SNC_structure SNC_structure; - typedef SNC_ray_shooter 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_point_locator; - typedef SNC_intersection 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 "<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 "<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 -Nru cgal-4.7/include/CGAL/Nef_polyhedron_2.h cgal-4.8/include/CGAL/Nef_polyhedron_2.h --- cgal-4.7/include/CGAL/Nef_polyhedron_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_polyhedron_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -282,9 +282,17 @@ 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; } + { + 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; } + { + 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) diff -Nru cgal-4.7/include/CGAL/Nef_polyhedron_3.h cgal-4.8/include/CGAL/Nef_polyhedron_3.h --- cgal-4.7/include/CGAL/Nef_polyhedron_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_polyhedron_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -48,9 +48,6 @@ #include #include -#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE -#include -#endif #ifdef CGAL_NEF3_CGAL_NEF3_SM_VISUALIZOR #include @@ -115,11 +112,7 @@ typedef CGAL::SNC_external_structure SNC_external_structure; typedef CGAL::SNC_point_locator SNC_point_locator; typedef CGAL::SNC_simplify SNC_simplify; -#ifdef CGAL_NEF3_POINT_LOCATOR_NAIVE - typedef CGAL::SNC_point_locator_naive SNC_point_locator_default; -#else typedef CGAL::SNC_point_locator_by_spatial_subdivision SNC_point_locator_default; -#endif typedef typename SNC_structure::Sphere_map Sphere_map; typedef CGAL::SM_decorator SM_decorator; @@ -188,6 +181,7 @@ #endif struct Polylines_tag {}; + struct Points_tag {}; enum Boundary { EXCLUDED=0, INCLUDED=1 }; /*{\Menum construction selection.}*/ @@ -199,12 +193,25 @@ /*{\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); } }; + 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 Nef_rep; @@ -554,6 +561,53 @@ build_external_structure(); simplify(); } + + explicit + Nef_polyhedron_3(const Segment_3& s) { + empty_rep(); + set_snc(snc()); + initialize_infibox_vertices(EMPTY); + + Sphere_map_creator smc; + std::vector 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 + 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 diff -Nru cgal-4.7/include/CGAL/Nef_S2/SM_io_parser.h cgal-4.8/include/CGAL/Nef_S2/SM_io_parser.h --- cgal-4.7/include/CGAL/Nef_S2/SM_io_parser.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_S2/SM_io_parser.h 2016-04-04 19:00:12.000000000 +0000 @@ -157,8 +157,8 @@ 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); +{ verbose = (get_mode(out) != CGAL::IO::ASCII && + get_mode(out) != CGAL::IO::BINARY); } diff -Nru cgal-4.7/include/CGAL/Nef_S2/Sphere_geometry_OGL.h cgal-4.8/include/CGAL/Nef_S2/Sphere_geometry_OGL.h --- cgal-4.7/include/CGAL/Nef_S2/Sphere_geometry_OGL.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_S2/Sphere_geometry_OGL.h 2016-04-04 19:00:12.000000000 +0000 @@ -553,7 +553,7 @@ void construct_axes() const { int i; - register double f(1.02); + double f(1.02); glNewList(sphere_list_+3, GL_COMPILE); glLineWidth(2.0); // red x-axis and equator diff -Nru cgal-4.7/include/CGAL/Nef_S2/sphere_predicates.h cgal-4.8/include/CGAL/Nef_S2/sphere_predicates.h --- cgal-4.7/include/CGAL/Nef_S2/sphere_predicates.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_S2/sphere_predicates.h 2016-04-04 19:00:12.000000000 +0000 @@ -344,7 +344,7 @@ s1 = *this; return 1; } // now this is a halfcircle - register bool halfcircle_notin_hminus = + bool halfcircle_notin_hminus = (CGAL::orientation(source(),target(), CGAL::ORIGIN + c.orthogonal_vector(), CGAL::ORIGIN + sphere_circle().orthogonal_vector()) diff -Nru cgal-4.7/include/CGAL/Nef_S2/Sphere_triangle.h cgal-4.8/include/CGAL/Nef_S2/Sphere_triangle.h --- cgal-4.7/include/CGAL/Nef_S2/Sphere_triangle.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Nef_S2/Sphere_triangle.h 2016-04-04 19:00:12.000000000 +0000 @@ -103,7 +103,8 @@ std::ostream& operator<<(std::ostream& os, const CGAL::Sphere_triangle& 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; } + for (int i=0; i<3; ++i) os << t.circle(i); + return os; } template std::istream& operator>>(std::istream& is, diff -Nru cgal-4.7/include/CGAL/NewKernel_d/function_objects_cartesian.h cgal-4.8/include/CGAL/NewKernel_d/function_objects_cartesian.h --- cgal-4.7/include/CGAL/NewKernel_d/function_objects_cartesian.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/function_objects_cartesian.h 2016-04-04 19:00:12.000000000 +0000 @@ -109,12 +109,13 @@ template struct Orientation_of_points,true> : private Store_kernel { CGAL_FUNCTOR_INIT_STORE(Orientation_of_points) typedef R_ R; + typedef typename Get_type::type RT; typedef typename Get_type::type Point; typedef typename Get_type::type result_type; templatestruct Help; templatestruct Help > { template result_type operator()(C const&c,P const&x,T&&t)const{ - return sign_of_determinant(c(std::get(t),I%d)-c(x,I%d)...); + return sign_of_determinant(c(std::get(t),I%d)-c(x,I%d)...); } }; template result_type operator()(P0 const&x,P&&...p)const{ @@ -152,7 +153,7 @@ result_type operator()(Point const&x, BOOST_PP_ENUM_PARAMS(N,Point const&p)) const { \ typename Get_functor::type c(this->kernel()); \ BOOST_PP_REPEAT(N,CGAL_VAR4,) \ - return sign_of_determinant(BOOST_PP_ENUM(N,CGAL_VAR2,N)); \ + return sign_of_determinant(BOOST_PP_ENUM(N,CGAL_VAR2,N)); \ } \ template \ result_type operator()(Iter f, Iter CGAL_assertion_code(e))const{ \ diff -Nru cgal-4.7/include/CGAL/NewKernel_d/KernelD_converter.h cgal-4.8/include/CGAL/NewKernel_d/KernelD_converter.h --- cgal-4.7/include/CGAL/NewKernel_d/KernelD_converter.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/KernelD_converter.h 2016-04-04 19:00:12.000000000 +0000 @@ -85,11 +85,14 @@ // 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::is_iterator && no_converter::value), + + // 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_, + // For iterator objects, the default is make_transforming_iterator + boost::mpl::bool_<(iterator_tag_traits::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; diff -Nru cgal-4.7/include/CGAL/NewKernel_d/LA_eigen/constructors.h cgal-4.8/include/CGAL/NewKernel_d/LA_eigen/constructors.h --- cgal-4.7/include/CGAL/NewKernel_d/LA_eigen/constructors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/LA_eigen/constructors.h 2016-04-04 19:00:12.000000000 +0000 @@ -20,6 +20,13 @@ #ifndef CGAL_LA_EIGEN_CONSTRUCTORS_H #define CGAL_LA_EIGEN_CONSTRUCTORS_H #include + +#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 @@ -148,4 +155,8 @@ }; }; } +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + #endif diff -Nru cgal-4.7/include/CGAL/NewKernel_d/utils.h cgal-4.8/include/CGAL/NewKernel_d/utils.h --- cgal-4.7/include/CGAL/NewKernel_d/utils.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/utils.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,6 +21,13 @@ #define CGAL_MARCUTILS #include + +#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 #include @@ -292,5 +299,8 @@ typedef K Bound_kernel; \ } +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif #endif diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Vector/array.h cgal-4.8/include/CGAL/NewKernel_d/Vector/array.h --- cgal-4.7/include/CGAL/NewKernel_d/Vector/array.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Vector/array.h 2016-04-04 19:00:12.000000000 +0000 @@ -56,7 +56,7 @@ struct Construct_vector { struct Dimension { // Initialize with NaN if possible? - Vector operator()(unsigned d) const { + Vector operator()(unsigned CGAL_assertion_code(d)) const { CGAL_assertion(d<=d_); return Vector(); } @@ -91,7 +91,7 @@ struct Iterator_and_last { template - Vector operator()(unsigned d,Iter const& f,Iter const& e,CGAL_FORWARDABLE(T) t) const { + 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 diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h cgal-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h --- cgal-4.7/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Vector/determinant_of_iterator_to_points_from_iterator_to_vectors.h 2016-04-04 19:00:12.000000000 +0000 @@ -52,7 +52,7 @@ template struct Property : boost::true_type {}; - // TODO: use std::minus, std::bind, etc + // TODO: use std::minus, boost::bind, etc template struct Minus_fixed { T const& a; Minus_fixed(T const&a_):a(a_){} diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Vector/vector.h cgal-4.8/include/CGAL/NewKernel_d/Vector/vector.h --- cgal-4.7/include/CGAL/NewKernel_d/Vector/vector.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Vector/vector.h 2016-04-04 19:00:12.000000000 +0000 @@ -49,7 +49,7 @@ struct Iterator { template - Vector operator()(int d,Iter const& f,Iter const& e) const { + 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); } @@ -59,7 +59,7 @@ #if 0 struct Iterator_add_one { template - Vector operator()(int d,Iter const& f,Iter const& e) const { + 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); diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Cartesian_wrap.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,6 +23,11 @@ #include #include +#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 #include #include @@ -291,4 +296,8 @@ } //namespace CGAL +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + #endif // CGAL_KERNEL_D_CARTESIAN_WRAP_H diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Hyperplane_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,7 +21,7 @@ #define CGAL_WRAPPER_HYPERPLANE_D_H #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ typedef typename Get_functor::type HTBase; typedef Hyperplane_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Point_d.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Point_d.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Point_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Point_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,7 +51,7 @@ typedef Point_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Ref_count_obj.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,7 +45,7 @@ typedef typename Get_functor >::type CBase; typedef Ref_count_obj Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: typedef R_ R; diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Segment_d.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Segment_d.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Segment_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Segment_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ typedef typename Get_functor::type CSEBase; typedef Segment_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Sphere_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,7 +21,7 @@ #define CGAL_WRAPPER_SPHERE_D_H #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ typedef typename Get_functor::type SRBase; typedef Sphere_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff -Nru cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Vector_d.h cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Vector_d.h --- cgal-4.7/include/CGAL/NewKernel_d/Wrapper/Vector_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/NewKernel_d/Wrapper/Vector_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -48,7 +48,7 @@ typedef typename Get_functor::type SLBase; typedef Vector_d Self; - BOOST_STATIC_ASSERT((boost::is_same::type>::value)); + CGAL_static_assertion((boost::is_same::type>::value)); public: diff -Nru cgal-4.7/include/CGAL/number_type_basic.h cgal-4.8/include/CGAL/number_type_basic.h --- cgal-4.7/include/CGAL/number_type_basic.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/number_type_basic.h 2016-04-04 19:00:12.000000000 +0000 @@ -55,7 +55,6 @@ #include #include #include - #include #include #include diff -Nru cgal-4.7/include/CGAL/odt_optimize_mesh_3.h cgal-4.8/include/CGAL/odt_optimize_mesh_3.h --- cgal-4.7/include/CGAL/odt_optimize_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/odt_optimize_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -32,9 +32,15 @@ #include #include #include +#include namespace CGAL { +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + BOOST_PARAMETER_FUNCTION( (Mesh_optimization_return_code), odt_optimize_mesh_3, @@ -53,7 +59,7 @@ convergence_, freeze_bound_ , do_freeze_ ); } - +CGAL_PRAGMA_DIAG_POP template @@ -66,6 +72,9 @@ 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 Sizing; diff -Nru cgal-4.7/include/CGAL/OpenNL/linear_solver.h cgal-4.8/include/CGAL/OpenNL/linear_solver.h --- cgal-4.7/include/CGAL/OpenNL/linear_solver.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/OpenNL/linear_solver.h 2016-04-04 19:00:12.000000000 +0000 @@ -269,7 +269,7 @@ } } unsigned int n = index ; - A_ = new Matrix(n) ; + A_ = new Matrix(static_cast(n)) ; x_ = new Vector(n) ; b_ = new Vector(n) ; for(unsigned int i=0; iadd_coef(if_[i], if_[j], af_[i] * af_[j]) ; } } CoeffType S = - bk_ ; - for(unsigned int j=0; jadd_coef(current_row_, if_[i], af_[i]) ; } (*b_)[current_row_] = bk_ ; - for(unsigned int i=0; i +#include + +#include +#include + +#include +#include +#include +#include +#include +#include // std::pair + +#include +#include +#include +#include +#include + +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 `boost::typed_identity_property_map` + (for the case the input is points without mass). + +\tparam MassPMap a model of `ReadablePropertyMap` with value type `Traits::FT` + Defaults to `boost::static_property_map` + (for the case the input is points without mass). + + */ +template< + class Traits, + class PointPMap = boost::typed_identity_property_map , + class MassPMap = boost::static_property_map > +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 PointMassPair; + typedef typename std::vector PointMassList; + + + /*! + The Output simplex. + */ + typedef OTR_2::Reconstruction_triangulation_2 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_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 + 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 + 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 + 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 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 + 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(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 // value_type = Point* + void init(Iterator begin, Iterator beyond) { + CGAL::Real_timer timer; + std::cerr << "init" << "..."; + + timer.start(); + int nb = static_cast(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 // 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 // value_type = Sample_* + void backup_samples(Iterator begin, Iterator end) const { + for (Iterator it = begin; it != end; ++it) { + Sample_* sample = *it; + sample->backup(); + } + } + + template // 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 // 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 // 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 // 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 // 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 // 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 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 // 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`. + + \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 isolated_points_; + std::vector edges; + + list_output ( + std::back_inserter(isolated_points_), std::back_inserter(edges)); + + // vertices_of_edges + std::set edge_vertices; + for (typename std::vector::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::iterator it = edge_vertices.begin(); + it != edge_vertices.end(); it++) { + + *points++ = *it; + ++count_points; + } + + for (typename std::vector::iterator it = isolated_points_.begin(); + it != isolated_points_.end(); it++) { + + *isolated_points++ = count_points; + *points++ = *it; + ++count_points; + } + + for (typename std::vector::iterator it = edges.begin(); + it != edges.end(); it++) { + + Point const& a = it->source(); + Point const& b = it->target(); + + typename std::set::iterator it_a = edge_vertices.find(a); + typename std::set::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 + 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 -Nru cgal-4.7/include/CGAL/Origin.h cgal-4.8/include/CGAL/Origin.h --- cgal-4.7/include/CGAL/Origin.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Origin.h 2016-04-04 19:00:11.000000000 +0000 @@ -33,13 +33,20 @@ class Origin {}; -CGAL_EXPORT extern const Origin 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 +#endif // CGAL_HEADER_ONLY + #endif // CGAL_ORIGIN_H diff -Nru cgal-4.7/include/CGAL/Origin_impl.h cgal-4.8/include/CGAL/Origin_impl.h --- cgal-4.7/include/CGAL/Origin_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Origin_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/Orthogonal_incremental_neighbor_search.h cgal-4.8/include/CGAL/Orthogonal_incremental_neighbor_search.h --- cgal-4.7/include/CGAL/Orthogonal_incremental_neighbor_search.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Orthogonal_incremental_neighbor_search.h 2016-04-04 19:00:12.000000000 +0000 @@ -434,11 +434,12 @@ - class iterator; public: + class iterator; + typedef iterator const_iterator; // constructor Orthogonal_incremental_neighbor_search(const Tree& tree, @@ -448,13 +449,13 @@ {} iterator - begin() + begin() const { return iterator(m_tree,m_query,m_dist,m_Eps,m_search_nearest); } iterator - end() + end() const { return iterator(); } diff -Nru cgal-4.7/include/CGAL/OTR_2/Cost.h cgal-4.8/include/CGAL/OTR_2/Cost.h --- cgal-4.7/include/CGAL/OTR_2/Cost.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Cost.h 2016-04-04 19:00:12.000000000 +0000 @@ -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, Clment Jamin + +#ifndef CGAL_OTR2_COST_H_ +#define CGAL_OTR2_COST_H_ + +#include + +namespace CGAL { +namespace OTR_2 { + +template +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 -Nru cgal-4.7/include/CGAL/OTR_2/Reconstruction_edge_2.h cgal-4.8/include/CGAL/OTR_2/Reconstruction_edge_2.h --- cgal-4.7/include/CGAL/OTR_2/Reconstruction_edge_2.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Reconstruction_edge_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -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, Clment Jamin + +#ifndef CGAL_RECONSTRUCTION_EDGE_2_H_ +#define CGAL_RECONSTRUCTION_EDGE_2_H_ + +namespace CGAL { +namespace OTR_2 { + +template +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 -Nru cgal-4.7/include/CGAL/OTR_2/Reconstruction_face_base_2.h cgal-4.8/include/CGAL/OTR_2/Reconstruction_face_base_2.h --- cgal-4.7/include/CGAL/OTR_2/Reconstruction_face_base_2.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Reconstruction_face_base_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -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, Clment Jamin + +#ifndef CGAL_RECONSTRUCTION_FACE_BASE_2_H_ +#define CGAL_RECONSTRUCTION_FACE_BASE_2_H_ + +#include +#include +#include + +#include + +/// \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 > +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::Other Fb2; + typedef Reconstruction_face_base_2 Other; + }; + + typedef typename Traits_::FT FT; + typedef OTR_2::Cost Cost_; + typedef OTR_2::Sample Sample_; + typedef std::vector 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 +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 +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 -Nru cgal-4.7/include/CGAL/OTR_2/Reconstruction_triangulation_2.h cgal-4.8/include/CGAL/OTR_2/Reconstruction_triangulation_2.h --- cgal-4.7/include/CGAL/OTR_2/Reconstruction_triangulation_2.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Reconstruction_triangulation_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -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, Clment Jamin + +#ifndef CGAL_RECONSTRUCTION_TRIANGULATION_2_H +#define CGAL_RECONSTRUCTION_TRIANGULATION_2_H + +// local +#include +#include +#include +#include +#include + +// CGAL +#include +#include +#include +#include + +// boost +#include +#include +#include +#include +#include + +// STL +#include +#include +#include +#include +#include +#include + +#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, + Reconstruction_face_base_2 > > +class Reconstruction_triangulation_2 + : public Delaunay_triangulation_2 +{ +public: + + typedef Delaunay_triangulation_2 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_map; + typedef std::map > Face_handle_map; + + typedef std::set > Vertex_handle_set; + typedef std::set > Edge_set; + + typedef std::vector Edge_vector; + + typedef OTR_2::Cost Cost_; + typedef OTR_2::Sample Sample_; + typedef std::vector Sample_vector; + typedef typename Sample_vector::const_iterator Sample_vector_const_iterator; + + typedef OTR_2::Sample_with_priority PSample; + typedef std::priority_queue, + OTR_2::greater_priority > SQueue; + + typedef Reconstruction_edge_2 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(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 // value_type = Sample_* + void assign_samples(Iterator begin, Iterator end) { + for (Iterator it = begin; it != end; ++it) { + Sample_* sample = *it; + assign_sample(sample); + } + } + + template // 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::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::max)(); + CGAL::Object result = CGAL::intersection(lab, lts); + const Point* iq = CGAL::object_cast(&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 // 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 // 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::max)(); + if (a != c && is_triangle_ccw(a, b, c)) + Dac = signed_distance_from_intersection(a, c, target, source); + + FT Dbd = -(std::numeric_limits::max)(); + if (b != d && is_triangle_ccw(b, c, d)) + Dbd = signed_distance_from_intersection(b, d, target, source); + + if (Dac == -(std::numeric_limits::max)() && Dbd == + -(std::numeric_limits::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 -Nru cgal-4.7/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h cgal-4.8/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h --- cgal-4.7/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -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, Clment Jamin + +#ifndef CGAL_RECONSTRUCTION_VERTEX_BASE_2_H_ +#define CGAL_RECONSTRUCTION_VERTEX_BASE_2_H_ + +#include +#include + +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 > +class Reconstruction_vertex_base_2 : public Vb +{ + + /// \cond SKIP_IN_MANUAL + +public: + typedef Vb Base; + typedef typename Traits_::FT FT; + typedef OTR_2::Sample 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::Other Vb2; + typedef Reconstruction_vertex_base_2 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 +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 -Nru cgal-4.7/include/CGAL/OTR_2/Sample.h cgal-4.8/include/CGAL/OTR_2/Sample.h --- cgal-4.7/include/CGAL/OTR_2/Sample.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/OTR_2/Sample.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 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_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 +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 -Nru cgal-4.7/include/CGAL/Param_mesh_patch_vertex.h cgal-4.8/include/CGAL/Param_mesh_patch_vertex.h --- cgal-4.7/include/CGAL/Param_mesh_patch_vertex.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Param_mesh_patch_vertex.h 2016-04-04 19:00:12.000000000 +0000 @@ -268,9 +268,10 @@ 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; + return m_ptr == ptr; } bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); } @@ -416,7 +417,7 @@ /// Comparison to NULL pointer bool operator==(Nullptr_t ptr) const { CGAL_surface_mesh_parameterization_assertion(ptr == NULL); - return m_ptr == NULL; + return m_ptr == ptr; } bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); } diff -Nru cgal-4.7/include/CGAL/Partition_2/partition_approx_convex_2.h cgal-4.8/include/CGAL/Partition_2/partition_approx_convex_2.h --- cgal-4.7/include/CGAL/Partition_2/partition_approx_convex_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Partition_2/partition_approx_convex_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,6 +21,12 @@ #ifndef CGAL_PARTITION_APPROX_CONVEX_H #define CGAL_PARTITION_APPROX_CONVEX_H +#include +#if (BOOST_GCC >= 40800) +_Pragma("GCC diagnostic push") +_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +#endif + #include #include #include @@ -271,5 +277,7 @@ } } - +#if (BOOST_GCC >= 40800) + _Pragma("GCC diagnostic pop") +#endif #endif // CGAL_PARTITION_APPROX_CONVEX_H diff -Nru cgal-4.7/include/CGAL/pca_estimate_normals.h cgal-4.8/include/CGAL/pca_estimate_normals.h --- cgal-4.7/include/CGAL/pca_estimate_normals.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/pca_estimate_normals.h 2016-04-04 19:00:12.000000000 +0000 @@ -32,6 +32,12 @@ #include #include +#ifdef CGAL_LINKED_WITH_TBB +#include +#include +#include +#endif // CGAL_LINKED_WITH_TBB + namespace CGAL { @@ -56,7 +62,7 @@ > typename Kernel::Vector_3 pca_estimate_normal(const typename Kernel::Point_3& query, ///< point to compute the normal at - Tree& tree, ///< KD-tree + const Tree& tree, ///< KD-tree unsigned int k) ///< number of neighbors { // basic geometric types @@ -93,6 +99,33 @@ return plane.orthogonal_vector(); } + +#ifdef CGAL_LINKED_WITH_TBB + template + 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& input; + std::vector& output; + + public: + PCA_estimate_normals(Tree& tree, unsigned int k, std::vector& points, + std::vector& output) + : tree(tree), k (k), input (points), output (output) + { } + + void operator()(const tbb::blocked_range& r) const + { + for( std::size_t i = r.begin(); i != r.end(); ++i) + output[i] = CGAL::internal::pca_estimate_normal(input[i], tree, k); + } + + }; +#endif // CGAL_LINKED_WITH_TBB + + } /* namespace internal */ /// \endcond @@ -109,6 +142,9 @@ /// /// \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`. /// It can be omitted if the value type of `ForwardIterator` is convertible to `Point_3`. @@ -117,7 +153,8 @@ /// It can be omitted and deduced automatically from the value type of `PointPMap`. // This variant requires all parameters. -template ( +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else + if (boost::is_convertible::value) + { + std::vector normals (kd_tree_points.size ()); + CGAL::internal::PCA_estimate_normals + f (tree, k, kd_tree_points, normals); + tbb::parallel_for(tbb::blocked_range(0, kd_tree_points.size ()), f); + unsigned int i = 0; + for(it = first; it != beyond; ++ it, ++ i) + { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 - get(point_pmap,it), + put (normal_pmap, it, normals[i]); #else - get(point_pmap,*it), + put (normal_pmap, *it, normals[i]); #endif - tree, - k); + } + } + else +#endif + { + for(it = first; it != beyond; it++) + { + Vector normal = internal::pca_estimate_normal( +#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 + put(normal_pmap, it, normal); // normal_pmap[it] = normal #else - put(normal_pmap, *it, normal); // normal_pmap[it] = normal + 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 @@ -214,7 +276,7 @@ { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - pca_estimate_normals( + pca_estimate_normals( first,beyond, point_pmap, normal_pmap, @@ -225,7 +287,8 @@ /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map. -template void @@ -235,7 +298,7 @@ NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. unsigned int k) ///< number of neighbors. { - pca_estimate_normals( + pca_estimate_normals( first,beyond, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 make_dereference_property_map(first), diff -Nru cgal-4.7/include/CGAL/PCA_util.h cgal-4.8/include/CGAL/PCA_util.h --- cgal-4.7/include/CGAL/PCA_util.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/PCA_util.h 2016-04-04 19:00:12.000000000 +0000 @@ -20,7 +20,6 @@ #ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H #define CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H -#include #include #include @@ -48,24 +47,26 @@ // assemble covariance matrix from a point set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 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 + // 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; @@ -76,8 +77,8 @@ 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[2] += d.x() * d.z(); + covariance[3] += d.y() * d.y(); covariance[4] += d.y() * d.z(); covariance[5] += d.z() * d.z(); } @@ -85,15 +86,17 @@ // assemble covariance matrix from a triangle set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, - InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<2>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Triangle_3 Triangle; @@ -102,9 +105,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all triangles and their combined mass FT mass = 0.0; @@ -141,8 +144,8 @@ // 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[2] += transformation[2][0]; + covariance[3] += transformation[1][1]; covariance[4] += transformation[2][1]; covariance[5] += transformation[2][2]; @@ -153,8 +156,8 @@ // 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[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()); @@ -162,15 +165,17 @@ // assemble covariance matrix from a cuboid set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, - InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<3>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -179,9 +184,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 // final combined covariance matrix for all cuboids and their combined mass FT mass = (FT)0.0; @@ -227,8 +232,8 @@ // 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[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); @@ -239,23 +244,25 @@ // 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[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 K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<2>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Iso_cuboid_3 Iso_cuboid; @@ -264,9 +271,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all cuboids and their combined mass FT mass = (FT)0.0; @@ -319,8 +326,8 @@ // 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[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); @@ -331,8 +338,8 @@ // 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[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()); @@ -340,15 +347,17 @@ // assemble covariance matrix from a sphere set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<3>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -357,9 +366,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all spheres and their combined mass FT mass = 0.0; @@ -402,8 +411,8 @@ // 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[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; @@ -414,23 +423,25 @@ // 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[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 K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<2>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Sphere_3 Sphere; @@ -439,9 +450,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all spheres and their combined mass FT mass = 0.0; @@ -485,8 +496,8 @@ // 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[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; @@ -497,8 +508,8 @@ // 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[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()); @@ -506,15 +517,17 @@ // assemble covariance matrix from a tetrahedron set template < typename InputIterator, - typename K > + typename K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<3>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Tetrahedron_3 Tetrahedron; @@ -523,9 +536,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all tetrahedrons and their combined mass FT mass = 0.0; @@ -571,8 +584,8 @@ // 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[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); @@ -583,23 +596,25 @@ // 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[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 K, + typename DiagonalizeTraits > void assemble_covariance_matrix_3(InputIterator first, InputIterator beyond, - typename K::FT covariance[6], // covariance matrix + 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 CGAL::Dimension_tag<1>&, + const DiagonalizeTraits&) { typedef typename K::FT FT; typedef typename K::Segment_3 Segment; @@ -608,9 +623,9 @@ // assemble covariance matrix as a semi-definite matrix. // Matrix numbering: - // 0 - // 1 2 - // 3 4 5 + // 0 1 2 + // 3 4 + // 5 //Final combined covariance matrix for all segments and their combined mass FT mass = 0.0; @@ -648,8 +663,8 @@ // 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[2] += transformation[2][0]; + covariance[3] += transformation[1][1]; covariance[4] += transformation[2][1]; covariance[5] += transformation[2][2]; @@ -660,8 +675,8 @@ // 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[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()); @@ -671,23 +686,27 @@ // compute the eigen values and vectors of the covariance // matrix and deduces the best linear fitting plane. // returns fitting quality -template < typename K > +template < typename K, typename DiagonalizeTraits > typename K::FT -fitting_plane_3(const typename K::FT covariance[6], // covariance matrix +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 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 descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - FT eigen_values[3]; - FT eigen_vectors[9]; - eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + 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] && @@ -700,11 +719,11 @@ } else // regular and line case { - Vector normal(eigen_vectors[6], - eigen_vectors[7], - eigen_vectors[8]); + Vector normal(eigen_vectors[0], + eigen_vectors[1], + eigen_vectors[2]); plane = Plane(c,normal); - return FT(1) - eigen_values[2] / eigen_values[1]; + return FT(1) - eigen_values[0] / eigen_values[1]; } // end regular case } @@ -712,23 +731,27 @@ // matrix and deduces the best linear fitting line // (this is an internal function) // returns fitting quality -template < typename K > +template < typename K, typename DiagonalizeTraits > typename K::FT -fitting_line_3(const typename K::FT covariance[6], // covariance matrix +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 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 descending order, + // eigen values are sorted in ascending order, // eigen vectors are sorted in accordance. - FT eigen_values[3]; - FT eigen_vectors[9]; - eigen_symmetric(covariance,3,eigen_vectors,eigen_values); + 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] && @@ -742,9 +765,9 @@ else { // regular case - Vector direction(eigen_vectors[0],eigen_vectors[1],eigen_vectors[2]); + Vector direction(eigen_vectors[6],eigen_vectors[7],eigen_vectors[8]); line = Line(c,direction); - return (FT)1.0 - eigen_values[1] / eigen_values[0]; + return (FT)1.0 - eigen_values[1] / eigen_values[2]; } } diff -Nru cgal-4.7/include/CGAL/perturb_mesh_3.h cgal-4.8/include/CGAL/perturb_mesh_3.h --- cgal-4.7/include/CGAL/perturb_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/perturb_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,11 +31,17 @@ #include #include #include +#include #include #include namespace CGAL { +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + BOOST_PARAMETER_FUNCTION( (Mesh_optimization_return_code), perturb_mesh_3, @@ -55,6 +61,7 @@ return perturb_mesh_3_impl(c3t3, domain, time_limit_, sliver_criterion_, perturbation_vector_); } +CGAL_PRAGMA_DIAG_POP template &p) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << p.a() << ' ' << p.b() << ' ' << p.c() << ' ' << p.d(); case IO::BINARY : @@ -256,7 +256,7 @@ operator>>(std::istream &is, Plane_3 &p) { typename R::RT a, b, c, d; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(a) >> iformat(b) >> iformat(c) >> iformat(d); break; diff -Nru cgal-4.7/include/CGAL/Point_2.h cgal-4.8/include/CGAL/Point_2.h --- cgal-4.7/include/CGAL/Point_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Point_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -169,7 +169,7 @@ std::ostream& insert(std::ostream& os, const Point_2& p,const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << p.x() << ' ' << p.y(); case IO::BINARY : @@ -185,7 +185,7 @@ std::ostream& insert(std::ostream& os, const Point_2& p,const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << p.hx() << ' ' << p.hy() << ' ' << p.hw(); @@ -214,7 +214,7 @@ extract(std::istream& is, Point_2& p, const Cartesian_tag&) { typename R::FT x, y; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y); break; @@ -238,7 +238,7 @@ extract(std::istream& is, Point_2& p, const Homogeneous_tag&) { typename R::RT hx, hy, hw; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> hx >> hy >> hw; diff -Nru cgal-4.7/include/CGAL/Point_3.h cgal-4.8/include/CGAL/Point_3.h --- cgal-4.7/include/CGAL/Point_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Point_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -194,7 +194,7 @@ std::ostream& insert(std::ostream& os, const Point_3& p,const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << p.x() << ' ' << p.y() << ' ' << p.z(); case IO::BINARY : @@ -212,7 +212,7 @@ std::ostream& insert(std::ostream& os, const Point_3& p,const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << p.hx() << ' ' << p.hy() << ' ' << p.hz() << ' ' << p.hw(); @@ -243,7 +243,7 @@ extract(std::istream& is, Point_3& p, const Cartesian_tag&) { typename R::FT x, y, z; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y) >> iformat(z); break; @@ -268,7 +268,7 @@ extract(std::istream& is, Point_3& p, const Homogeneous_tag&) { typename R::RT hx, hy, hz, hw; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> hx >> hy >> hz >> hw; diff -Nru cgal-4.7/include/CGAL/point_generators_2.h cgal-4.8/include/CGAL/point_generators_2.h --- cgal-4.7/include/CGAL/point_generators_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/point_generators_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -38,7 +38,7 @@ void generate_point(); public: typedef Random_points_in_disc_2 This; - Random_points_in_disc_2( double r = 1, Random& rnd = default_random) + 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. @@ -73,7 +73,7 @@ void generate_point(); public: typedef Random_points_on_circle_2 This; - Random_points_on_circle_2( double r = 1, Random& rnd = default_random) + 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. @@ -107,7 +107,7 @@ void generate_point(); public: typedef Random_points_in_square_2 This; - Random_points_in_square_2( double a = 1, Random& rnd = default_random) + 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} @@ -143,7 +143,7 @@ void generate_point(); public: typedef Random_points_on_square_2 This; - Random_points_on_square_2( double a = 1, Random& rnd = default_random) + 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 @@ -196,7 +196,7 @@ void generate_point(); public: typedef Random_points_in_iso_rectangle_2 This; - Random_points_in_iso_rectangle_2( const P&p, const P& q, Random& rnd = default_random) + Random_points_in_iso_rectangle_2( const P&p, const P& q, Random& rnd = CGAL::get_default_random()) : Random_generator_base

    ( 1.0 , rnd) { left = (std::min)(to_double(p.x()), to_double(q.x())); @@ -240,7 +240,7 @@ typedef Random_points_on_segment_2 This; Random_points_on_segment_2( const P& p = P( -1, 0), const P& q = P( 1, 0), - Random& rnd = default_random) + 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 @@ -425,7 +425,7 @@ double xeps, double yeps) { - perturb_points_2( first, last, xeps, yeps, default_random); + perturb_points_2( first, last, xeps, yeps, CGAL::get_default_random()); } template @@ -433,7 +433,7 @@ ForwardIterator last, double xeps) { - perturb_points_2( first, last, xeps, xeps, default_random); + perturb_points_2( first, last, xeps, xeps, CGAL::get_default_random()); } template OutputIterator random_collinear_points_2( @@ -491,7 +491,7 @@ OutputIterator first2) { return random_collinear_points_2( first, last, n, first2, - default_random); + CGAL::get_default_random()); } template < class P, class Creator = diff -Nru cgal-4.7/include/CGAL/point_generators_3.h cgal-4.8/include/CGAL/point_generators_3.h --- cgal-4.7/include/CGAL/point_generators_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/point_generators_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -38,7 +38,7 @@ void generate_point(); public: typedef Random_points_in_sphere_3 This; - Random_points_in_sphere_3( double r = 1, Random& rnd = default_random) + 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 @@ -77,7 +77,7 @@ void generate_point(); public: typedef Random_points_on_sphere_3 This; - Random_points_on_sphere_3( double r = 1, Random& rnd = default_random) + 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. @@ -115,7 +115,7 @@ void generate_point(); public: typedef Random_points_in_cube_3 This; - Random_points_in_cube_3( double a = 1, Random& rnd = default_random) + Random_points_in_cube_3( double a = 1, Random& rnd = CGAL::get_default_random()) : Random_generator_base

    ( a, rnd) { generate_point(); } This& operator++() { generate_point(); diff -Nru cgal-4.7/include/CGAL/point_generators_d.h cgal-4.8/include/CGAL/point_generators_d.h --- cgal-4.7/include/CGAL/point_generators_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/point_generators_d.h 2016-04-04 19:00:11.000000000 +0000 @@ -35,7 +35,7 @@ public: typedef Random_points_in_ball_d

    This; Random_points_in_ball_d( int dim, double a = 1, - Random& rnd = default_random) + 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

    ( a, rnd), dimension(dim) { generate_point(); } @@ -84,7 +84,7 @@ public: typedef Random_points_on_sphere_d

    This; Random_points_on_sphere_d( int dim, double a = 1, - Random& rnd = default_random) + 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

    ( a, rnd), dimension(dim) { generate_point(); } @@ -129,7 +129,7 @@ public: typedef Random_points_in_cube_d

    This; Random_points_in_cube_d( int dim, double a = 1, - Random& rnd = default_random) + Random& rnd = get_default_random()) : Random_generator_base

    ( a, rnd), dimension(dim) { generate_point(); } This& operator++() { generate_point(); diff -Nru cgal-4.7/include/CGAL/Poisson_reconstruction_function.h cgal-4.8/include/CGAL/Poisson_reconstruction_function.h --- cgal-4.7/include/CGAL/Poisson_reconstruction_function.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Poisson_reconstruction_function.h 2016-04-04 19:00:12.000000000 +0000 @@ -144,7 +144,7 @@ /*! -\ingroup PkgSurfaceReconstructionFromPointSets +\ingroup PkgPoissonSurfaceReconstruction \brief Implementation of the Poisson Surface Reconstruction method. @@ -300,7 +300,7 @@ 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 > ) - , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6)) + , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6)) { forward_constructor(first, beyond, point_pmap, normal_pmap, Poisson_visitor()); } @@ -318,7 +318,7 @@ 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 > ) - , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6)) + , average_spacing(CGAL::compute_average_spacing(first, beyond, point_pmap, 6)) { forward_constructor(first, beyond, point_pmap, normal_pmap, visitor); } @@ -336,7 +336,7 @@ >::type* = 0 ) : m_tr(new Triangulation), m_Bary(new std::vector > ) - , average_spacing(CGAL::compute_average_spacing(first, beyond, 6)) + , average_spacing(CGAL::compute_average_spacing(first, beyond, 6)) { forward_constructor(first, beyond, #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 diff -Nru cgal-4.7/include/CGAL/Polygon_2/Polygon_2_impl.h cgal-4.8/include/CGAL/Polygon_2/Polygon_2_impl.h --- cgal-4.7/include/CGAL/Polygon_2/Polygon_2_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_2/Polygon_2_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -116,7 +116,7 @@ { typename Polygon_2::Vertex_const_iterator i; - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : os << p.size() << ' '; for (i = p.vertices_begin(); i != p.vertices_end(); ++i) { diff -Nru cgal-4.7/include/CGAL/Polygon_2_algorithms.h cgal-4.8/include/CGAL/Polygon_2_algorithms.h --- cgal-4.7/include/CGAL/Polygon_2_algorithms.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_2_algorithms.h 2016-04-04 19:00:12.000000000 +0000 @@ -49,10 +49,10 @@ /// `[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`. +/// \tparam 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`, +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// /// \sa `CGAL::right_vertex_2()` @@ -68,11 +68,12 @@ /// `[first,last)`. In case of a tie, the point /// with the largest `y`-coordinate is taken. /// -/// \cgalRequires `Traits` is a model of the concept +/// \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. -/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`. +/// \tparam ForwardIterator must have`Traits::Point_2` as value type. +/// /// /// \sa `CGAL::left_vertex_2()` /// \sa `CGAL::top_vertex_2()` @@ -87,11 +88,11 @@ /// `[first,last)`. In case of a tie, the point /// with the largest `x`-coordinate is taken. /// -/// \cgalRequires `Traits` is a model of the concept +/// \tparam 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`. +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// \sa `CGAL::left_vertex_2()` /// \sa `CGAL::right_vertex_2()` @@ -106,11 +107,11 @@ /// `[first,last)`. In case of a tie, the point /// with the smallest `x`-coordinate is taken. /// -/// \cgalRequires `Traits` is a model of the concept +/// \tparam 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`. +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// \sa `CGAL::left_vertex_2()` /// \sa `CGAL::right_vertex_2()` @@ -129,14 +130,14 @@ /// 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 +/// \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()` -/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`. +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// \sa `CGAL::polygon_area_2()` /// \sa `PolygonTraits_2` @@ -169,12 +170,12 @@ /// 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: +/// \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` -/// \cgalRequires `ForwardIterator::value_type` should be `Traits::Point_2`, +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// /// \sa `PolygonTraits_2 ` @@ -204,14 +205,14 @@ /// Checks if the polygon is convex. /// -/// \cgalRequires `Traits` is a model of the concept +/// \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` -/// \cgalRequires `ForwardIterator::value_type` should be `PolygonTraits::Point_2`, +/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type. /// /// \sa `PolygonTraits_2 ` /// \sa `CGAL::Polygon_2 ` @@ -224,7 +225,7 @@ /// 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 +/// \tparam Traits is a model of the concept /// `PolygonTraits_2`. /// Only the following members of this traits class are used: /// - `Point_2` @@ -232,7 +233,7 @@ /// - `Orientation_2` /// - `less_xy_2_object()` /// - `orientation_2_object()` -/// \cgalRequires The value type of `ForwardIterator` must be `PolygonTraits::Point_2`, +/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type. /// /// ### Implementation## /// @@ -252,7 +253,7 @@ // 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 +/// \tparam Traits is a model of the concept /// `PolygonTraits_2`. /// Only the following members of this traits class are used: /// - `Less_xy_2` @@ -263,7 +264,7 @@ /// - `compare_x_2_object()` /// - `compare_y_2_object()` /// - `orientation_2_object()` -/// \cgalRequires The value type of `ForwardIterator` must be `PolygonTraits::Point_2`, +/// \tparam ForwardIterator must have `PolygonTraits::Point_2` as value type. /// /// \sa `PolygonTraits_2` /// \sa `CGAL::bounded_side_2()` @@ -286,7 +287,7 @@ /// According to the definition points in the bounded region are inside the polygon. /// /// -/// \cgalRequires `Traits` is a model of the concept +/// \tparam Traits is a model of the concept /// `PolygonTraits_2`. /// Only the following members of this traits class are used: /// - `Compare_x_2` @@ -295,7 +296,7 @@ /// - `compare_x_2_object()` /// - `compare_y_2_object()` /// - `orientation_2_object()` -/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`, +/// \tparam ForwardIterator must have `Traits::Point_2` as value type. /// /// ### Implementation ### /// @@ -318,13 +319,13 @@ /// Computes if a polygon is clockwise or counterclockwise oriented. /// \pre `is_simple_2(first, last, traits);` /// -/// \cgalRequires `Traits` is a model of the concept +/// \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()` -/// \cgalRequires The value type of `ForwardIterator` must be `Traits::Point_2`, +/// \tparam ForwardIterator must have`Traits::Point_2` as value type. /// /// /// diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/bbox.h cgal-4.8/include/CGAL/Polygon_mesh_processing/bbox.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/bbox.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/bbox.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#include + +#include +#include + +#include + +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 + CGAL::Bbox_3 bbox_3(const PolygonMesh& pmesh, + const NamedParameters& np) + { + using boost::choose_const_pmap; + using boost::get_param; + typename GetVertexPointMap::const_type + vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), + pmesh, + CGAL::vertex_point); + + typedef typename boost::graph_traits::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 + 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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/border.h cgal-4.8/include/CGAL/Polygon_mesh_processing/border.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/border.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/border.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include + +#include +#include + +#include + +namespace CGAL{ +namespace Polygon_mesh_processing { + + namespace internal + { + template + HalfedgeOutputIterator border_halfedges_impl(const FaceRange& faces + , HalfedgeOutputIterator out + , const PM& pmesh) + { + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::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 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::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 + HalfedgeOutputIterator border_halfedges_impl(const FaceRange& faces + , const FaceIndexMap& fmap + , HalfedgeOutputIterator out + , const PM& pmesh) + { + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; + + std::vector 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::%face_descriptor`, model of `Range`. + Its iterator type is `InputIterator`. + * @tparam HalfedgeOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%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 + HalfedgeOutputIterator border_halfedges(const FaceRange& faces + , const PolygonMesh& pmesh + , HalfedgeOutputIterator out + , const NamedParameters& np) + { + typedef PolygonMesh PM; + typedef typename GetFaceIndexMap::type FIMap; + typedef typename boost::property_map::type Unset_FIMap; + + if (boost::is_same::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 + HalfedgeOutputIterator border_halfedges(const PolygonMesh& pmesh + , HalfedgeOutputIterator out) + { + typedef PolygonMesh PM; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + BOOST_FOREACH(halfedge_descriptor hd, halfedges(pmesh)) + if (is_border(hd, pmesh)) + *out++ = hd; + return out; + } + + template + 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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/compute_normal.h cgal-4.8/include/CGAL/Polygon_mesh_processing/compute_normal.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/compute_normal.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/compute_normal.h 2016-04-04 19:00:12.000000000 +0000 @@ -27,15 +27,27 @@ #include #include #include +#include -#include #include #include +#include + namespace CGAL{ namespace Polygon_mesh_processing{ +namespace internal { + + template + typename CGAL::Kernel_traits::Kernel::Vector_3 + triangle_normal(const Point& p0, const Point& p1, const Point& p2) + { + return CGAL::cross_product(p2 - p1, p0 - p1); + } +} + template void sum_normals(const PM& pmesh, typename boost::graph_traits::face_descriptor f, @@ -45,20 +57,23 @@ typedef typename boost::graph_traits::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 = CGAL::cross_product(nxt - curr, prv - curr); + Vector n = internal::triangle_normal(prv, curr, nxt); sum = sum + n; he = next(he, pmesh); - } while (he != end); + } while (he != end && !f_is_triangle); } + /** -* \ingroup PkgPolygonMeshProcessing +* \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` @@ -89,22 +104,26 @@ , const NamedParameters& np) { typedef typename GetGeomTraits::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_param; + using boost::choose_const_pmap; Vector normal = CGAL::NULL_VECTOR; sum_normals(pmesh, f - , choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, pmesh)) + , choose_const_pmap(get_param(np, CGAL::vertex_point), pmesh, CGAL::vertex_point) , normal); - - return normal / std::sqrt(normal * normal); + + if (normal == CGAL::NULL_VECTOR) + return normal; + else + return normal / FT( std::sqrt( to_double(normal * normal) ) ); } /** -* \ingroup PkgPolygonMeshProcessing +* \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` @@ -140,7 +159,7 @@ } /** -* \ingroup PkgPolygonMeshProcessing +* \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` @@ -171,28 +190,50 @@ ) { typedef typename GetGeomTraits::type Kernel; + typedef typename Kernel::FT FT; + + typedef typename GetFaceNormalMap::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::value; typedef typename Kernel::Vector_3 Vector; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; Vector normal = CGAL::NULL_VECTOR; halfedge_descriptor he = halfedge(v, pmesh); + // handle isolated vertices + if (he==boost::graph_traits::null_halfedge()) return normal; halfedge_descriptor end = he; do { if (!is_border(he, pmesh)) { - Vector n = compute_face_normal(face(he, pmesh), pmesh, np); - normal = normal + (n / std::sqrt(n*n)); + 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); - return normal / std::sqrt(normal * normal); + if (normal == CGAL::NULL_VECTOR) + return normal; + else + return normal / FT( std::sqrt( to_double(normal * normal) ) ); } /** -* \ingroup PkgPolygonMeshProcessing +* \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` @@ -230,14 +271,14 @@ } /** -* \ingroup PkgPolygonMeshProcessing +* \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::%vertex_descriptor` as key type and `Kernel::Vector_3` as value type. -* @tparam FaceNormalMap a model of `WritablePropertyMap` with +* @tparam FaceNormalMap a model of `ReadWritePropertyMap` with `boost::graph_traits::%face_descriptor` as key type and `Kernel::Vector_3` as value type. * @@ -264,8 +305,8 @@ , const NamedParameters& np ) { - compute_vertex_normals(pmesh, vnm, np); compute_face_normals(pmesh, fnm, np); + compute_vertex_normals(pmesh, vnm, np.face_normal_map(fnm)); } ///\cond SKIP_IN_MANUAL diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/connected_components.h cgal-4.8/include/CGAL/Polygon_mesh_processing/connected_components.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/connected_components.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/connected_components.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,6 +23,9 @@ #include #include + +#include +#include #include #include #include @@ -393,11 +396,10 @@ }// namespace internal /*! - * \ingroup PkgPolygonMeshProcessing + * \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`. - * Two faces are recorded in the same connected component if they share an edge that is not marked as constrained. - + * * \tparam PolygonMesh a model of `FaceGraph` * \tparam FaceOutputIterator a model of `OutputIterator` that accepts faces of type @@ -437,7 +439,8 @@ internal::No_constraint//default > ::type EdgeConstraintMap; EdgeConstraintMap ecmap - = choose_param(get_param(np, edge_is_constrained), EdgeConstraintMap()); + = choose_param(get_param(np, edge_is_constrained), + internal::No_constraint()); typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -474,9 +477,8 @@ } /*! - * \ingroup PkgPolygonMeshProcessing + * \ingroup keep_connected_components_grp * computes for each face the index of the corresponding connected component. - * Two faces are recorded in the same connected component if they share an edge that is not marked as constrained. * * 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. @@ -505,7 +507,7 @@ > typename boost::property_traits::value_type connected_components(const PolygonMesh& pmesh, - const FaceComponentMap& fcm, + FaceComponentMap fcm, const NamedParameters& np) { using boost::choose_param; @@ -518,7 +520,8 @@ internal::No_constraint//default > ::type EdgeConstraintMap; EdgeConstraintMap ecmap - = choose_param(get_param(np, edge_is_constrained), EdgeConstraintMap()); + = choose_param(get_param(np, edge_is_constrained), + internal::No_constraint()); typedef Dual Dual; typedef boost::filtered_graph typename boost::property_traits::value_type connected_components(const PolygonMesh& pmesh, - const FaceComponentMap& fcm) + FaceComponentMap fcm) { return CGAL::Polygon_mesh_processing::connected_components(pmesh, fcm, @@ -559,16 +562,15 @@ , const NamedParameters& np); /*! - * \ingroup PkgPolygonMeshProcessing - * removes the small connected components and all the isolated vertices. + * \ingroup keep_connected_components_grp + * removes the small connected components and all isolated vertices. * Keep `nb_components_to_keep` largest connected components. - * Two faces are considered in the same connected component if they share an edge that is not marked as constrained. * * 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` + * \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph` * \tparam NamedParameters a sequence of \ref namedparameters * * \param pmesh the polygon mesh @@ -606,6 +608,14 @@ boost::vector_property_map 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; @@ -637,6 +647,83 @@ 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 +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::face_descriptor face_descriptor; + + using boost::choose_param; + using boost::get_param; + using boost::choose_const_pmap; + + //FaceIndexMap + typedef typename GetFaceIndexMap::type FaceIndexMap; + FaceIndexMap fim = choose_const_pmap(get_param(np, boost::face_index), + pmesh, + boost::face_index); + + //vector_property_map + boost::vector_property_map face_cc(fim); + std::size_t num = connected_components(pmesh, face_cc, np); + std::vector< std::pair > 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 cc_to_keep; + for(std::size_t i=0; i= 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 +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 ::%face_descriptor` * indicating the connected components to be removed. @@ -926,8 +1012,7 @@ /*! * \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 the isolated vertices. -* Two faces are considered in the same connected component if they share an edge that is not marked as constrained. +* 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 @@ -936,7 +1021,7 @@ * \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` +* \tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph` * \tparam NamedParameters a sequence of \ref namedparameters * \tparam FaceRange a range of `boost::graph_traits::%face_descriptor` * indicating the connected components to be kept. diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/distance.h cgal-4.8/include/CGAL/Polygon_mesh_processing/distance.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/distance.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/distance.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,6 +26,8 @@ #include #include #include +#include +#include /// \cond SKIP_IN_MANUAL @@ -41,8 +43,8 @@ double distance, OutputIterator out) { - const double d_p0p1 = std::sqrt( CGAL::squared_distance(p0, p1) ); - const double d_p0p2 = std::sqrt( CGAL::squared_distance(p0, p2) ); + 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 )); @@ -88,7 +90,7 @@ const Point_3& p1=t[(i+1)%3]; if ( sampled_edges.insert(CGAL::make_sorted_pair(p0, p1)).second ) { - const double d_p0p1 = std::sqrt( CGAL::squared_distance(p0, p1) ); + 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; @@ -139,7 +141,7 @@ double hdist = 0; BOOST_FOREACH(const typename Kernel::Point_3& pt, sample_points) { - double d = std::sqrt( tree.squared_distance(pt) ); + double d = CGAL::sqrt( tree.squared_distance(pt) ); // if ( d > 1e-1 ) std::cout << pt << "\n"; if (d>hdist) hdist=d; } @@ -156,7 +158,7 @@ { return (std::max)( approximated_Hausdorff_distance(triangles_1, triangles_2, targeted_precision), - approximated_Hausdorff_distance(triangles_1, triangles_2, targeted_precision) + approximated_Hausdorff_distance(triangles_2, triangles_1, targeted_precision) ); } diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/fair.h cgal-4.8/include/CGAL/Polygon_mesh_processing/fair.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/fair.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/fair.h 2016-04-04 19:00:12.000000000 +0000 @@ -41,10 +41,10 @@ // weight_calculator a function object to calculate weights, defaults to Cotangent weights and can be omitted template - bool fair(PolygonMesh& pmesh, + bool fair(TriangleMesh& tmesh, const VertexRange& vertices, SparseLinearSolver solver, WeightCalculator weight_calculator, @@ -52,16 +52,16 @@ VertexPointMap vpmap) { CGAL::Polygon_mesh_processing::internal::Fair_Polyhedron_3 - - fair_functor(pmesh, vpmap, weight_calculator); + + fair_functor(tmesh, vpmap, weight_calculator); return fair_functor.fair(vertices, solver, continuity); } } //end namespace internal /*! - \ingroup PkgPolygonMeshProcessing - @brief fairs a region on a polygon mesh. + \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, @@ -76,39 +76,43 @@ 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 polygon mesh, + 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 PolygonMesh a model of `FaceGraph` + @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 `PolygonMesh`, model of `Range`. + @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 pmesh the polygon mesh with patches to be faired + @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 `pmesh` \cgalParamEnd + \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 - bool fair(PolygonMesh& pmesh, + 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::type SparseLinearSolver; - #if defined(CGAL_EIGEN3_ENABLED) - BOOST_STATIC_ASSERT_MSG( - (!boost::is_same::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), + CGAL_static_assertion_msg( + (!boost::is_same::type, bool>::value) || EIGEN_VERSION_AT_LEAST(3, 2, 0), "The function `fair` requires Eigen3 version 3.2 or later."); #else - BOOST_STATIC_ASSERT_MSG( - (!boost::is_same::value), + CGAL_static_assertion_msg( + (!boost::is_same::type, bool>::value), "The function `fair` requires Eigen3 version 3.2 or later."); #endif - typedef typename GetVertexPointMap < PolygonMesh, NamedParameters>::type VPMap; - typedef CGAL::internal::Cotangent_weight_with_voronoi_area_fairing + typedef typename GetVertexPointMap < TriangleMesh, NamedParameters>::type VPMap; + typedef CGAL::internal::Cotangent_weight_with_voronoi_area_fairing Default_Weight_calculator; - VPMap vpmap_ = choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, pmesh)); + VPMap vpmap_ = choose_param(get_param(np, vertex_point), get(CGAL::vertex_point, tmesh)); - return internal::fair(pmesh, vertices, + 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(pmesh, vpmap_)), + choose_param(get_param(np, weight_calculator), Default_Weight_calculator(tmesh, vpmap_)), choose_param(get_param(np, fairing_continuity), 1), vpmap_ ); } - template - bool fair(PolygonMesh& pmesh, const VertexRange& vertices) + template + bool fair(TriangleMesh& tmesh, const VertexRange& vertices) { - return fair(pmesh, vertices, + return fair(tmesh, vertices, CGAL::Polygon_mesh_processing::parameters::all_default()); } - + } //end namespace Polygon_mesh_processing } //end namespace CGAL diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h 2016-04-04 19:00:12.000000000 +0000 @@ -260,7 +260,7 @@ ang_max = (std::max)(ang_max, angle); } - w = std::make_pair(ang_max, std::sqrt(CGAL::squared_area(P[i],P[j],P[k]))); + w = std::make_pair(ang_max, CGAL::sqrt(CGAL::squared_area(P[i],P[j],P[k]))); } public: @@ -330,7 +330,7 @@ // check whether the edge is border bool border = (v0 + 1 == v1) || (v0 == n-1 && v1 == 0); if(!border) { - total_length += std::sqrt(CGAL::squared_distance(P[v0],P[v1])); + total_length += CGAL::sqrt(CGAL::squared_distance(P[v0],P[v1])); } } } @@ -1193,14 +1193,15 @@ * Internal entry point for both polyline and Polyhedron_3 triangulation functions ***********************************************************************************/ template < - typename PointRange, + typename PointRange1, + typename PointRange2, typename Tracer, typename WeightCalculator, typename Kernel > typename WeightCalculator::Weight -triangulate_hole_polyline(const PointRange& points, - const PointRange& third_points, +triangulate_hole_polyline(const PointRange1& points, + const PointRange2& third_points, Tracer& tracer, const WeightCalculator& WC, bool use_delaunay_triangulation, diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Weights.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Weights.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Weights.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Weights.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,664 +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 -// General Public License as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided 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_MODELING_WEIGHTS_H -#define CGAL_SURFACE_MODELING_WEIGHTS_H -/// @cond CGAL_DOCUMENT_INTERNAL - -#include -#include -#include - -namespace CGAL { -namespace internal { -///////////////////////////////////////////////////////////////////////////////////////// -// Returns the cotangent value of half angle v0 v1 v2 -template -class Cotangent_value -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef typename boost::property_map::type Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::Kernel::Vector_3 Vector; - - - double operator()(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 = std::sqrt(e0_square); - double e2 = std::sqrt(e2_square); - double cos_angle = ( e0_square + e2_square - e1_square ) / 2.0 / e0 / e2; - double sin_angle = std::sqrt(1-cos_angle*cos_angle); - - return (cos_angle/sin_angle); - } -}; - -// 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::type> -class Cotangent_value_Meyer -{ -public: - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef VertexPointMap Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::Kernel::Vector_3 Vector; - - PolygonMesh& pmesh_; - Point_property_map ppmap; - -public: - - Cotangent_value_Meyer(PolygonMesh& pmesh_, VertexPointMap vpmap_) - : pmesh_(pmesh_) - , ppmap(vpmap_) - {} - - PolygonMesh& pmesh() - { - //std::cout << num_vertices(pmesh_) << std::endl; - //std::cout << std::distance(vertices(pmesh_).first, vertices(pmesh_).second) - // << std::endl; - 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; - // rewritten for safer fp arithmetic - //double dot_aa = a.squared_length(); - //double dot_bb = b.squared_length(); - //double divider = std::sqrt( dot_aa * dot_bb - dot_ab * dot_ab ); - - Vector cross_ab = CGAL::cross_product(a, b); - double divider = std::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::max)() : - -(std::numeric_limits::max)(); - } - - return dot_ab / divider; - } -}; - -// Returns the cotangent value of half angle v0 v1 v2 by clamping between [1, 89] degrees -// as suggested by -[Friedel] Unconstrained Spherical Parameterization- -template::type - , class CotangentValue = Cotangent_value_Meyer > -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::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::type - , class CotangentValue = Cotangent_value_Meyer > -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::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::type - , class CotangentValue = Cotangent_value_Meyer > -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::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::type - , class CotangentValue - = Cotangent_value_Meyer > -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::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::in_edge_iterator in_edge_iterator; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - typedef VertexPointMap Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::Kernel::Vector_3 Vector; - - double operator()(vertex_descriptor v0) { - - //return 1.0; - double voronoi_area = 0.0; - in_edge_iterator e, e_end; - for (boost::tie(e,e_end) = in_edges(v0, pmesh()); e != e_end; e++) - { - halfedge_descriptor he = halfedge(*e,pmesh()); - if( is_border(he,pmesh()) ) { continue; } - - CGAL_assertion(CGAL::is_triangle_mesh(pmesh())); - CGAL_assertion(v0 == target(he, pmesh()) || v0 == source(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 = std::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::type - , class CotangentValue = Cotangent_value_Meyer > -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::vertex_descriptor vertex_descriptor; - - double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2) - { - return CotangentValue::operator()(v0, v1, v2) - / std::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::type - , class CotangentValue - = Cotangent_value_minimum_zero > -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::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef typename boost::property_map::type Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::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::type - , class CotangentValue = Cotangent_value_Meyer > -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::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef typename boost::property_map::type Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::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::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::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef VertexPointMap Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::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 = std::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 = 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) - { - 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 = 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 PolygonMesh, - class PrimaryWeight = Cotangent_weight, - class SecondaryWeight = Mean_value_weight > -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::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 Uniform_weight -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - double operator()(halfedge_descriptor /*e*/) - { return 1.0; } -}; - -//////////////////////////////////////////////////////////////////////////// -// FAIRING // -template -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::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - typedef typename boost::property_map::type Point_property_map; - typedef typename boost::property_traits::value_type Point; - typedef typename Kernel_traits::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 = std::sqrt(v.squared_length()); - if(divider == 0.0) { - CGAL_warning(!"Scale dependent weight - zero length edge."); - return (std::numeric_limits::max)(); - } - return 1.0 / divider; - } -}; - -template::type -> -class Cotangent_weight_with_voronoi_area_fairing -{ - typedef PolygonMesh PM; - typedef VertexPointMap VPMap; - Voronoi_area voronoi_functor; - Cotangent_weight > 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::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::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 Uniform_weight_fairing -{ -public: - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename boost::graph_traits::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 -/// @endcond - - - -}//namespace CGAL -#endif //CGAL_SURFACE_MODELING_WEIGHTS_H diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/AABB_filtered_projection_traits.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +// + +#ifndef CGAL_AABB_FILTERED_PROJECTION_TRAITS_H +#define CGAL_AABB_FILTERED_PROJECTION_TRAITS_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace Polygon_mesh_processing { +namespace internal { + +/** + * @class Projection_traits + */ +template +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 Node; + typedef typename ::CGAL::AABB_tree::size_type size_type; + + typedef typename boost::property_traits::value_type Index_type; + + typedef std::set::type> Set_of_indices; + +public: + template + 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 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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#ifdef CGAL_PMP_REMESHING_DEBUG +#include +#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 + 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 + struct Border_constraint_pmap + { + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + + boost::shared_ptr< std::set > 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() ) + , pmesh_ptr_(NULL) + {} + Border_constraint_pmap(const PM& pmesh, const FaceRange& faces) + : border_edges_ptr(new std::set() ) + , pmesh_ptr_(&pmesh) + { + std::vector 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& 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& 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 + bool constraints_are_short_enough(const PM& pmesh, + EdgeConstraintMap ecmap, + VertexPointMap vpmap, + const double& high) + { + double sqh = high*high; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::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::edge_descriptor> + , typename VertexIsConstrainedMap = No_constraint_pmap< + typename boost::graph_traits::vertex_descriptor> + > + class Incremental_remesher + { + typedef PolygonMesh PM; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::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 Self; + + private: + typedef std::size_t Patch_id; + typedef std::vector Triangle_list; + typedef std::vector Patch_id_list; + + typedef CGAL::AABB_triangle_primitive AABB_primitive; + typedef CGAL::AABB_traits AABB_traits; + typedef CGAL::AABB_tree 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 + 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 + void split_long_edges(const EdgeRange& edge_range, + const double& high) + { + typedef boost::bimap< + boost::bimaps::set_of, + boost::bimaps::multiset_of > > 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, + boost::bimaps::multiset_of > > 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, + boost::bimaps::multiset_of > > 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 VNormalsMap; + VNormalsMap vnormals; + boost::associative_property_map propmap_normals(vnormals); + std::map 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 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::value_type VP_pair; + std::map 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 /* 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(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 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 + 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 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 + 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 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::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 > 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 > 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 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_status_map_; + bool protect_constraints_; + boost::unordered_map 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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h 2016-04-04 19:00:12.000000000 +0000 @@ -33,6 +33,13 @@ 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 }; @@ -95,6 +102,14 @@ return Params(w, *this); } + template + pmp_bgl_named_params + face_normal_map(const FaceNormalMap& m) const + { + typedef pmp_bgl_named_params Params; + return Params(m, *this); + } + //overload template pmp_bgl_named_params @@ -112,6 +127,38 @@ return Params(k, *this); } + template + pmp_bgl_named_params + number_of_iterations(const NT& n) const + { + typedef pmp_bgl_named_params Params; + return Params(n, *this); + } + + template + pmp_bgl_named_params + protect_constraints(const Boolean b) const + { + typedef pmp_bgl_named_params Params; + return Params(b, *this); + } + + template + pmp_bgl_named_params + smooth_along_features(const Boolean b) const + { + typedef pmp_bgl_named_params Params; + return Params(b, *this); + } + + template + pmp_bgl_named_params + vertex_is_constrained_map(const VertexIsConstrained& vm) const + { + typedef pmp_bgl_named_params Params; + return Params(vm, *this); + } + //overload template pmp_bgl_named_params @@ -201,6 +248,14 @@ return Params(w); } + template + pmp_bgl_named_params + face_normal_map(const FaceNormalMap& m) + { + typedef pmp_bgl_named_params Params; + return Params(m); + } + //overload template pmp_bgl_named_params @@ -218,6 +273,38 @@ return Params(k); } + template + pmp_bgl_named_params + number_of_iterations(const NT& n) + { + typedef pmp_bgl_named_params Params; + return Params(n); + } + + template + pmp_bgl_named_params + protect_constraints(const Boolean b) + { + typedef pmp_bgl_named_params Params; + return Params(b); + } + + template + pmp_bgl_named_params + smooth_along_features(const Boolean b) + { + typedef pmp_bgl_named_params Params; + return Params(b); + } + + template + pmp_bgl_named_params + vertex_is_constrained_map(const VertexIsConstrained& vm) + { + typedef pmp_bgl_named_params Params; + return Params(vm); + } + //overload template pmp_bgl_named_params diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/named_params_helper.h 2016-04-04 19:00:12.000000000 +0000 @@ -100,6 +100,29 @@ > ::type type; }; +template +class GetFaceNormalMap +{ + struct DummyNormalPmap + { + typedef typename boost::graph_traits::face_descriptor key_type; + typedef typename GetGeomTraits::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 class GetSolver { diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -113,9 +113,9 @@ 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 = std::sqrt(CGAL::squared_distance(c,vpmap[vi])); - double dist_c_vj = std::sqrt(CGAL::squared_distance(c,vpmap[vj])); - double dist_c_vk = std::sqrt(CGAL::squared_distance(c,vpmap[vk])); + 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) && @@ -218,7 +218,7 @@ } const Point_3& vq = vpmap[target(opposite(*circ,pmesh),pmesh)]; - sum += std::sqrt(CGAL::squared_distance(vp, vq)); + sum += CGAL::sqrt(CGAL::squared_distance(vp, vq)); ++deg; } while(++circ != done); @@ -303,20 +303,22 @@ std::map scale_attribute; calculate_scale_attribute(faces, interior_map, scale_attribute, accept_internal_facets); - std::vector new_faces; + std::vector all_faces(boost::begin(faces), boost::end(faces)); CGAL::Timer total_timer; total_timer.start(); for(int i = 0; i < 10; ++i) { + std::vector new_faces; CGAL::Timer timer; timer.start(); - bool is_subdivided = subdivide(faces, border_edges, scale_attribute, vertex_out, facet_out, new_faces, alpha); + 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; } + 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; } + 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; diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/measure.h cgal-4.8/include/CGAL/Polygon_mesh_processing/measure.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/measure.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/measure.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include +#include +#include + +#include +#include + +#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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::type::FT +#endif + edge_length(typename boost::graph_traits::halfedge_descriptor h + , const PolygonMesh& pmesh + , const NamedParameters& np) + { + using boost::choose_const_pmap; + using boost::get_param; + + typename GetVertexPointMap::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 CGAL::Kernel_traits::type>::Kernel::FT + edge_length(typename boost::graph_traits::halfedge_descriptor h + , const PolygonMesh& pmesh) + { + return edge_length(h, pmesh, + CGAL::Polygon_mesh_processing::parameters::all_default()); + } + // edge overloads + template + typename GetGeomTraits::type::FT + edge_length(typename boost::graph_traits::edge_descriptor e + , const PolygonMesh& pmesh + , const NamedParameters& np) + { + return edge_length(halfedge(e,pmesh), pmesh, np); + } + + template + typename CGAL::Kernel_traits::type>::Kernel::FT + edge_length(typename boost::graph_traits::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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::type::FT +#endif + face_border_length( + typename boost::graph_traits::halfedge_descriptor h + , const PolygonMesh& pmesh + , const NamedParameters& np) + { + double result = 0.; + BOOST_FOREACH(typename boost::graph_traits::halfedge_descriptor haf, + halfedges_around_face(h, pmesh)) + { + result += edge_length(haf, pmesh, np); + } + return result; + } + + template + typename CGAL::Kernel_traits::type>::Kernel::FT + face_border_length( + typename boost::graph_traits::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::%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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::type::FT +#endif + face_area(typename boost::graph_traits::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::null_face() != f); + + typename GetVertexPointMap::const_type + vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), + tmesh, + CGAL::vertex_point); + + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + halfedge_descriptor hd = halfedge(f, tmesh); + halfedge_descriptor nhd = next(hd, tmesh); + + typename GetGeomTraits::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 CGAL::Kernel_traits::type>::Kernel::FT + face_area(typename boost::graph_traits::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::%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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::type::FT +#endif + area(FaceRange face_range + , const TriangleMesh& tmesh + , const CGAL_PMP_NP_CLASS& np) + { + typedef typename boost::graph_traits::face_descriptor face_descriptor; + double result = 0.; + BOOST_FOREACH(face_descriptor f, face_range) + { + result += face_area(f, tmesh, np); + } + return result; + } + + template + 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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::type::FT +#endif + area(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) + { + return area(faces(tmesh), tmesh, np); + } + + template + typename CGAL::Kernel_traits::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 +#ifdef DOXYGEN_RUNNING + FT +#else + typename GetGeomTraits::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::const_type + vpm = choose_const_pmap(get_param(np, CGAL::vertex_point), + tmesh, + CGAL::vertex_point); + typename GetGeomTraits::type::Point_3 + origin(0, 0, 0); + + typedef typename boost::graph_traits::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 CGAL::Kernel_traits::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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/orientation.h cgal-4.8/include/CGAL/Polygon_mesh_processing/orientation.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/orientation.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/orientation.h 2016-04-04 19:00:12.000000000 +0000 @@ -56,7 +56,7 @@ } // end of namespace internal /** - * \ingroup PkgPolygonMeshProcessing + * \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. @@ -160,10 +160,10 @@ } /** -* \ingroup reverse_face_orientations_grp +* \ingroup PMP_orientation_grp * reverses for each face the order of the vertices along the face boundary. * -* @tparam PolygonMesh a model of `FaceListGraph` +* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph` */ template void reverse_face_orientations(PolygonMesh& pmesh) @@ -187,12 +187,12 @@ } /** -* \ingroup reverse_face_orientations_grp +* \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` +* @tparam PolygonMesh a model of `FaceListGraph` and `MutableFaceGraph` * @tparam FaceRange range of face descriptors, model of `Range`. * Its iterator type is `InputIterator`. */ diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h cgal-4.8/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,11 +24,13 @@ #include #include +#include #include #include #include #include +#include #include #include @@ -377,7 +379,7 @@ } // namespace internal /** - * \ingroup PkgPolygonMeshProcessing + * \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. diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h cgal-4.8/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,11 +21,11 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH #define CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH -#include #include #include #include #include +#include namespace CGAL { @@ -37,12 +37,12 @@ , typename Point , typename Polygon> class Polygon_soup_to_polygon_mesh - : public CGAL::Modifier_base< PM > { const std::vector& _points; const std::vector& _polygons; - typedef typename PM::Point Point_3; + typedef typename boost::property_map::type Vpmap; + typedef typename boost::property_traits::value_type Point_3; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -62,8 +62,7 @@ void operator()(PM& pmesh) { - typename boost::property_map::type - vpmap = get(CGAL::vertex_point, pmesh); + Vpmap vpmap = get(CGAL::vertex_point, pmesh); std::vector vertices(_points.size()); for (std::size_t i = 0, end = _points.size(); i < end; ++i) @@ -94,7 +93,7 @@ /// \cond SKIP_IN_MANUAL /** - * \ingroup PkgPolygonMeshProcessing + * \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()`. * @@ -128,12 +127,12 @@ /// \endcond /** - * \ingroup PkgPolygonMeshProcessing + * \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` + * @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` containing the indices * of the points of the face diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/refine.h cgal-4.8/include/CGAL/Polygon_mesh_processing/refine.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/refine.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/refine.h 2016-04-04 19:00:12.000000000 +0000 @@ -31,29 +31,29 @@ namespace Polygon_mesh_processing { /*! - \ingroup PkgPolygonMeshProcessing - @brief refines a region of a polygon mesh + \ingroup PMP_meshing_grp + @brief refines a region of a triangle mesh - @tparam PolygonMesh model of `MutableFaceGraph` + @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::%face_descriptor` for patch faces + holding `boost::graph_traits::%face_descriptor` for patch faces @tparam VertexOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%vertex_descriptor` for patch vertices + holding `boost::graph_traits::%vertex_descriptor` for patch vertices @tparam NamedParameters a sequence of \ref namedparameters - @param pmesh polygon mesh with patches to be refined + @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 `pmesh` + \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 ouput mesh, + \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 @@ -61,15 +61,17 @@ @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 std::pair - refine(PolygonMesh& pmesh, + refine(TriangleMesh& tmesh, const FaceRange& faces, FaceOutputIterator faces_out, VertexOutputIterator vertices_out, @@ -79,12 +81,14 @@ using boost::choose_param; using boost::get_param; - typedef typename GetVertexPointMap::type VPmap; + CGAL_precondition(is_triangle_mesh(tmesh) ); + + typedef typename GetVertexPointMap::type VPmap; VPmap vpm = choose_pmap(get_param(np, boost::vertex_point), - pmesh, + tmesh, boost::vertex_point); - internal::Refine_Polyhedron_3 refine_functor(pmesh, vpm); + internal::Refine_Polyhedron_3 refine_functor(tmesh, vpm); refine_functor.refine(faces, faces_out, vertices_out, @@ -93,18 +97,18 @@ } ///\cond SKIP_IN_MANUAL - template std::pair - refine(PolygonMesh& pmesh, + refine(TriangleMesh& tmesh, const FaceRange& faces, FaceOutputIterator faces_out, VertexOutputIterator vertices_out) { - return refine(pmesh, faces, faces_out, vertices_out, + return refine(tmesh, faces, faces_out, vertices_out, CGAL::Polygon_mesh_processing::parameters::all_default()); } ///\endcond diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/remesh.h cgal-4.8/include/CGAL/Polygon_mesh_processing/remesh.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/remesh.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/remesh.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#include +#include + +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::%face_descriptor` +* and `boost::graph_traits::%halfedge_descriptor` must be +* models of `Hashable`. +* @tparam FaceRange range of `boost::graph_traits::%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 +void isotropic_remeshing(const FaceRange& faces + , const double& target_edge_length + , PolygonMesh& pmesh + , const NamedParameters& np) +{ + typedef PolygonMesh PM; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + using boost::choose_pmap; + using boost::get_param; + using boost::choose_param; + + typedef typename GetGeomTraits::type GT; + + typedef typename GetVertexPointMap::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//default + > ::type ECMap; + ECMap ecmap + = choose_param(get_param(np, edge_is_constrained), + internal::Border_constraint_pmap(pmesh, faces)); + + typedef typename boost::lookup_named_param_def < + CGAL::vertex_is_constrained_t, + NamedParameters, + internal::No_constraint_pmap//default + > ::type VCMap; + VCMap vcmap = choose_param(get_param(np, vertex_is_constrained), + internal::No_constraint_pmap()); + + 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 + 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 +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::%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 +void split_long_edges(const EdgeRange& edges + , const double& max_length + , PolygonMesh& pmesh + , const NamedParameters& np) +{ + typedef PolygonMesh PM; + typedef typename boost::graph_traits::edge_descriptor edge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + using boost::choose_pmap; + using boost::choose_param; + using boost::get_param; + + typedef typename GetGeomTraits::type GT; + typedef typename GetVertexPointMap::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//default + > ::type ECMap; + ECMap ecmap = choose_param(get_param(np, edge_is_constrained), + internal::No_constraint_pmap()); + + typename internal::Incremental_remesher + remesher(pmesh, vpmap, false/*protect constraints*/ + , ecmap + , internal::No_constraint_pmap() + , false/*need aabb_tree*/); + + remesher.split_long_edges(edges, max_length); +} + +template +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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/repair.h cgal-4.8/include/CGAL/Polygon_mesh_processing/repair.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/repair.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/repair.h 2016-04-04 19:00:12.000000000 +0000 @@ -124,6 +124,8 @@ 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) ); @@ -806,6 +808,38 @@ } /// \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 +std::size_t remove_isolated_vertices(PolygonMesh& pmesh) +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + std::vector 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 -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/self_intersections.h cgal-4.8/include/CGAL/Polygon_mesh_processing/self_intersections.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/self_intersections.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/self_intersections.h 2016-04-04 19:00:12.000000000 +0000 @@ -203,7 +203,7 @@ #endif /** - * \ingroup PkgPolygonMeshProcessing + * \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)` @@ -256,7 +256,7 @@ /// \endcond /*! - * \ingroup PkgPolygonMeshProcessing + * \ingroup PMP_intersection_grp * Same as above but the self-intersections reported * are only limited to the faces in `face_range`. * @@ -350,7 +350,7 @@ /// \endcond /** - * \ingroup PkgPolygonMeshProcessing + * \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)` diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/stitch_borders.h cgal-4.8/include/CGAL/Polygon_mesh_processing/stitch_borders.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/stitch_borders.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/stitch_borders.h 2016-04-04 19:00:12.000000000 +0000 @@ -257,10 +257,10 @@ /*! -* \ingroup stitching_grp +* \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 +* 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: @@ -324,7 +324,7 @@ } ///\endcond -/// \ingroup stitching_grp +/// \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 diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/triangulate_faces.h cgal-4.8/include/CGAL/Polygon_mesh_processing/triangulate_faces.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/triangulate_faces.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/triangulate_faces.h 2016-04-04 19:00:12.000000000 +0000 @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -92,137 +93,143 @@ return fh->info().is_external; } - void operator()(PM& pmesh) + void triangulate_face(face_descriptor f, 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 facets; - facets.reserve(num_faces(pmesh)); + typename Traits::Vector_3 normal = + Polygon_mesh_processing::compute_face_normal(f, pmesh); - //only consider non-triangular faces - BOOST_FOREACH(face_descriptor fit, faces(pmesh)) - if ( next( next( halfedge(fit, pmesh), pmesh), pmesh) - != prev( halfedge(fit, pmesh), pmesh) ) - facets.push_back(fit); + P_traits cdt_traits(normal); + CDT cdt(cdt_traits); - // Iterates on the vector of face descriptors - BOOST_FOREACH(face_descriptor f, facets) + // 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 { - typename Traits::Vector_3 normal = - Polygon_mesh_processing::compute_face_normal(f, pmesh); + 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); - P_traits cdt_traits(normal); - CDT cdt(cdt_traits); + } while( h != start ); + cdt.insert_constraint(previous, first); - // 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); + // 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 face_queue; + face_queue.push(cdt.infinite_vertex()->face()); + while(! face_queue.empty() ) + { + typename CDT::Face_handle fh = face_queue.front(); + face_queue.pop(); - } while( h != start ); - cdt.insert_constraint(previous, first); + if(fh->info().is_external) + continue; - // sets mark is_external - for(typename CDT::All_faces_iterator fit = cdt.all_faces_begin(), - end = cdt.all_faces_end(); - fit != end; ++fit) + fh->info().is_external = true; + for(int i = 0; i <3; ++i) { - fit->info().is_external = false; - } - std::queue 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))) { - if(!cdt.is_constrained(typename CDT::Edge(fh, i))) - { - face_queue.push(fh->neighbor(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); + // 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)); + 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 + 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); + { + // 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; + 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); + 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( 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(); - } + 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) + } + for(typename CDT::Finite_faces_iterator fit = cdt.finite_faces_begin(), + end = cdt.finite_faces_end(); + fit != end; ++fit) + { + if(!is_external(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); + 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); - } + Euler::fill_hole(h0, pmesh); } - } // end loop on facets of the input polyhedron + } + } + + template + 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 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) @@ -248,12 +255,61 @@ }//end namespace internal /** -* \ingroup PkgPolygonMeshProcessing -* triangulates faces of a polygon mesh. This function depends on the package \ref PkgTriangulation2Summary +* \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 +void triangulate_face(typename boost::graph_traits::face_descriptor f, + PolygonMesh& pmesh, + const NamedParameters& np) +{ + using boost::choose_const_pmap; + using boost::get_param; + + //VertexPointMap + typedef typename GetVertexPointMap::type VPMap; + VPMap vpmap = choose_pmap(get_param(np, boost::vertex_point), + pmesh, + boost::vertex_point); + //Kernel + typedef typename GetGeomTraits::type Kernel; + + internal::Triangulate_modifier modifier(vpmap); + modifier.triangulate_face(f, pmesh); +} + +template +void triangulate_face(typename boost::graph_traits::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::%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 * @@ -263,8 +319,9 @@ * \cgalNamedParamsEnd * */ -template -void triangulate_faces(PolygonMesh& pmesh, +template +void triangulate_faces(FaceRange face_range, + PolygonMesh& pmesh, const NamedParameters& np) { using boost::choose_const_pmap; @@ -279,14 +336,42 @@ typedef typename GetGeomTraits::type Kernel; internal::Triangulate_modifier modifier(vpmap); - modifier(pmesh); + modifier(face_range, pmesh); +} + +template +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 +void triangulate_faces(PolygonMesh& pmesh, + const NamedParameters& np) +{ + triangulate_faces(faces(pmesh), pmesh, np); } template void triangulate_faces(PolygonMesh& pmesh) { - return triangulate_faces(pmesh, - CGAL::Polygon_mesh_processing::parameters::all_default()); + triangulate_faces(faces(pmesh), pmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } } // end namespace Polygon_mesh_processing diff -Nru cgal-4.7/include/CGAL/Polygon_mesh_processing/triangulate_hole.h cgal-4.8/include/CGAL/Polygon_mesh_processing/triangulate_hole.h --- cgal-4.7/include/CGAL/Polygon_mesh_processing/triangulate_hole.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polygon_mesh_processing/triangulate_hole.h 2016-04-04 19:00:12.000000000 +0000 @@ -33,12 +33,14 @@ #include +#include + namespace CGAL { namespace Polygon_mesh_processing { /*! - \ingroup PkgPolygonMeshProcessing + \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. @@ -128,7 +130,7 @@ } /*! - \ingroup PkgPolygonMeshProcessing + \ingroup hole_filling_grp @brief triangulates and refines a hole in a polygon mesh. @tparam PolygonMesh must be model of `MutableFaceGraph` @@ -194,7 +196,7 @@ } /*! - \ingroup PkgPolygonMeshProcessing + \ingroup hole_filling_grp @brief triangulates, refines and fairs a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` @@ -274,29 +276,35 @@ } /*! - \ingroup PkgPolygonMeshProcessing + \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 facet this segment is incident to. + 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. - @tparam OutputIteratorValueType value type of `OutputIterator` - having a constructor `OutputIteratorValueType(int p0, int p1, int p2)` available. - It defaults to `value_type_traits::%type`, and can be omitted when the default is fine. + @pre `third_points.size() == points.size()` + @tparam PointRange range of points, model of `Range`. Its iterator type is `InputIterator`. - @tparam OutputIterator model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces + @tparam OutputIterator model of `OutputIterator`, to collect patch faces. + A specialization for `CGAL::value_type_traits` 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 + @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 @@ -306,13 +314,13 @@ \todo handle islands */ - template OutputIterator - triangulate_hole_polyline(const PointRange& points, - const PointRange& third_points, + triangulate_hole_polyline(const PointRange1& points, + const PointRange2& third_points, OutputIterator out, const NamedParameters& np) { @@ -338,7 +346,7 @@ CGAL::internal::Tracer_polyline_incomplete tracer(out, Holes_out(holes)); - typedef typename PointRange::iterator InIterator; + typedef typename PointRange1::iterator InIterator; typedef typename std::iterator_traits::value_type Point; triangulate_hole_polyline(points, third_points, tracer, WC(), @@ -350,11 +358,12 @@ return tracer.out; } - template OutputIterator - triangulate_hole_polyline(const PointRange& points, - const PointRange& third_points, + triangulate_hole_polyline(const PointRange1& points, + const PointRange2& third_points, OutputIterator out) { return triangulate_hole_polyline(points, third_points, out, @@ -362,19 +371,22 @@ } /*! - \ingroup PkgPolygonMeshProcessing + \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 CGAL_PMP_NP_TEMPLATE_PARAMETERS> OutputIterator triangulate_hole_polyline(const PointRange& points, OutputIterator out, - const NamedParameters& np) + const CGAL_PMP_NP_CLASS& np) { - return triangulate_hole_polyline(points, PointRange(), out, 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 +#include +#include + +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 +struct Cotangent_value_Meyer_impl +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + template + double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, const VertexPointMap& ppmap) + { + typedef typename Kernel_traits< + typename boost::property_traits::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::max)() : + -(std::numeric_limits::max)(); + } + + return dot_ab / divider; + } +}; + +// Same as above but with a different API +template::type> +class Cotangent_value_Meyer +{ +protected: + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef VertexPointMap Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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()(v0,v1,v2,ppmap); + } +}; + + +// imported from skeletonization +template::type> +class Cotangent_value_Meyer_secure +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef VertexPointMap Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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::type + , class CotangentValue = Cotangent_value_Meyer > +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::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::type + , class CotangentValue = Cotangent_value_Meyer > +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::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::type + , class CotangentValue = Cotangent_value_Meyer > +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::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 > +struct Cotangent_value_minimum_zero_impl : CotangentValue +{ + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + template + 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::type + , class CotangentValue + = Cotangent_value_Meyer > +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::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::in_edge_iterator in_edge_iterator; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + typedef VertexPointMap Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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::type + , class CotangentValue = Cotangent_value_Meyer > +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::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 > +struct Cotangent_weight_impl : CotangentValue +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + // Returns the cotangent weight of specified halfedge_descriptor + // Edge orientation is trivial + template + 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::type + , class CotangentValue + = Cotangent_value_minimum_zero > +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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef typename boost::property_map::type Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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 > +struct Single_cotangent_weight_impl : CotangentValue +{ + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::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 + 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::type + , class CotangentValue = Cotangent_value_Meyer > +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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef typename boost::property_map::type Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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::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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef VertexPointMap Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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, + class SecondaryWeight = Mean_value_weight > +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::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 Uniform_weight +{ +public: + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + double operator()(halfedge_descriptor /*e*/) + { return 1.0; } +}; + +//////////////////////////////////////////////////////////////////////////// +// FAIRING // +template +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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + typedef typename boost::property_map::type Point_property_map; + typedef typename boost::property_traits::value_type Point; + typedef typename Kernel_traits::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::max)(); + } + return 1.0 / divider; + } +}; + +template::type +> +class Cotangent_weight_with_voronoi_area_fairing +{ + typedef PolygonMesh PM; + typedef VertexPointMap VPMap; + Voronoi_area voronoi_functor; + Cotangent_weight > 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::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::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 Uniform_weight_fairing +{ +public: + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::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 -Nru cgal-4.7/include/CGAL/polygon_mesh_processing.h cgal-4.8/include/CGAL/polygon_mesh_processing.h --- cgal-4.7/include/CGAL/polygon_mesh_processing.h 2015-10-07 13:02:59.000000000 +0000 +++ cgal-4.8/include/CGAL/polygon_mesh_processing.h 2016-04-04 19:00:12.000000000 +0000 @@ -36,3 +36,8 @@ #include #include #include +#include +#include +#include +#include +#include diff -Nru cgal-4.7/include/CGAL/Polyhedral_mesh_domain_3.h cgal-4.8/include/CGAL/Polyhedral_mesh_domain_3.h --- cgal-4.7/include/CGAL/Polyhedral_mesh_domain_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyhedral_mesh_domain_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -29,6 +29,7 @@ #include +#include #include #include #include @@ -286,9 +287,13 @@ 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)); - bounding_tree_->build(); + if(!bounding_polyhedron.empty()) { + bounding_tree_->build(); + } } else { tree_.rebuild(TriangleAccessor().triangles_begin(bounding_polyhedron), @@ -366,6 +371,14 @@ } + /** + * 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 diff -Nru cgal-4.7/include/CGAL/Polyhedron_3.h cgal-4.8/include/CGAL/Polyhedron_3.h --- cgal-4.7/include/CGAL/Polyhedron_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyhedron_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -37,6 +37,7 @@ #include #include + namespace CGAL { template @@ -1540,4 +1541,6 @@ #include #endif +#include + #endif // CGAL_POLYHEDRON_3_H // diff -Nru cgal-4.7/include/CGAL/Polyhedron_incremental_builder_3.h cgal-4.8/include/CGAL/Polyhedron_incremental_builder_3.h --- cgal-4.7/include/CGAL/Polyhedron_incremental_builder_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyhedron_incremental_builder_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -195,8 +195,9 @@ CGAL_assertion_code(check_protocoll = 0;) } - ~Polyhedron_incremental_builder_3() { - CGAL_assertion( check_protocoll == 0); + ~Polyhedron_incremental_builder_3() CGAL_NOEXCEPT(CGAL_NO_ASSERTIONS_BOOL) + { + CGAL_destructor_assertion( check_protocoll == 0); } // OPERATIONS diff -Nru cgal-4.7/include/CGAL/Polyline_constraint_hierarchy_2.h cgal-4.8/include/CGAL/Polyline_constraint_hierarchy_2.h --- cgal-4.7/include/CGAL/Polyline_constraint_hierarchy_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyline_constraint_hierarchy_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -1000,7 +1000,7 @@ void Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ - Context_list* hcl; + Context_list* hcl=NULL; if(!get_contexts(va,vb,hcl)) CGAL_triangulation_assertion(false); Context_list* hcl2 = new Context_list; diff -Nru cgal-4.7/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h cgal-4.8/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h --- cgal-4.7/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyline_simplification_2/Hybrid_squared_distance_cost.h 2016-04-04 19:00:12.000000000 +0000 @@ -86,7 +86,7 @@ FT d2 = mSquaredRatio; - Vertex_circulator vc = (*vicq)->incident_vertices(), done(vc); + 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())); diff -Nru cgal-4.7/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h cgal-4.8/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h --- cgal-4.7/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h 2016-04-04 19:00:12.000000000 +0000 @@ -84,7 +84,7 @@ FT d2; bool d2_uninitialized = true; - Vertex_circulator vc = (*vicq)->incident_vertices(), done(vc); + Vertex_circulator vc = pct.incident_vertices(*vicq), done(vc); do { if((vc != pct.infinite_vertex()) && (vc != *vicp) && (vc != *vicr)){ if(d2_uninitialized){ diff -Nru cgal-4.7/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h cgal-4.8/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h --- cgal-4.7/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/JAMA_numeric_solvers_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +#ifdef CGAL_HAVE_TNT +#include +#include +#include +#endif + +#include +#include +#include + +//#include + +namespace CGAL { namespace POLYNOMIAL { namespace internal { +#if CGAL_HAVE_TNT +//static const double max_error_value =0.00005; + +template +static void jama_compute_roots(const NT *begin, const NT *end, NT lb, +NT ub, std::vector &roots) +{ + int degree= end-begin-1; + TNT::Array2D 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 ev(arr); + TNT::Array1D 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()); + 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 &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(begin, end, lb, ub, roots); +#else + CGAL_error(); +#endif + //jama_compute_roots(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 &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(begin, end, lb, ub, roots); +#else + CGAL_error(); +#endif + } +} + + +} } } //namespace CGAL::POLYNOMIAL::internal diff -Nru cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers.h cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers.h --- cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers.h 2016-04-04 19:00:11.000000000 +0000 @@ -109,4 +109,10 @@ }; } } } //namespace CGAL::POLYNOMIAL::internal + +#ifdef CGAL_HEADER_ONLY +#include +#include +#endif // CGAL_HEADER_ONLY + #endif diff -Nru cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_impl.h cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_impl.h --- cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +#ifdef CGAL_HAVE_TNT +#include +#include +#include +#endif + +#include +#include +#include + +//#include + +namespace CGAL { namespace POLYNOMIAL { namespace internal { +#if CGAL_HAVE_TNT +//static const double max_error_value =0.00005; + +template +static void jama_compute_roots(const NT *begin, const NT *end, NT lb, +NT ub, std::vector &roots) +{ + int degree= end-begin-1; + TNT::Array2D 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 ev(arr); + TNT::Array1D 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()); + 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 &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(begin, end, lb, ub, roots); +#else + CGAL_error(); +#endif + //jama_compute_roots(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 &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(begin, end, lb, ub, roots); +#else + CGAL_error(); +#endif + } +} + + +} } } //namespace CGAL::POLYNOMIAL::internal diff -Nru cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_support.h cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support.h --- cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_support.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support.h 2016-04-04 19:00:11.000000000 +0000 @@ -57,4 +57,9 @@ std::vector &roots); } } } //namespace CGAL::POLYNOMIAL::internal + +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif diff -Nru cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h --- cgal-4.7/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +#include +#include +#include + +/*#ifdef _MSC_VER +#pragma warning(disable:1572) +#endif*/ + +namespace CGAL { namespace POLYNOMIAL { namespace internal { + +static double max_error_value=.00005; + +namespace { +template +inline void compute_quadratic_roots_t(const NT *begin, const NT * /*end*/, NT lb, NT ub, +std::vector &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 &roots) +{ + return compute_quadratic_roots_t(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 &roots) +{ + return compute_quadratic_roots_t(begin, end, lb, ub, roots); +} + +namespace { +template +inline void compute_linear_roots_t(const NT *begin, const NT *, + NT lb, NT ub, + std::vector &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 &roots) +{ + return compute_linear_roots_t(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 &roots) +{ + return compute_linear_roots_t(begin, end, lb, ub, roots); +} + + +namespace { +template + inline void filter_roots_t(const NT *begin, const NT *end, + NT lb, NT ub, NT last_root, std::vector &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::infinity(); + + while (roots.back() < lb) { + last_root= roots.back(); + roots.pop_back(); + }*/ + //if (roots.back() > lb+eps) return; + + //typedef CGAL_POLYNOMIAL_NS::Polynomial Fn; + + typedef CGAL_POLYNOMIAL_NS::Interval_polynomial IFn; + typedef CGAL_POLYNOMIAL_NS::internal::Derivative 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::infinity()){ + if ((end-begin)%2==1) { + vi= std::numeric_limits::infinity(); + } else { + vi = -*(end-1); + } + } else { + IFn fi(begin, end); + if (roots.empty()) { + Interval_arithmetic_guard guard; + if (ub== std::numeric_limits::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 &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 &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 &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 -Nru cgal-4.7/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h cgal-4.8/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h --- cgal-4.7/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/internal/Turkowski_numeric_solvers_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +/*#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. + * + * 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 +#include + +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(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::infinity(); + int t; + FLOAT p=std::numeric_limits::infinity(), q=std::numeric_limits::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 +static void Turkowski_polynomial_compute_roots_t(const double *begin, + const double *end, + double lb, double ub, + std::vector &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::infinity(); + }*/ + + for (unsigned int i=0; i< MAXN; ++i){ + cc[i]=std::numeric_limits::infinity(); + rp[i]=std::numeric_limits::infinity(); + cc[i]=std::numeric_limits::infinity(); + } + + FindPolynomialRoots(begin, rp, cp, cc, static_cast(numc)-1, 10*static_cast(numc), 40); + + /*if (CLEAN) { + lb-= .000005; + }*/ + double last= -std::numeric_limits::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] << "+" <()); + + 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 &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()); + break; + } + default: + Turkowski_polynomial_compute_roots_t(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 &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::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()); + filter_solver_roots(begin, end, lb, ub, last, roots); + break; + } + default: + Turkowski_polynomial_compute_roots_t(begin, end, lb, ub, roots); + } +} + + +} } } //namespace CGAL::POLYNOMIAL::internal diff -Nru cgal-4.7/include/CGAL/Polynomial/Polynomial_type.h cgal-4.8/include/CGAL/Polynomial/Polynomial_type.h --- cgal-4.7/include/CGAL/Polynomial/Polynomial_type.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polynomial/Polynomial_type.h 2016-04-04 19:00:12.000000000 +0000 @@ -46,10 +46,7 @@ #include #include - -#ifdef CGAL_HAS_THREADS -# include -#endif +#include namespace CGAL { @@ -268,15 +265,8 @@ // 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 + CGAL_STATIC_THREAD_LOCAL_VARIABLE(Self, x, 0); + return x; } public: @@ -607,7 +597,7 @@ //! return \c -p if \c p.sign()<0 and \c p otherwise Polynomial abs() const - { if ( sign()<0 ) return -*this; return *this; } + { return ( sign()<0 )? -*this : *this; } //! return the gcd of all coefficients /*! The content is defined as 1 for the zero polynomial. */ diff -Nru cgal-4.7/include/CGAL/Polytope_distance_d.h cgal-4.8/include/CGAL/Polytope_distance_d.h --- cgal-4.7/include/CGAL/Polytope_distance_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Polytope_distance_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,6 +25,7 @@ // -------- #include #include +#include #include #include @@ -665,7 +666,7 @@ { return ( std::find_if ( first, last, CGAL::compose1_1 - ( std::bind2nd(std::not_equal_to(), d), + ( boost::bind2nd(std::not_equal_to(), d), tco.access_dimension_d_object())) == last); } diff -Nru cgal-4.7/include/CGAL/primes.h cgal-4.8/include/CGAL/primes.h --- cgal-4.7/include/CGAL/primes.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/primes.h 2016-04-04 19:00:12.000000000 +0000 @@ -63,4 +63,8 @@ } } +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_PRIMES_H diff -Nru cgal-4.7/include/CGAL/primes_impl.h cgal-4.8/include/CGAL/primes_impl.h --- cgal-4.7/include/CGAL/primes_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/primes_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +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 -Nru cgal-4.7/include/CGAL/property_map.h cgal-4.8/include/CGAL/property_map.h --- cgal-4.7/include/CGAL/property_map.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/property_map.h 2016-04-04 19:00:12.000000000 +0000 @@ -38,6 +38,40 @@ /// \cond SKIP_DOXYGEN + + +template +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` diff -Nru cgal-4.7/include/CGAL/QP_solver/basic.h cgal-4.8/include/CGAL/QP_solver/basic.h --- cgal-4.7/include/CGAL/QP_solver/basic.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/basic.h 2016-04-04 19:00:12.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include #endif // CGAL_QP_SOLVER_BASIC_H diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_basis_inverse.h cgal-4.8/include/CGAL/QP_solver/QP_basis_inverse.h --- cgal-4.7/include/CGAL/QP_solver/QP_basis_inverse.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_basis_inverse.h 2016-04-04 19:00:12.000000000 +0000 @@ -415,7 +415,7 @@ 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(), d)); + boost::bind2nd( std::multiplies(), d)); } // new denominator: |det(A_B)|^2 diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_basis_inverse_impl.h cgal-4.8/include/CGAL/QP_solver/QP_basis_inverse_impl.h --- cgal-4.7/include/CGAL/QP_solver/QP_basis_inverse_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_basis_inverse_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -187,12 +187,12 @@ // tmp_l -part std::transform(y_l_it, (y_l_it+s), x_l.begin(), tmp_l.begin(), compose2_2(std::plus(), Identity(), - std::bind1st(std::multiplies(), s_delta))); + boost::bind1st(std::multiplies(), s_delta))); // tmp_x -part std::transform(y_x_it, (y_x_it+b), x_x.begin(), tmp_x.begin(), compose2_2(std::plus(), Identity(), - std::bind1st(std::multiplies(), s_delta))); + boost::bind1st(std::multiplies(), s_delta))); tmp_x[k_i] -= d; // prepare \hat{k}_{2} -scalar diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_partial_exact_pricing.h cgal-4.8/include/CGAL/QP_solver/QP_partial_exact_pricing.h --- cgal-4.7/include/CGAL/QP_solver/QP_partial_exact_pricing.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_partial_exact_pricing.h 2016-04-04 19:00:12.000000000 +0000 @@ -55,7 +55,7 @@ // creation QP_partial_exact_pricing( bool randomize = false, - Random& random = default_random); + Random& random = get_default_random()); // operations int pricing(int& direction ); diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_partial_filtered_pricing.h cgal-4.8/include/CGAL/QP_solver/QP_partial_filtered_pricing.h --- cgal-4.7/include/CGAL/QP_solver/QP_partial_filtered_pricing.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_partial_filtered_pricing.h 2016-04-04 19:00:12.000000000 +0000 @@ -78,7 +78,7 @@ // creation QP_partial_filtered_pricing( bool randomize = false, - Random& random = default_random, + Random& random = get_default_random(), ET2NT et2nt = ET2NT()); // operations diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_solver.h cgal-4.8/include/CGAL/QP_solver/QP_solver.h --- cgal-4.7/include/CGAL/QP_solver/QP_solver.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_solver.h 2016-04-04 19:00:12.000000000 +0000 @@ -1601,7 +1601,7 @@ q_x_S.begin(), compose2_2( std::minus(), Identity(), - std::bind1st( std::multiplies(), d))); + boost::bind1st( std::multiplies(), d))); } // q_x_S = -+ ( A_S_BxB_O * q_x_O - A_S_Bxj) @@ -1938,7 +1938,7 @@ x_B_S.begin(), x_B_S.begin(), compose2_2( std::minus(), - std::bind1st( std::multiplies(), d), + boost::bind1st( std::multiplies(), d), Identity())); // b_S_B - ( A_S_BxB_O * x_B_O) - r_S_B @@ -1946,7 +1946,7 @@ r_S_B.begin(), x_B_S.begin(), compose2_2(std::minus(), Identity(), - std::bind1st( std::multiplies(), d))); + boost::bind1st( std::multiplies(), d))); // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O) @@ -1975,7 +1975,7 @@ x_B_S.begin(), x_B_S.begin(), compose2_2( std::minus(), - std::bind1st( std::multiplies(), d), + boost::bind1st( std::multiplies(), d), Identity())); // x_B_S = +- ( b_S_B - A_S_BxB_O * x_B_O) diff -Nru cgal-4.7/include/CGAL/QP_solver/QP_solver_impl.h cgal-4.8/include/CGAL/QP_solver/QP_solver_impl.h --- cgal-4.7/include/CGAL/QP_solver/QP_solver_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/QP_solver/QP_solver_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -2929,7 +2929,7 @@ } } v_it = std::find_if( q_x_O.begin(), q_x_O.begin()+cols, - std::bind2nd( std::not_equal_to(), et0)); + boost::bind2nd( std::not_equal_to(), et0)); if ( v_it != q_x_O.begin()+cols) { if ( ! vout4.verbose()) { std::cerr << std::endl << "basis-inverse check: "; @@ -2970,7 +2970,7 @@ } v_it = std::find_if( q_lambda.begin(), q_lambda.begin()+rows, - std::bind2nd( std::not_equal_to(), et0)); + boost::bind2nd( std::not_equal_to(), et0)); if ( v_it != q_lambda.begin()+rows) { if ( ! vout4.verbose()) { std::cerr << std::endl << "basis-inverse check: "; diff -Nru cgal-4.7/include/CGAL/Qt/CreateOpenGLContext.h cgal-4.8/include/CGAL/Qt/CreateOpenGLContext.h --- cgal-4.7/include/CGAL/Qt/CreateOpenGLContext.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/CreateOpenGLContext.h 2016-04-04 19:00:11.000000000 +0000 @@ -30,7 +30,9 @@ format.setVersion(2,1); format.setProfile(QSurfaceFormat::CompatibilityProfile); context->setFormat(format); - return QGLContext::fromOpenGLContext(context); + QGLContext *result = QGLContext::fromOpenGLContext(context); + result->create(); + return result; } } // namespace Qt } // namespace CGAL diff -Nru cgal-4.7/include/CGAL/Qt/debug.h cgal-4.8/include/CGAL/Qt/debug.h --- cgal-4.7/include/CGAL/Qt/debug.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/debug.h 2016-04-04 19:00:11.000000000 +0000 @@ -41,8 +41,16 @@ 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 +#endif // CGAL_HEADER_ONLY #endif // CGAL_QT_DEBUG_H diff -Nru cgal-4.7/include/CGAL/Qt/debug_impl.h cgal-4.8/include/CGAL/Qt/debug_impl.h --- cgal-4.7/include/CGAL/Qt/debug_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/debug_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +// Laurent Rineau + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include +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 -Nru cgal-4.7/include/CGAL/Qt/DemosMainWindow.h cgal-4.8/include/CGAL/Qt/DemosMainWindow.h --- cgal-4.7/include/CGAL/Qt/DemosMainWindow.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/DemosMainWindow.h 2016-04-04 19:00:11.000000000 +0000 @@ -21,6 +21,7 @@ #ifndef CGAL_QT_DEMOS_MAIN_WINDOW_H #define CGAL_QT_DEMOS_MAIN_WINDOW_H + #include #include #include @@ -127,4 +128,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(CGAL::Qt::DemosMainWindow::Options) +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_QT_DEMOS_MAIN_WINDOW_H diff -Nru cgal-4.7/include/CGAL/Qt/DemosMainWindow_impl.h cgal-4.8/include/CGAL/Qt/DemosMainWindow_impl.h --- cgal-4.7/include/CGAL/Qt/DemosMainWindow_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/DemosMainWindow_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +// Laurent Rineau + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // needed to get CGAL_VERSION_STR +#include +#include + +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(objectName); + + // then search if a menu has title()==title + if(menu) { + return menu; + } else { + Q_FOREACH(menu, this->findChildren()) { + 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("", + QString(" (version %1)") + .arg(cgal_version)); +#endif + QMessageBox mb(QMessageBox::NoIcon, + title, + about_CGAL_txt, + QMessageBox::Ok, + this); + + QLabel* mb_label = mb.findChild("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(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 -Nru cgal-4.7/include/CGAL/Qt/GraphicsViewNavigation.h cgal-4.8/include/CGAL/Qt/GraphicsViewNavigation.h --- cgal-4.7/include/CGAL/Qt/GraphicsViewNavigation.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/GraphicsViewNavigation.h 2016-04-04 19:00:11.000000000 +0000 @@ -70,4 +70,8 @@ } // namespace Qt } // namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_QT_GRAPHICS_VIEW_NAVIGATION_H diff -Nru cgal-4.7/include/CGAL/Qt/GraphicsViewNavigation_impl.h cgal-4.8/include/CGAL/Qt/GraphicsViewNavigation_impl.h --- cgal-4.7/include/CGAL/Qt/GraphicsViewNavigation_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/GraphicsViewNavigation_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +// Laurent Rineau + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include // for mapToScene(QGraphicsView*, QRect) +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +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(obj); + if(v == NULL) { + QWidget* viewport = qobject_cast(obj); + if(viewport == NULL) { + return false; + } + v = qobject_cast(viewport->parent()); + if(v == NULL) { + return false; + } + } + switch(event->type()) + { + case QEvent::KeyPress: { + QKeyEvent *keyEvent = static_cast(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(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(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(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(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(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 -Nru cgal-4.7/include/CGAL/Qt/GraphicsViewPolylineInput.h cgal-4.8/include/CGAL/Qt/GraphicsViewPolylineInput.h --- cgal-4.7/include/CGAL/Qt/GraphicsViewPolylineInput.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/GraphicsViewPolylineInput.h 2016-04-04 19:00:11.000000000 +0000 @@ -36,6 +36,7 @@ class QGraphicsSceneMouseEvent; class QGraphicsItem; class QGraphicsPathItem; +class QGraphicsLineItem; class QKeyEvent; class QEvent; class QObject; @@ -109,4 +110,8 @@ } // namespace Qt } // namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_QT_GRAPHICS_VIEW_POLYLINE_INPUT_H diff -Nru cgal-4.7/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h cgal-4.8/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h --- cgal-4.7/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/GraphicsViewPolylineInput_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +// Laurent Rineau + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +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(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(event); + mouseMoveEvent(mouseEvent); + return QObject::eventFilter(obj, event); + } else if (event->type() == QEvent::KeyPress) { + QKeyEvent *keyEvent = static_cast(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 -Nru cgal-4.7/include/CGAL/Qt/resources.h cgal-4.8/include/CGAL/Qt/resources.h --- cgal-4.7/include/CGAL/Qt/resources.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/resources.h 2016-04-04 19:00:11.000000000 +0000 @@ -30,4 +30,8 @@ // 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 +#endif // CGAL_HEADER_ONLY + #endif // CGAL_QT_RESOURCES_H diff -Nru cgal-4.7/include/CGAL/Qt/resources_impl.h cgal-4.8/include/CGAL/Qt/resources_impl.h --- cgal-4.7/include/CGAL/Qt/resources_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/resources_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +// 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 -Nru cgal-4.7/include/CGAL/Qt/SegmentsGraphicsItem.h cgal-4.8/include/CGAL/Qt/SegmentsGraphicsItem.h --- cgal-4.7/include/CGAL/Qt/SegmentsGraphicsItem.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/SegmentsGraphicsItem.h 2016-04-04 19:00:11.000000000 +0000 @@ -118,7 +118,7 @@ { painterostream = PainterOstream(painter); - + painter->setPen(QPen(::Qt::black, 0, ::Qt::SolidLine, ::Qt::RoundCap, ::Qt::RoundJoin)); for(typename P::iterator it = segments->begin(); it != segments->end(); it++){ diff -Nru cgal-4.7/include/CGAL/Qt/utility.h cgal-4.8/include/CGAL/Qt/utility.h --- cgal-4.7/include/CGAL/Qt/utility.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/utility.h 2016-04-04 19:00:11.000000000 +0000 @@ -40,4 +40,8 @@ } // namespace Qt } // namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_QT_UTILITY_H diff -Nru cgal-4.7/include/CGAL/Qt/utility_impl.h cgal-4.8/include/CGAL/Qt/utility_impl.h --- cgal-4.7/include/CGAL/Qt/utility_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Qt/utility_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +// Laurent Rineau + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include +#include +#include +#include +#include + +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 -Nru cgal-4.7/include/CGAL/random_convex_set_2.h cgal-4.8/include/CGAL/random_convex_set_2.h --- cgal-4.7/include/CGAL/random_convex_set_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/random_convex_set_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include namespace CGAL { @@ -48,7 +49,6 @@ using std::back_inserter; using std::accumulate; using std::transform; - using std::bind2nd; using std::sort; using std::partial_sum; using std::less; @@ -82,7 +82,7 @@ points.begin(), points.end(), points.begin(), - bind2nd( Sum(), scale( centroid, FT( -1)))); + boost::bind2nd( Sum(), scale( centroid, FT( -1)))); // sort them according to their direction's angle // w.r.t. the positive x-axis: @@ -100,7 +100,7 @@ points.begin(), points.end(), points.begin(), - bind2nd( Sum(), sum( centroid, + boost::bind2nd( Sum(), sum( centroid, scale( new_centroid, FT( -1))))); // compute maximal coordinate: @@ -116,7 +116,7 @@ points.begin(), points.end(), o, - bind2nd( Scale(), FT( pg.range()) / maxcoord)); + boost::bind2nd( Scale(), FT( pg.range()) / maxcoord)); } // random_convex_set_2( n, o, pg, t) diff -Nru cgal-4.7/include/CGAL/Random.h cgal-4.8/include/CGAL/Random.h --- cgal-4.7/include/CGAL/Random.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Random.h 2016-04-04 19:00:12.000000000 +0000 @@ -43,7 +43,6 @@ #include #include - namespace CGAL { class Random { @@ -229,12 +228,27 @@ boost::rand48 rng; }; +#ifndef CGAL_HEADER_ONLY // Global variables // ================ CGAL_EXPORT extern Random default_random; +#endif // CGAL_HEADER_ONLY -} //namespace CGAL +#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 -#endif // CGAL_RANDOM_H +} //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY +#endif // CGAL_RANDOM_H diff -Nru cgal-4.7/include/CGAL/Random_impl.h cgal-4.8/include/CGAL/Random_impl.h --- cgal-4.7/include/CGAL/Random_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Random_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#include +#include + +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(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(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 -Nru cgal-4.7/include/CGAL/random_selection.h cgal-4.8/include/CGAL/random_selection.h --- cgal-4.7/include/CGAL/random_selection.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/random_selection.h 2016-04-04 19:00:11.000000000 +0000 @@ -57,7 +57,7 @@ Size n, OutputIterator result) { - return random_selection( first, last, n, result, default_random); + return random_selection( first, last, n, result, get_default_random()); } } //namespace CGAL diff -Nru cgal-4.7/include/CGAL/Range_tree_d.h cgal-4.8/include/CGAL/Range_tree_d.h --- cgal-4.7/include/CGAL/Range_tree_d.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Range_tree_d.h 2016-04-04 19:00:12.000000000 +0000 @@ -399,10 +399,10 @@ if (v!=0) delete_tree(v); - if (header!=0) - delete header; - if (sublayer_tree!=0) - delete sublayer_tree; + if (header!=0) + delete header; + if (sublayer_tree!=0) + delete sublayer_tree; } diff -Nru cgal-4.7/include/CGAL/Ray_2_Bbox_2_intersection.h cgal-4.8/include/CGAL/Ray_2_Bbox_2_intersection.h --- cgal-4.7/include/CGAL/Ray_2_Bbox_2_intersection.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Ray_2_Bbox_2_intersection.h 2016-04-04 19:00:11.000000000 +0000 @@ -75,6 +75,8 @@ } } //namespace CGAL - +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY #endif diff -Nru cgal-4.7/include/CGAL/Ray_2_Bbox_2_intersection_impl.h cgal-4.8/include/CGAL/Ray_2_Bbox_2_intersection_impl.h --- cgal-4.7/include/CGAL/Ray_2_Bbox_2_intersection_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Ray_2_Bbox_2_intersection_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +typedef CGAL::Simple_cartesian 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 -Nru cgal-4.7/include/CGAL/Ray_2.h cgal-4.8/include/CGAL/Ray_2.h --- cgal-4.7/include/CGAL/Ray_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Ray_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -207,7 +207,7 @@ std::ostream& insert(std::ostream& os, const Ray_2& r, const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << r.source() << ' ' << r.second_point(); case IO::BINARY : @@ -221,7 +221,7 @@ std::ostream& insert(std::ostream& os, const Ray_2& r, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << r.source() << ' ' << r.second_point(); diff -Nru cgal-4.7/include/CGAL/Ray_3.h cgal-4.8/include/CGAL/Ray_3.h --- cgal-4.7/include/CGAL/Ray_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Ray_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -173,7 +173,7 @@ std::ostream& insert(std::ostream& os, const Ray_3& r, const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << r.start() << ' ' << r.direction(); case IO::BINARY : @@ -187,7 +187,7 @@ std::ostream& insert(std::ostream& os, const Ray_3& r, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << r.start() << ' ' << r.direction(); diff -Nru cgal-4.7/include/CGAL/read_vtk_image_data.h cgal-4.8/include/CGAL/read_vtk_image_data.h --- cgal-4.7/include/CGAL/read_vtk_image_data.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/read_vtk_image_data.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include + +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 -Nru cgal-4.7/include/CGAL/Real_timer.h cgal-4.8/include/CGAL/Real_timer.h --- cgal-4.7/include/CGAL/Real_timer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Real_timer.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,7 +26,8 @@ #ifndef CGAL_REAL_TIMER_H #define CGAL_REAL_TIMER_H 1 -#include +#include +#include // For the numerical limits #include @@ -50,7 +51,17 @@ 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 @@ -114,5 +125,9 @@ } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_REAL_TIMER_H // // EOF // diff -Nru cgal-4.7/include/CGAL/Real_timer_impl.h cgal-4.8/include/CGAL/Real_timer_impl.h --- cgal-4.7/include/CGAL/Real_timer_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Real_timer_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +// Matthias Baesken + +#ifdef CGAL_HEADER_ONLY +#define CGAL_INLINE_FUNCTION inline +#else +#define CGAL_INLINE_FUNCTION +#endif + +#if defined (_MSC_VER) +# include +# include + +#elif defined (__MINGW32__) +# include +# include + +#else +// If none of the above PC compilers, use POSIX fct. gettimeofday() +# include +#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 -Nru cgal-4.7/include/CGAL/refine_mesh_3.h cgal-4.8/include/CGAL/refine_mesh_3.h --- cgal-4.7/include/CGAL/refine_mesh_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/refine_mesh_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -177,6 +177,7 @@ , dump_after_glob_opt_prefix() , dump_after_perturb_prefix() , dump_after_exude_prefix() + , number_of_initial_points() {} std::string dump_after_init_prefix; @@ -185,16 +186,18 @@ 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 -#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 + +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + + // ----------------------------------- // Perturb // ----------------------------------- @@ -289,6 +292,7 @@ (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) ) ) { @@ -300,7 +304,8 @@ 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; } @@ -320,11 +325,8 @@ return options; } -#if defined(__clang__) || defined(__GNUC__) && CGAL_GCC_VERSION >= 40600 -//#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ > 5 -#pragma GCC diagnostic pop -#endif - +CGAL_PRAGMA_DIAG_POP + // ----------------------------------- // Reset_c3t3 (undocumented) // ----------------------------------- @@ -349,7 +351,11 @@ CGAL_PRAGMA_DIAG_POP } // end namespace parameters - +// see +CGAL_PRAGMA_DIAG_PUSH +// see +CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS + BOOST_PARAMETER_FUNCTION( (void), refine_mesh_3, @@ -378,7 +384,9 @@ reset_param(), mesh_options_param); } - + +CGAL_PRAGMA_DIAG_POP + /** * @brief This function refines the mesh c3t3 wrt domain & criteria @@ -427,6 +435,7 @@ // 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); diff -Nru cgal-4.7/include/CGAL/Regular_triangulation_3.h cgal-4.8/include/CGAL/Regular_triangulation_3.h --- cgal-4.7/include/CGAL/Regular_triangulation_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Regular_triangulation_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -27,8 +27,12 @@ #include #include + #ifdef CGAL_LINKED_WITH_TBB +# include +# include # include +# include #endif #include @@ -46,6 +50,10 @@ # include #endif +#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE +#include +#endif + #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4355) // complaint about using 'this' to @@ -185,6 +193,79 @@ insert(first, last); } + private: + +#ifdef CGAL_CONCURRENT_TRIANGULATION_3_ADD_TEMPORARY_POINTS_ON_FAR_SPHERE + std::vector + add_temporary_points_on_far_sphere(const size_t num_points) + { + std::vector 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 random_point(radius); + const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( + tbb::task_scheduler_init::default_num_threads() * 3.5); + std::vector 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::const_iterator it_p = points_on_far_sphere.begin(); + std::vector::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 & 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 @@ -221,63 +302,16 @@ { size_t num_points = points.size(); Cell_handle hint; - std::vector 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 random_point(radius); - const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( - tbb::task_scheduler_init::default_num_threads() * 3.5); - std::vector 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::const_iterator it_p = points_on_far_sphere.begin(); - std::vector::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 + std::vector 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)500); + size_t num_points_seq = (std::min)(num_points, (size_t)100); while (dimension() < 3 || i < num_points_seq) { Locate_type lt; @@ -298,12 +332,8 @@ ); #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 + remove_temporary_points_on_far_sphere(far_sphere_vertices); +#endif } // Sequential else @@ -360,24 +390,71 @@ typedef Spatial_sort_traits_adapter_3 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 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 tls_hint(hint->vertex(0)); + tbb::parallel_for( + tbb::blocked_range(i, num_points), + Insert_point_with_info(*this, points, infos, indices, tls_hint) + ); - Cell_handle hint; - for (typename std::vector::const_iterator - it = indices.begin(), end = indices.end(); - it != end; ++it) +#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 { - 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(); + Cell_handle hint; + for (typename std::vector::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; } - else - hint=c; } return number_of_vertices() - n; @@ -1196,6 +1273,103 @@ 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 + 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 & m_points; + const std::vector & m_infos; + const std::vector & m_indices; + tbb::enumerable_thread_specific & m_tls_hint; + + public: + // Constructor + Insert_point_with_info(RT & rt, + const std::vector & points, + const std::vector & infos, + const std::vector & indices, + tbb::enumerable_thread_specific & 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& 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 } diff -Nru cgal-4.7/include/CGAL/Regular_triangulation_filtered_traits_3.h cgal-4.8/include/CGAL/Regular_triangulation_filtered_traits_3.h --- cgal-4.7/include/CGAL/Regular_triangulation_filtered_traits_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Regular_triangulation_filtered_traits_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -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 -{}; - - - -} //namespace CGAL::internal - -#endif //CGAL_NO_DEPRECATED_CODE - -#endif // CGAL_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H diff -Nru cgal-4.7/include/CGAL/RS/dyadic.h cgal-4.8/include/CGAL/RS/dyadic.h --- cgal-4.7/include/CGAL/RS/dyadic.h 2015-09-21 14:25:51.000000000 +0000 +++ cgal-4.8/include/CGAL/RS/dyadic.h 2016-04-04 19:00:11.000000000 +0000 @@ -417,7 +417,7 @@ CGAL_assertion(!round); } -// miscelaneous functions +// 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) diff -Nru cgal-4.7/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h cgal-4.8/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h --- cgal-4.7/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Scale_space_reconstruction_3/Scale_space_surface_reconstruction_3_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,15 +24,22 @@ #include "tbb/parallel_for.h" #endif // CGAL_LINKED_WITH_TBB +#include +#include + #include #include #include +#include + + namespace CGAL { -template < class Gt, class FS, class Sh, class wA, class Ct > + +template < class Gt, class FS, class wA, class Ct > class -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: Finite_point_iterator: public Finite_vertices_iterator { typedef Finite_vertices_iterator Base; typedef Finite_point_iterator Self; @@ -45,9 +52,9 @@ }; // class Finite_point_iterator -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > class -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: In_surface_tester { const Shape* _s; @@ -75,8 +82,8 @@ }; // In_surface_tester - namespace internal { - namespace Scale_space { +namespace internal { + namespace Scale_space { struct Inc { unsigned int * i; @@ -92,13 +99,23 @@ } }; + + template + 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 Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > class -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: ComputeNN { public: typedef std::vector< Point > Pointset; @@ -124,6 +141,7 @@ } #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]); @@ -133,9 +151,9 @@ // Advance a point to a coarser scale. -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > class -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: AdvanceSS { public: typedef std::vector< Point > Pointset; @@ -162,40 +180,77 @@ return; Static_search search(_tree, _pts[i], _nn[i]); - Approximation pca( _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 ) { - pca.set_point( column, boost::get<0>(nit->first), 1.0 / _nn[boost::get<1>(nit->first)] ); - } - + ++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 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. - if( !pca.compute() ) - return; + CGAL::cpp11::array eigenvectors = {{ 0., 0., 0., + 0., 0., 0., + 0., 0., 0. }}; + CGAL::cpp11::array 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. - _pts[i] = pca.fit( _pts[i] ); + 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 Sh, class wA, class Ct > -Scale_space_surface_reconstruction_3:: -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 wA, class Ct > +Scale_space_surface_reconstruction_3:: +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 Sh, class wA, class Ct > -Scale_space_surface_reconstruction_3:: +template < class Gt, class FS, class wA, class Ct > +Scale_space_surface_reconstruction_3:: Scale_space_surface_reconstruction_3( FT sq_radius ) - : _mean_neighbors(0), _samples(0), _squared_radius(sq_radius), _shape(0) { +: _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 > +template < class Gt, class FS, class wA, class Ct > inline bool -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: is_handled( Cell_handle c, unsigned int li ) const { switch( li ) { case 0: return ( c->info()&1 ) != 0; @@ -206,9 +261,9 @@ return false; } -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > inline void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: mark_handled( Cell_handle c, unsigned int li ) { switch( li ) { case 0: c->info() |= 1; return; @@ -218,9 +273,57 @@ } } -template < class Gt, class FS, class Sh, class wA, class Ct > -inline typename Scale_space_surface_reconstruction_3::Triple -Scale_space_surface_reconstruction_3:: +template < class Gt, class FS, class wA, class Ct > +inline void +Scale_space_surface_reconstruction_3:: +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::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::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::Triple +Scale_space_surface_reconstruction_3:: ordered_facet_indices( const Facet& f ) const { if( (f.second&1) == 0 ) return make_array( f.first->vertex( (f.second+2)&3 )->info(), @@ -232,13 +335,14 @@ f.first->vertex( (f.second+3)&3 )->info() ); } -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: -collect_shell( Cell_handle c, unsigned int li ) { +Scale_space_surface_reconstruction_3:: +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 stack; stack.push( Facet(c, li) ); @@ -249,6 +353,7 @@ Vertex_handle a; Classification_type cl; bool processed = false; + while( !stack.empty() ) { f = stack.top(); stack.pop(); @@ -261,18 +366,29 @@ // 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() ); + 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) ) + 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. @@ -280,6 +396,7 @@ 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); @@ -292,44 +409,44 @@ // 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 > +template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: -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; +Scale_space_surface_reconstruction_3:: +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 ); - 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; - } + + // 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 Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: -collect_facets( Tag_false ) { +Scale_space_surface_reconstruction_3:: +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 ) ) { @@ -351,18 +468,18 @@ } } -template < class Gt, class FS, class Sh, class wA, class Ct > -const typename Scale_space_surface_reconstruction_3::Shape& -Scale_space_surface_reconstruction_3:: +template < class Gt, class FS, class wA, class Ct > +const typename Scale_space_surface_reconstruction_3::Shape& +Scale_space_surface_reconstruction_3:: 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::FT -Scale_space_surface_reconstruction_3:: +template < class Gt, class FS, class wA, class Ct > +typename Scale_space_surface_reconstruction_3::FT +Scale_space_surface_reconstruction_3:: estimate_neighborhood_squared_radius( unsigned int neighbors, unsigned int samples ) { typename Gt::Compute_squared_distance_3 squared_distance = Gt().compute_squared_distance_3_object(); @@ -392,10 +509,10 @@ // 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 Gt, class FS, class wA, class Ct > template < class InputIterator > -typename Scale_space_surface_reconstruction_3::FT -Scale_space_surface_reconstruction_3:: +typename Scale_space_surface_reconstruction_3::FT +Scale_space_surface_reconstruction_3:: estimate_neighborhood_squared_radius( InputIterator begin, InputIterator end, unsigned int neighbors, unsigned int samples, typename boost::enable_if< CGAL::is_iterator >::type* ) { clear(); @@ -404,23 +521,26 @@ } #endif // DOXYGEN_RUNNING -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: 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.insert(boost::make_zip_iterator(boost::make_tuple( _points.begin(), boost::counting_iterator(0))), - boost::make_zip_iterator(boost::make_tuple( _points.end() , boost::counting_iterator(static_cast(_points.size())))) ); + + _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(); @@ -432,21 +552,23 @@ // 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 Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > template< class F > void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: 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 Gt, class FS, class wA, class Ct > template< class F > void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: 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 ); @@ -455,10 +577,10 @@ #endif // CGAL_LINKED_WITH_TBB } -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > template < class InputIterator > void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: construct_shape( InputIterator begin, InputIterator end, typename boost::enable_if< CGAL::is_iterator >::type* ) { deinit_shape(); @@ -467,76 +589,627 @@ _shape = Shape_construction_3().construct( begin, end, _squared_radius ); } -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: -collect_surface() { +Scale_space_surface_reconstruction_3:: +collect_surface (bool separate_shells, bool force_manifold, FT border_angle) { + clear_surface(); if( !has_shape() ) construct_shape(); - collect_facets(); + + 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:: +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:: +detect_bubbles(FT border_angle) { + + std::set 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 borders; + std::vector cells; + std::stack 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 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 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::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:: +fix_nonmanifold_edges() { + + typedef std::map, std::set > 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 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 + search = eshell_triples.insert (std::make_pair (std::make_pair (vedge, fit->second), + std::set())); + + 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::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:: +fix_nonmanifold_vertices() { + + typedef ::CGAL::Union_find UF; + typedef typename UF::handle UF_handle; + + + typedef std::map, std::vector > 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 + search = vshell_facets.insert (std::make_pair (std::make_pair (v, fit->second), + std::vector())); + 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 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 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::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::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, internal::Scale_space::operator_less > 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 + insertion = map_h2f.insert (std::make_pair (handle, std::vector())); + + 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 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 Sh, class wA, class Ct > + + + template < class Gt, class FS, class wA, class Ct > void -Scale_space_surface_reconstruction_3:: -reconstruct_surface( unsigned int iterations ) { +Scale_space_surface_reconstruction_3:: + 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(); + collect_surface (separate_shells, force_manifold, border_angle); + } /// \cond internal_doc -template < class Gt, class FS, class Sh, class wA, class Ct > +template < class Gt, class FS, class wA, class Ct > template < class InputIterator > void -Scale_space_surface_reconstruction_3:: +Scale_space_surface_reconstruction_3:: 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 >::type*) { + // Compute the radius for which the mean ball would contain the required number of neighbors. - clear(); + clear(); insert( begin, end ); - // Smooth the scale space. - increase_scale( iterations ); - - // Mesh the perturbed points. - collect_surface(); + reconstruct_surface (iterations, separate_shells, force_manifold, border_angle); } /// \endcond -template < class Gt, class FS, class Sh, class wA, class Ct > -typename Scale_space_surface_reconstruction_3::Triple_const_iterator -Scale_space_surface_reconstruction_3::shell_begin( std::size_t shell ) const { - CGAL_assertion( Sh::value == true ); +template < class Gt, class FS, class wA, class Ct > +typename Scale_space_surface_reconstruction_3::Triple_const_iterator +Scale_space_surface_reconstruction_3::shell_begin( std::size_t shell ) const { 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::Triple_iterator -Scale_space_surface_reconstruction_3::shell_begin( std::size_t shell ) { - CGAL_assertion( Sh::value == true ); +template < class Gt, class FS, class wA, class Ct > +typename Scale_space_surface_reconstruction_3::Triple_iterator +Scale_space_surface_reconstruction_3::shell_begin( std::size_t shell ) { 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::Triple_const_iterator -Scale_space_surface_reconstruction_3::shell_end( std::size_t shell ) const { - CGAL_assertion( Sh::value == true ); +template < class Gt, class FS, class wA, class Ct > +typename Scale_space_surface_reconstruction_3::Triple_const_iterator +Scale_space_surface_reconstruction_3::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 Sh, class wA, class Ct > -typename Scale_space_surface_reconstruction_3::Triple_iterator -Scale_space_surface_reconstruction_3::shell_end( std::size_t shell ) { - CGAL_assertion( Sh::value == true ); +template < class Gt, class FS, class wA, class Ct > +typename Scale_space_surface_reconstruction_3::Triple_iterator +Scale_space_surface_reconstruction_3::shell_end( std::size_t shell ) { CGAL_assertion( shell >= 0 && shell < _shells.size() ); if( shell == _shells.size()-1 ) return _surface.end(); diff -Nru cgal-4.7/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h cgal-4.8/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h --- cgal-4.7/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Scale_space_reconstruction_3/Weighted_PCA_approximation_3.h 1970-01-01 00:00:00.000000000 +0000 @@ -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 . -// -// 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 - - -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 Matrix3D; // 3-by-dynamic double-value matrix. - typedef Eigen::Array 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 - * [set_points(points_begin, points_end, weights_begin)](\ref WeightedApproximation_3::set_points ) - * - * \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 -Nru cgal-4.7/include/CGAL/Scale_space_surface_reconstruction_3.h cgal-4.8/include/CGAL/Scale_space_surface_reconstruction_3.h --- cgal-4.7/include/CGAL/Scale_space_surface_reconstruction_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Scale_space_surface_reconstruction_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,10 +23,6 @@ #include #include -#include -#include -#include - #include #include #include @@ -36,27 +32,15 @@ #include #include #include +#include +#include #include -#ifdef CGAL_EIGEN3_ENABLED -#include -#endif // CGAL_EIGEN3_ENABLED - #include namespace CGAL { - - - struct Null_function { - typedef int result_type; - template - int operator()(const T&) const - { - return 0; - } - - }; + /// computes a triangulated surface mesh interpolating a point set. /** \ingroup PkgScaleSpaceReconstruction3Classes @@ -97,34 +81,28 @@ * 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` is used by default. + * \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 Sh = Tag_true, class wA = Default, class Ct = Parallel_tag > +template < class Gt, class FS = Tag_true, + class wA = CGAL::Default_diagonalize_traits, class Ct = Parallel_tag > class Scale_space_surface_reconstruction_3 { - typedef typename Default::Get< wA, -#ifdef CGAL_EIGEN3_ENABLED - Weighted_PCA_approximation_3 -#else // CGAL_EIGEN3_ENABLED - void -#endif // CGAL_EIGEN3_ENABLED - >::type Approximation; public: - typedef typename Gt::Point_3 Point; ///< defines the point type. -typedef boost::tuple Point_and_int; + typedef typename Gt::Point_3 Point; ///< defines the point type. + typedef boost::tuple Point_and_size_t; private: // Searching for neighbors. typedef Search_traits_3< Gt > Traits_base; -typedef CGAL::Search_traits_adapter, +typedef CGAL::Search_traits_adapter, Traits_base> Search_traits; typedef Orthogonal_k_neighbor_search< Search_traits > Static_search; @@ -143,25 +121,37 @@ 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 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_facets_iterator Finite_vertices_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 Map_facet_to_shell; + typedef typename CGAL::cpp11::array, 2 > Bubble; + public: /// \name Types /// \{ - typedef typename Gt::FT FT; ///< defines the field number type. - // typedef typename Gt::Point_3 Point; ///< defines the point type. - + 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. @@ -226,6 +216,17 @@ // 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 _map_f2s; + unsigned int _index; + + std::vector _bubbles; + std::map _map_f2b; + typedef std::vector Pointset; Pointset _points; @@ -238,7 +239,7 @@ * \param samples is the number of points sampled to estimate the * neighborhood radius. */ - Scale_space_surface_reconstruction_3( unsigned int neighbors, unsigned int samples ); + 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. @@ -254,13 +255,14 @@ void deinit_shape() { if( _shape != 0 ) { delete _shape; _shape = 0; } } void clear_tree() { _tree.clear(); } - void clear_surface() { _shells.clear(); _surface.clear(); deinit_shape(); } + 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 @@ -268,21 +270,17 @@ 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 ); + 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 ) { - collect_shell( f.first, f.second ); + 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( Tag_true ); - void collect_facets( Tag_false ); - void collect_facets() { - if( !has_neighborhood_squared_radius() ) - estimate_neighborhood_squared_radius(); - collect_facets( Sh() ); - } + void collect_facets( bool separate_shells, bool force_manifold ); + void collect_facets_quick( ); + private: // Get the shape of the scale space. @@ -319,11 +317,12 @@ void insert( InputIterator begin, InputIterator end, typename boost::enable_if< CGAL::is_iterator >::type* = NULL ) { #endif // DOXYGEN_RUNNING - Null_function zero; - _tree.insert( - boost::make_zip_iterator(boost::make_tuple( begin, boost::make_transform_iterator(begin, zero))), - boost::make_zip_iterator(boost::make_tuple( end , boost::make_transform_iterator(end, zero)))); - _points.insert(_points.end(), begin, end); + _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. @@ -357,6 +356,10 @@ void clear() { clear_tree(); clear_surface(); + _map_f2s.clear (); + _bubbles.clear (); + _map_f2b.clear (); + _squared_radius = -1; } @@ -625,6 +628,7 @@ void set_neighborhood_sample_size( unsigned int samples ) { _samples = samples; } /// \} + /// \name Scale-Space Manipulation /// \{ /// increases the scale by a number of iterations. @@ -752,8 +756,15 @@ // collects the surface mesh from the shape. // If the sahep does not yet exist, it is constructed. - void collect_surface(); + 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: @@ -771,16 +782,33 @@ * 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 [insert(begin, end)](\ref insert). + * \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() - { - reconstruct_surface(0); - } + 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(); } @@ -791,12 +819,12 @@ /// 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); + void reconstruct_surface( unsigned int iterations, bool separate_shells = true, + bool force_manifold = false, FT border_angle = 45); /// \endcond /// \cond internal_doc @@ -816,6 +844,8 @@ * \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)`. @@ -824,9 +854,12 @@ */ template < class InputIterator > #ifdef DOXYGEN_RUNNING - void reconstruct_surface( InputIterator begin, InputIterator end, unsigned int iterations = 0 ); + 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 >::type* = NULL ); #endif // DOXYGEN_RUNNING /// \endcond @@ -896,6 +929,20 @@ */ 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 diff -Nru cgal-4.7/include/CGAL/Search_traits_adapter.h cgal-4.8/include/CGAL/Search_traits_adapter.h --- cgal-4.7/include/CGAL/Search_traits_adapter.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Search_traits_adapter.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,9 +24,9 @@ #include #include //for default distance specialization #include +#include #include -#include #include namespace CGAL{ @@ -72,7 +72,7 @@ class Search_traits_adapter : public Base_traits{ PointPropertyMap ppmap; - BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag, + CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag, typename boost::property_traits::category >::value ) ); public: @@ -130,7 +130,7 @@ PointPropertyMap ppmap; typedef typename Base_distance::FT FT; - BOOST_STATIC_ASSERT( ( boost::is_same< boost::lvalue_property_map_tag, + CGAL_static_assertion( ( boost::is_same< boost::lvalue_property_map_tag, typename boost::property_traits::category >::value ) ); public: diff -Nru cgal-4.7/include/CGAL/Segment_2.h cgal-4.8/include/CGAL/Segment_2.h --- cgal-4.7/include/CGAL/Segment_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Segment_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -282,7 +282,7 @@ std::ostream & operator<<(std::ostream &os, const Segment_2 &s) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << s.source() << ' ' << s.target(); case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Segment_3.h cgal-4.8/include/CGAL/Segment_3.h --- cgal-4.7/include/CGAL/Segment_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Segment_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -198,7 +198,7 @@ std::ostream & operator<<(std::ostream &os, const Segment_3 &s) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << s.source() << ' ' << s.target(); case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h cgal-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h --- cgal-4.7/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -406,7 +406,7 @@ Vertex_handle nearest_neighbor(const Point_2& p, bool force_point = false) const; - Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle) + Vertex_handle nearest_neighbor(const Point_2& p, Vertex_handle) const { return nearest_neighbor(p); } diff -Nru cgal-4.7/include/CGAL/Shape_detection_3/Efficient_RANSAC.h cgal-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC.h --- cgal-4.7/include/CGAL/Shape_detection_3/Efficient_RANSAC.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Shape_detection_3/Efficient_RANSAC.h 2016-04-04 19:00:12.000000000 +0000 @@ -298,12 +298,14 @@ 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_input_iterator_first + (subsetSize), + m_point_pmap, m_normal_pmap, 0); m_available_octree_sizes[s] = subsetSize; @@ -313,7 +315,8 @@ } m_global_octree = new Indexed_octree( - m_traits, m_input_iterator_first, m_input_iterator_beyond); + m_traits, m_input_iterator_first, m_input_iterator_beyond, + m_point_pmap, m_normal_pmap); m_global_octree->createTree(); return true; @@ -696,7 +699,7 @@ candidates.resize(end); } - keep_searching = (stop_probability(m_options.min_points, + keep_searching = (stop_probability(m_options.min_points, m_num_available_points - num_invalid, generated_candidates, m_global_octree->maxLevel()) diff -Nru cgal-4.7/include/CGAL/Shape_detection_3/Octree.h cgal-4.8/include/CGAL/Shape_detection_3/Octree.h --- cgal-4.7/include/CGAL/Shape_detection_3/Octree.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Shape_detection_3/Octree.h 2016-04-04 19:00:12.000000000 +0000 @@ -235,6 +235,8 @@ 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) @@ -242,7 +244,9 @@ m_traits(traits), m_root(NULL), m_bucket_size(bucketSize), - m_set_max_level(maxLevel) {} + m_set_max_level(maxLevel), + m_point_pmap (point_pmap), + m_normal_pmap (normal_pmap) {} ~Octree() { if (!m_root) diff -Nru cgal-4.7/include/CGAL/Side_of_triangle_mesh.h cgal-4.8/include/CGAL/Side_of_triangle_mesh.h --- cgal-4.7/include/CGAL/Side_of_triangle_mesh.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Side_of_triangle_mesh.h 2016-04-04 19:00:12.000000000 +0000 @@ -47,7 +47,7 @@ * 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 `ON_BOUNDED_SIDE` and `ON_UNBOUNDED_SIDE`, + * 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. @@ -157,8 +157,7 @@ * @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_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 */ diff -Nru cgal-4.7/include/CGAL/Skin_surface_filtered_traits_3.h cgal-4.8/include/CGAL/Skin_surface_filtered_traits_3.h --- cgal-4.7/include/CGAL/Skin_surface_filtered_traits_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Skin_surface_filtered_traits_3.h 2016-04-04 19:00:12.000000000 +0000 @@ -25,7 +25,7 @@ #include #include -#include +#include #include namespace CGAL { diff -Nru cgal-4.7/include/CGAL/Snap_rounding_traits_2.h cgal-4.8/include/CGAL/Snap_rounding_traits_2.h --- cgal-4.7/include/CGAL/Snap_rounding_traits_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Snap_rounding_traits_2.h 2016-04-04 19:00:12.000000000 +0000 @@ -67,10 +67,25 @@ 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); + 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); } }; diff -Nru cgal-4.7/include/CGAL/sorted_matrix_search.h cgal-4.8/include/CGAL/sorted_matrix_search.h --- cgal-4.7/include/CGAL/sorted_matrix_search.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/sorted_matrix_search.h 2016-04-04 19:00:11.000000000 +0000 @@ -397,7 +397,7 @@ } // both upper_median and lower_median are infeasible - active_cells.erase( new_end, active_cells.end()); + active_cells.erase( new_end, active_cells.end()); } // for (;;) // there must be only one cell left: diff -Nru cgal-4.7/include/CGAL/Sphere_3.h cgal-4.8/include/CGAL/Sphere_3.h --- cgal-4.7/include/CGAL/Sphere_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Sphere_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -216,7 +216,7 @@ std::ostream& insert(std::ostream& os, const Sphere_3& c,const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); @@ -248,7 +248,7 @@ std::ostream& insert(std::ostream& os, const Sphere_3& c, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : os << c.center() << ' ' << c.squared_radius() << ' ' << static_cast(c.orientation()); @@ -291,7 +291,7 @@ typename R::Point_3 center; typename R::FT squared_radius; int o=0; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> center >> squared_radius >> o; break; @@ -318,7 +318,7 @@ typename R::Point_3 center; typename R::FT squared_radius; int o; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> center >> squared_radius >> o; break; diff -Nru cgal-4.7/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h cgal-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h --- cgal-4.7/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,6 +21,11 @@ #include #include +#include +#if BOOST_VERSION == 106000 +//ice_not is deprecated in boost 1.60 but used within adjacency_matrix.hpp +#include +#endif #include #include diff -Nru cgal-4.7/include/CGAL/Surface_mesh/Surface_mesh.h cgal-4.8/include/CGAL/Surface_mesh/Surface_mesh.h --- cgal-4.7/include/CGAL/Surface_mesh/Surface_mesh.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesh/Surface_mesh.h 2016-04-04 19:00:12.000000000 +0000 @@ -149,6 +149,15 @@ { public: + // Workaround for a bug in g++4.4 in ADL for function next: + // we provide the types needed for std::iterator_traits, + // 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(-1) {} explicit SM_Halfedge_index(size_type _idx) : SM_Index(_idx) {} @@ -1810,7 +1819,7 @@ if(!valid) { if (verbose) std::cerr << "Integrity of opposite halfedge of " << *it << " corrupted." << std::endl; - break; + break; } valid = valid && (next(prev(*it)) == *it); @@ -2474,7 +2483,7 @@ reindex.resize(sm.num_vertices()); int n = 0; BOOST_FOREACH(Vertex_index v, sm.vertices()){ - os << sm.point(v) << std::endl; + os << sm.point(v) << '\n'; reindex[v]=n++; } @@ -2483,7 +2492,7 @@ BOOST_FOREACH(Vertex_index v, CGAL::vertices_around_face(sm.halfedge(f),sm)){ os << " " << reindex[v]; } - os << "\n"; + os << '\n'; } return os; } diff -Nru cgal-4.7/include/CGAL/Surface_mesh_deformation.h cgal-4.8/include/CGAL/Surface_mesh_deformation.h --- cgal-4.7/include/CGAL/Surface_mesh_deformation.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesh_deformation.h 2016-04-04 19:00:12.000000000 +0000 @@ -21,10 +21,12 @@ #define CGAL_SURFACE_MESH_DEFORMATION_H #include -#include #include #include +#include +#include + #include #include #include @@ -45,7 +47,7 @@ namespace CGAL { -/// \ingroup PkgSurfaceModeling +/// \ingroup PkgSurfaceMeshDeformation ///@brief Deformation algorithm type enum Deformation_algorithm_tag { @@ -56,24 +58,46 @@ /// @cond CGAL_DOCUMENT_INTERNAL namespace internal { template -struct Weight_calculator_selector { - typedef Uniform_weight weight_calculator; -}; +struct Weight_calculator_selector; template struct Weight_calculator_selector { - typedef Single_cotangent_weight weight_calculator; + typedef Single_cotangent_weight_impl weight_calculator; }; template struct Weight_calculator_selector { - typedef Cotangent_weight weight_calculator; + typedef Cotangent_weight_impl weight_calculator; }; + +// property map that create a Simple_cartesian::Point_3 +// on the fly in order the deformation class to be used +// with points with minimal requirements +template +struct SC_on_the_fly_pmap: public Vertex_point_map{ + typedef boost::readable_property_map_tag category; + typedef CGAL::Simple_cartesian::Point_3 value_type; + typedef value_type reference; + typedef typename boost::property_traits::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::reference base= + get(static_cast(map), k); + return value_type(base[0], base[1], base[2]); + } +}; + + }//namespace internal /// @endcond /// - /// \ingroup PkgSurfaceModeling + /// \ingroup PkgSurfaceMeshDeformation /// @brief Class providing the functionalities for deforming a triangulated surface mesh /// /// @tparam HG a model of HalfedgeGraph @@ -82,10 +106,10 @@ /// @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::%type`. /// @tparam TAG tag for selecting the deformation algorithm - /// @tparam WC a model of SurfaceModelingWeights, with `WC::Halfedge_graph` being `HG`. + /// @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 SparseLinearAlgebraTraitsWithFactor_d. If \ref thirdpartyEigen "Eigen" 3.2 (or greater) is available + /// @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< @@ -367,13 +391,14 @@ private: void init() { + typedef internal::SC_on_the_fly_pmap 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, vertex_point_map)); + this->weight_calculator(*eb, m_halfedge_graph, Wrapper(vertex_point_map))); } #ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SR_ARAP m_sr_arap_alpha=2; @@ -761,6 +786,7 @@ */ void overwrite_initial_geometry() { + typedef internal::SC_on_the_fly_pmap Wrapper; if(roi.empty()) { return; } // no ROI to overwrite region_of_solution(); // the roi should be preprocessed since we are using original_position vec @@ -781,13 +807,13 @@ 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); + 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, vertex_point_map); + hedge_weight[id_e_opp] = weight_calculator(e_opp, m_halfedge_graph, Wrapper(vertex_point_map)); is_weight_computed[id_e_opp] = true; } } @@ -831,7 +857,7 @@ /** * Returns the range of vertices in the region-of-interest. */ - Roi_vertex_range roi_vertices() const + const Roi_vertex_range& roi_vertices() const { return roi; } @@ -1303,7 +1329,8 @@ { std::size_t v_id = ros_id(ros[i]); Point p(X[v_id], Y[v_id], Z[v_id]); - solution[v_id] = p; + 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 @@ -1373,7 +1400,8 @@ { std::size_t v_id = ros_id(ros[i]); Point p(X[v_id], Y[v_id], Z[v_id]); - solution[v_id] = p; + if (!is_ctrl_map[id(ros[i])]) + solution[v_id] = p; } } diff -Nru cgal-4.7/include/CGAL/Surface_mesher/Surface_mesher_manifold.h cgal-4.8/include/CGAL/Surface_mesher/Surface_mesher_manifold.h --- cgal-4.7/include/CGAL/Surface_mesher/Surface_mesher_manifold.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesher/Surface_mesher_manifold.h 2016-04-04 19:00:13.000000000 +0000 @@ -42,19 +42,12 @@ 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::Zone Zone; - typedef std::list Facets; - typedef std::list Vertices; - typedef typename Facets::iterator Facets_iterator; - typedef typename Vertices::iterator Vertices_iterator; - typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator; - protected: + 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()' @@ -62,7 +55,14 @@ mutable Bad_vertices bad_vertices; mutable bool bad_vertices_initialized; - private: + private: + typedef typename Tr::Cell_handle Cell_handle; + typedef std::list Facets; + typedef std::list 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); @@ -107,6 +107,27 @@ 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, @@ -133,27 +154,6 @@ 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(); diff -Nru cgal-4.7/include/CGAL/Surface_mesh_shortest_path/function_objects.h cgal-4.8/include/CGAL/Surface_mesh_shortest_path/function_objects.h --- cgal-4.7/include/CGAL/Surface_mesh_shortest_path/function_objects.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesh_shortest_path/function_objects.h 2016-04-04 19:00:12.000000000 +0000 @@ -454,51 +454,30 @@ Line_2 s2Line(m_construct_line_2(s2)); LineLineIntersectResult intersectResult1(m_intersect_2(s1Line, l1)); - CGAL_assertion(bool(intersectResult1)); + if (!intersectResult1) return CGAL::SMALLER; - Point_2 p1; + const Point_2* p1_ptr = boost::get(&*intersectResult1); - FT t1; + CGAL_assertion(p1_ptr && "Intersection should have been a point"); + if (!p1_ptr) return CGAL::SMALLER; - if (intersectResult1) - { - Point_2* result = boost::get(&*intersectResult1); - - CGAL_assertion(result && "Intersection should have been a point"); - - if (result) - { - t1 = m_parametric_distance_along_segment_2(s1, *result); - p1 = *result; - CGAL_assertion(t1 >= FT(-0.00001) && t1 <= FT(1.00001)); - } - } + 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; - FT t2; - Point_2 p2; + const Point_2* p2_ptr = boost::get(&*intersectResult2); - if (intersectResult2) - { - Point_2* result = boost::get(&*intersectResult2); - - CGAL_assertion(result && "Intersection should have been a point"); - - if (result) - { - t2 = m_parametric_distance_along_segment_2(s2, *result); - p2 = *result; - CGAL_assertion(t2 >= FT(-0.00001) && t2 <= FT(1.00001)); - } - } + CGAL_assertion(p2_ptr && "Intersection should have been a point"); + if (!p2_ptr) return CGAL::SMALLER; - result_type predicateResult = m_compare_distance_2(s1.source(), p1, s2.source(), p2); + 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 predicateResult; + return m_compare_distance_2(s1.source(), *p1_ptr, s2.source(), *p2_ptr); } }; diff -Nru cgal-4.7/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h cgal-4.8/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h --- cgal-4.7/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesh_shortest_path/internal/misc_functions.h 2016-04-04 19:00:12.000000000 +0000 @@ -37,7 +37,7 @@ halfedge_descriptor e0 = edge; halfedge_descriptor e1 = next(edge, g); - return Triangle_3(get(vertexPointMap, boost::source(e0, g)), get(vertexPointMap, boost::target(e0, g)), get(vertexPointMap, boost::target(e1, g))); + return Triangle_3(get(vertexPointMap, source(e0, g)), get(vertexPointMap, target(e0, g)), get(vertexPointMap, target(e1, g))); } template diff -Nru cgal-4.7/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h cgal-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h --- cgal-4.7/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h 2016-04-04 19:00:12.000000000 +0000 @@ -914,7 +914,7 @@ { LineLineIntersectResult cgalIntersection = i2(cl2(segment), cl2(leftBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !boost::get(&*cgalIntersection)) { if (m_debugOutput) { @@ -924,7 +924,7 @@ } else { - Point_2* result = boost::get(&*cgalIntersection); + Point_2* result = boost::get(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 >= FT(1.00000)) @@ -974,7 +974,7 @@ { LineLineIntersectResult cgalIntersection = i2(cl2(segment), cl2(rightBoundary)); - if (!cgalIntersection || !boost::get(&*cgalIntersection)) + if (!cgalIntersection || !boost::get(&*cgalIntersection)) { if (m_debugOutput) { @@ -984,7 +984,7 @@ } else { - Point_2* result = boost::get(&*cgalIntersection); + Point_2* result = boost::get(&*cgalIntersection); FT t0 = pdas2(cs2(segment), ct2(segment), *result); if (t0 <= FT(0.00000)) @@ -1459,7 +1459,7 @@ { vertex_iterator current, end; - for (boost::tie(current, end) = boost::vertices(m_graph); current != end; ++current) + for (boost::tie(current, end) = vertices(m_graph); current != end; ++current) { std::size_t vertexIndex = get(m_vertexIndexMap, *current); @@ -1570,7 +1570,7 @@ CGAL_assertion(bool(cgalIntersection)); - Point_2* result = boost::get(&*cgalIntersection); + Point_2* result = boost::get(&*cgalIntersection); CGAL_assertion(result && "Error, did not get point intersection on path walk to source"); @@ -1832,7 +1832,7 @@ std::size_t numVertices = 0; - for (boost::tie(current,end) = boost::vertices(m_graph); current != end; ++current) + 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; @@ -1855,7 +1855,7 @@ do { - std::cout << get(m_vertexIndexMap, boost::source(faceEdgesCurrent, m_graph)); + std::cout << get(m_vertexIndexMap, source(faceEdgesCurrent, m_graph)); faceEdgesCurrent = next(faceEdgesCurrent, m_graph); diff -Nru cgal-4.7/include/CGAL/surface_reconstruction_points_assertions.h cgal-4.8/include/CGAL/surface_reconstruction_points_assertions.h --- cgal-4.7/include/CGAL/surface_reconstruction_points_assertions.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/surface_reconstruction_points_assertions.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,7 +23,7 @@ /// \cond SKIP_IN_MANUAL /// @file surface_reconstruction_points_assertions.h -/// Define checking macros for the Surface_reconstruction_points_3 package +/// Define checking macros for the Poisson_surface_reconstruction_3 package // Note that this header file is intentionnaly not protected with a // macro (as ). Calling it a second time with another value diff -Nru cgal-4.7/include/CGAL/test_FPU_rounding_mode_impl.h cgal-4.8/include/CGAL/test_FPU_rounding_mode_impl.h --- cgal-4.7/include/CGAL/test_FPU_rounding_mode_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/test_FPU_rounding_mode_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +#include + +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 -Nru cgal-4.7/include/CGAL/Tetrahedron_3.h cgal-4.8/include/CGAL/Tetrahedron_3.h --- cgal-4.7/include/CGAL/Tetrahedron_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Tetrahedron_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -155,7 +155,7 @@ std::ostream & operator<<(std::ostream &os, const Tetrahedron_3 &t) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2] << ' ' << t[3]; case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h cgal-4.8/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h --- cgal-4.7/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include + +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 -Nru cgal-4.7/include/CGAL/Three/Polyhedron_demo_plugin_helper.h cgal-4.8/include/CGAL/Three/Polyhedron_demo_plugin_helper.h --- cgal-4.7/include/CGAL/Three/Polyhedron_demo_plugin_helper.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Polyhedron_demo_plugin_helper.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include +#include + +class QAction; +struct QMetaObject; +class QMainWindow; +class QDockWidget; + +#include +#include +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 actions() const; + + //! To get a selected item with the type of SceneType + template + SceneType* get_selected_item() const { + int item_id = scene->mainSelectionIndex(); + SceneType* scene_item = qobject_cast(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(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 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 -Nru cgal-4.7/include/CGAL/Three/Polyhedron_demo_plugin_interface.h cgal-4.8/include/CGAL/Three/Polyhedron_demo_plugin_interface.h --- cgal-4.7/include/CGAL/Three/Polyhedron_demo_plugin_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Polyhedron_demo_plugin_interface.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include +#include +#include + +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 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 -Nru cgal-4.7/include/CGAL/Three/Scene_draw_interface.h cgal-4.8/include/CGAL/Three/Scene_draw_interface.h --- cgal-4.7/include/CGAL/Three/Scene_draw_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Scene_draw_interface.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 -Nru cgal-4.7/include/CGAL/Three/Scene_group_item.h cgal-4.8/include/CGAL/Three/Scene_group_item.h --- cgal-4.7/include/CGAL/Three/Scene_group_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Scene_group_item.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +using namespace CGAL::Three; + +#include +#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 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(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 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 -Nru cgal-4.7/include/CGAL/Three/Scene_interface.h cgal-4.8/include/CGAL/Three/Scene_interface.h --- cgal-4.7/include/CGAL/Three/Scene_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Scene_interface.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include +#include +#include +#include +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 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 -Nru cgal-4.7/include/CGAL/Three/Scene_item_config.h cgal-4.8/include/CGAL/Three/Scene_item_config.h --- cgal-4.7/include/CGAL/Three/Scene_item_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Scene_item_config.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 + +#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 -Nru cgal-4.7/include/CGAL/Three/Scene_item.h cgal-4.8/include/CGAL/Three/Scene_item.h --- cgal-4.7/include/CGAL/Three/Scene_item.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Scene_item.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include +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; icreate(); + } + + buffers.reserve(buffersSize); + for(int i=0; icreate(); + } + + buffers.reserve(buffersSize); + for(int i=0; i(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 > categories; + //!Contains the name of the lines of each category. Must be sorted from top to bottom. + QList 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 buffers; + /*! Contains the VAOs. + */ + std::vector 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 +Q_DECLARE_METATYPE(CGAL::Three::Scene_item*) + +#endif // SCENE_ITEM_H diff -Nru cgal-4.7/include/CGAL/Three/Viewer_config.h cgal-4.8/include/CGAL/Three/Viewer_config.h --- cgal-4.7/include/CGAL/Three/Viewer_config.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Viewer_config.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 + +#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 -Nru cgal-4.7/include/CGAL/Three/Viewer_interface.h cgal-4.8/include/CGAL/Three/Viewer_interface.h --- cgal-4.7/include/CGAL/Three/Viewer_interface.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Three/Viewer_interface.h 2016-04-04 19:00:13.000000000 +0000 @@ -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 +#include +#include +#include +#include +// forward declarations +class QWidget; +class QMouseEvent; +class QKeyEvent; +class QOpenGLShaderProgram; + +//! \file Viewer_interface.h +#include // 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 -Nru cgal-4.7/include/CGAL/Timer.h cgal-4.8/include/CGAL/Timer.h --- cgal-4.7/include/CGAL/Timer.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Timer.h 2016-04-04 19:00:12.000000000 +0000 @@ -26,7 +26,8 @@ #ifndef CGAL_TIMER_H #define CGAL_TIMER_H 1 -#include +#include +#include namespace CGAL { @@ -48,7 +49,17 @@ 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 @@ -112,5 +123,9 @@ } //namespace CGAL +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY + #endif // CGAL_TIMER_H // // EOF // diff -Nru cgal-4.7/include/CGAL/Timer_impl.h cgal-4.8/include/CGAL/Timer_impl.h --- cgal-4.7/include/CGAL/Timer_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Timer_impl.h 2016-04-04 19:00:12.000000000 +0000 @@ -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 +// Matthias Baesken + +#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 +#ifdef _POSIX_ARG_MAX // now that should be POSIX +#include +#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 +// For the numerical limits +#else // CGAL__GETRUSAGE // +// used for clock() +#include +#endif // CGAL__GETRUSAGE // + +// For the numerical limits +#include + +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 -Nru cgal-4.7/include/CGAL/Tools/Log.h cgal-4.8/include/CGAL/Tools/Log.h --- cgal-4.7/include/CGAL/Tools/Log.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Tools/Log.h 2016-04-04 19:00:11.000000000 +0000 @@ -59,7 +59,25 @@ 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 @@ -67,42 +85,42 @@ when evaluated. */ - static Level level() {return state_.level_;} - static void set_level(Level l) {state_.level_=l;} + 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 (state_.target_== COUT) { + if (get_static_state().target_== COUT) { return std::cout; } else { - return state_.fstream_; + return get_static_state().fstream_; } } else { - return state_.null_; + return get_static_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 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 state_.output_maple_;} + static bool is_output_maple(){return get_static_state().output_maple_;} static void set_output_maple(bool b) { - state_.output_maple_=b; + get_static_state().output_maple_=b; } std::ofstream &maple_stream() { - if (!state_.maple_is_open_) { - state_.maple_is_open_=true; - state_.maple_.open("maple.log"); + if (!get_static_state().maple_is_open_) { + get_static_state().maple_is_open_=true; + get_static_state().maple_.open("maple.log"); } - return state_.maple_; + return get_static_state().maple_; } private: Log() { @@ -163,6 +181,8 @@ # pragma warning(pop) #endif -#endif - +#ifdef CGAL_HEADER_ONLY +#include +#endif // CGAL_HEADER_ONLY +#endif diff -Nru cgal-4.7/include/CGAL/Tools/Log_impl.h cgal-4.8/include/CGAL/Tools/Log_impl.h --- cgal-4.7/include/CGAL/Tools/Log_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/Tools/Log_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#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 -Nru cgal-4.7/include/CGAL/transforming_pair_iterator.h cgal-4.8/include/CGAL/transforming_pair_iterator.h --- cgal-4.7/include/CGAL/transforming_pair_iterator.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/transforming_pair_iterator.h 2016-04-04 19:00:12.000000000 +0000 @@ -23,8 +23,9 @@ // but boost's iterator_category games are a pain. #include +#include #include -#include + @@ -32,7 +33,7 @@ namespace internal { template ::value> struct Min_category { - BOOST_STATIC_ASSERT((boost::is_convertible::value)); + CGAL_static_assertion((boost::is_convertible::value)); typedef Cat1 type; }; diff -Nru cgal-4.7/include/CGAL/Triangle_2.h cgal-4.8/include/CGAL/Triangle_2.h --- cgal-4.7/include/CGAL/Triangle_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangle_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -182,7 +182,7 @@ std::ostream & operator<<(std::ostream &os, const Triangle_2 &t) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2]; case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Triangle_3.h cgal-4.8/include/CGAL/Triangle_3.h --- cgal-4.7/include/CGAL/Triangle_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangle_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -125,7 +125,7 @@ std::ostream & operator<<(std::ostream &os, const Triangle_3 &t) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << t[0] << ' ' << t[1] << ' ' << t[2]; case IO::BINARY : diff -Nru cgal-4.7/include/CGAL/Triangular_expansion_visibility_2.h cgal-4.8/include/CGAL/Triangular_expansion_visibility_2.h --- cgal-4.7/include/CGAL/Triangular_expansion_visibility_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangular_expansion_visibility_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include namespace CGAL { @@ -217,6 +218,7 @@ out_arr.clear(); needles.clear(); + CGAL_USE(face); CGAL_assertion(!face->is_unbounded()); diff -Nru cgal-4.7/include/CGAL/Triangulation_3.h cgal-4.8/include/CGAL/Triangulation_3.h --- cgal-4.7/include/CGAL/Triangulation_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangulation_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -61,6 +61,7 @@ #include #ifndef CGAL_NO_STRUCTURAL_FILTERING +#include #include #include #endif // no CGAL_NO_STRUCTURAL_FILTERING @@ -895,18 +896,20 @@ 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()); + // So that this code works well with Lazy_kernel + internal::Static_filters_predicates::Get_approx 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; diff -Nru cgal-4.7/include/CGAL/Triangulation_data_structure_2.h cgal-4.8/include/CGAL/Triangulation_data_structure_2.h --- cgal-4.7/include/CGAL/Triangulation_data_structure_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangulation_data_structure_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -1531,7 +1531,7 @@ return join_vertices(f->neighbor(i), mirror_index(f,i), v); } - int deg2 = degree(v2); + size_type deg2 = degree(v2); CGAL_triangulation_precondition( deg2 >= 3 ); @@ -1609,7 +1609,8 @@ ++fc; } while ( fc != fc_start ); - CGAL_triangulation_assertion( int(star_faces_of_v2.size()) == deg2 ); + CGAL_triangulation_assertion( + static_cast(star_faces_of_v2.size()) == deg2 ); // from this point and on we modify the values diff -Nru cgal-4.7/include/CGAL/Triangulation_data_structure_3.h cgal-4.8/include/CGAL/Triangulation_data_structure_3.h --- cgal-4.7/include/CGAL/Triangulation_data_structure_3.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangulation_data_structure_3.h 2016-04-04 19:00:13.000000000 +0000 @@ -51,14 +51,6 @@ #include #include -#ifdef CGAL_HAS_THREADS -# ifdef CGAL_LINKED_WITH_TBB -# include -# else -# include -# endif -#endif - #ifdef CGAL_LINKED_WITH_TBB # include #endif diff -Nru cgal-4.7/include/CGAL/Triangulation.h cgal-4.8/include/CGAL/Triangulation.h --- cgal-4.7/include/CGAL/Triangulation.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangulation.h 2016-04-04 19:00:13.000000000 +0000 @@ -877,8 +877,9 @@ std::back_insert_iterator > out(simps); if( current_dimension() < maximal_dimension() ) { + Coaffine_orientation_d ori = coaffine_orientation_predicate(); Outside_convex_hull_traversal_predicate - ochtp(*this, p, coaffine_orientation_predicate()); + ochtp(*this, p, ori); tds().gather_full_cells(s, ochtp, out); } else diff -Nru cgal-4.7/include/CGAL/Triangulation_structural_filtering_traits.h cgal-4.8/include/CGAL/Triangulation_structural_filtering_traits.h --- cgal-4.7/include/CGAL/Triangulation_structural_filtering_traits.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Triangulation_structural_filtering_traits.h 2016-04-04 19:00:11.000000000 +0000 @@ -1,10 +1,10 @@ // 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. +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. @@ -18,8 +18,8 @@ // Author(s) : Laurent Rineau // -#ifndef TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H -#define TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H +#ifndef CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H +#define CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H #include @@ -30,20 +30,6 @@ typedef Tag_false Use_structural_filtering_tag; }; -#ifdef CGAL_EXACT_PREDICATES_EXACT_CONSTRUCTIONS_KERNEL_H -template <> -struct Triangulation_structural_filtering_traits { - 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 { - typedef Tag_true Use_structural_filtering_tag; -}; -#endif // CGAL_EXACT_PREDICATES_INEXACT_CONSTRUCTIONS_KERNEL_H - -} // end namespace CGAL +} // namespace CGAL -#endif // no TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H +#endif // CGAL_TRIANGULATION_STRUCTURAL_FILTERING_TRAITS_H diff -Nru cgal-4.7/include/CGAL/tss.h cgal-4.8/include/CGAL/tss.h --- cgal-4.7/include/CGAL/tss.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/include/CGAL/tss.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#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 +# endif + + +# ifdef CGAL_USE_BOOST_THREAD + +# define CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE, VAR, ARG1) \ + static boost::thread_specific_ptr 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 -Nru cgal-4.7/include/CGAL/tuple.h cgal-4.8/include/CGAL/tuple.h --- cgal-4.7/include/CGAL/tuple.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/tuple.h 2016-04-04 19:00:12.000000000 +0000 @@ -32,6 +32,10 @@ #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 diff -Nru cgal-4.7/include/CGAL/Union_find.h cgal-4.8/include/CGAL/Union_find.h --- cgal-4.7/include/CGAL/Union_find.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Union_find.h 2016-04-04 19:00:13.000000000 +0000 @@ -58,6 +58,11 @@ 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(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++() { diff -Nru cgal-4.7/include/CGAL/vcm_estimate_edges.h cgal-4.8/include/CGAL/vcm_estimate_edges.h --- cgal-4.7/include/CGAL/vcm_estimate_edges.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/vcm_estimate_edges.h 2016-04-04 19:00:12.000000000 +0000 @@ -39,18 +39,21 @@ /// which however would result in selecting more points on sharper regions. /// More details are provided in \cgalCite{cgal:mog-vbcfe-11}. /// -/// \tparam VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. -/// \sa `CGAL::compute_vcm()` +/// \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 +template bool vcm_is_on_feature_edge (cpp11::array &cov, double threshold, - VCM_traits) + VCMTraits) { cpp11::array eigenvalues; - if (!VCM_traits:: + if (!VCMTraits:: diagonalize_selfadjoint_covariance_matrix(cov, eigenvalues) ) { return false; @@ -66,15 +69,15 @@ -#ifdef CGAL_EIGEN3_ENABLED template bool vcm_is_on_feature_edge (cpp11::array &cov, double threshold) { - return vcm_is_on_feature_edge(cov, threshold, Eigen_vcm_traits()); + return vcm_is_on_feature_edge(cov, threshold, + CGAL::Default_diagonalize_traits()); + } -#endif } // namespace CGAL diff -Nru cgal-4.7/include/CGAL/vcm_estimate_normals.h cgal-4.8/include/CGAL/vcm_estimate_normals.h --- cgal-4.7/include/CGAL/vcm_estimate_normals.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/vcm_estimate_normals.h 2016-04-04 19:00:12.000000000 +0000 @@ -32,9 +32,7 @@ #include #include -#ifdef CGAL_EIGEN3_ENABLED -#include -#endif +#include #include #include @@ -290,7 +288,7 @@ /// this number of neighbors. // This variant requires all of the parameters. -template < typename VCM_traits, +template < typename VCMTraits, typename ForwardIterator, typename PointPMap, typename NormalPMap, @@ -345,7 +343,7 @@ int i = 0; for (ForwardIterator it = first; it != beyond; ++it) { cpp11::array enormal = {{ 0,0,0 }}; - VCM_traits::extract_largest_eigenvector_of_covariance_matrix + VCMTraits::extract_largest_eigenvector_of_covariance_matrix (cov[i], enormal); typename Kernel::Vector_3 normal(enormal[0], @@ -368,15 +366,17 @@ /// @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 VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. - +/// \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 VCM_traits + typename VCMTraits > void vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input point. @@ -385,16 +385,16 @@ NormalPMap normal_pmap, ///< property map: value_type of ForwardIterator -> Vector_3. double offset_radius, ///< offset radius. double convolution_radius, ///< convolution radius. - VCM_traits + VCMTraits ) { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - vcm_estimate_normals(first, beyond, - point_pmap, normal_pmap, - offset_radius, convolution_radius, - Kernel()); + vcm_estimate_normals(first, beyond, + point_pmap, normal_pmap, + offset_radius, convolution_radius, + Kernel()); } @@ -409,15 +409,18 @@ /// @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 VCM_traits is a model of `VCMTraits`. If Eigen 3 (or greater) is available and `CGAL_EIGEN3_ENABLED` is defined -/// then an overload using `Eigen_vcm_traits` is provided and this template parameter can be omitted. +/// \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 VCM_traits + typename VCMTraits > void vcm_estimate_normals (ForwardIterator first, ///< iterator over the first input point. @@ -426,21 +429,20 @@ 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. - VCM_traits + VCMTraits ) { typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel Kernel; - vcm_estimate_normals(first, beyond, - point_pmap, normal_pmap, - offset_radius, 0, - Kernel(), - k); + vcm_estimate_normals(first, beyond, + point_pmap, normal_pmap, + offset_radius, 0, + Kernel(), + k); } -#ifdef CGAL_EIGEN3_ENABLED template < typename ForwardIterator, typename PointPMap, typename NormalPMap @@ -453,7 +455,8 @@ double offset_radius, double convolution_radius) { - vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, convolution_radius, Eigen_vcm_traits()); + vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, convolution_radius, + CGAL::Default_diagonalize_traits()); } template < typename ForwardIterator, @@ -468,9 +471,11 @@ double offset_radius, unsigned int nb_neighbors_convolve) { - vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, nb_neighbors_convolve, Eigen_vcm_traits()); + vcm_estimate_normals(first, beyond, point_pmap, normal_pmap, offset_radius, nb_neighbors_convolve, + CGAL::Default_diagonalize_traits()); + } -#endif + /// @cond SKIP_IN_MANUAL // This variant creates a default point property map = Identity_property_map diff -Nru cgal-4.7/include/CGAL/Vector_2.h cgal-4.8/include/CGAL/Vector_2.h --- cgal-4.7/include/CGAL/Vector_2.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Vector_2.h 2016-04-04 19:00:11.000000000 +0000 @@ -251,7 +251,7 @@ std::ostream& insert(std::ostream& os, const Vector_2& v, const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << v.x() << ' ' << v.y(); case IO::BINARY : @@ -267,7 +267,7 @@ std::ostream& insert(std::ostream& os, const Vector_2& v, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << v.hx() << ' ' << v.hy() << ' ' << v.hw(); @@ -297,7 +297,7 @@ extract(std::istream& is, Vector_2& v, const Cartesian_tag&) { typename R::FT x, y; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y); break; @@ -321,7 +321,7 @@ extract(std::istream& is, Vector_2& v, const Homogeneous_tag&) { typename R::RT hx, hy, hw; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> hx >> hy >> hw; diff -Nru cgal-4.7/include/CGAL/Vector_3.h cgal-4.8/include/CGAL/Vector_3.h --- cgal-4.7/include/CGAL/Vector_3.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/Vector_3.h 2016-04-04 19:00:11.000000000 +0000 @@ -228,7 +228,7 @@ std::ostream& insert(std::ostream& os, const Vector_3& v, const Cartesian_tag&) { - switch(os.iword(IO::mode)) { + switch(get_mode(os)) { case IO::ASCII : return os << v.x() << ' ' << v.y() << ' ' << v.z(); case IO::BINARY : @@ -246,7 +246,7 @@ std::ostream& insert(std::ostream& os, const Vector_3& v, const Homogeneous_tag&) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << v.hx() << ' ' << v.hy() << ' ' << v.hz() << ' ' << v.hw(); @@ -277,7 +277,7 @@ extract(std::istream& is, Vector_3& v, const Cartesian_tag&) { typename R::FT x, y, z; - switch(is.iword(IO::mode)) { + switch(get_mode(is)) { case IO::ASCII : is >> iformat(x) >> iformat(y) >> iformat(z); break; @@ -301,7 +301,7 @@ extract(std::istream& is, Vector_3& v, const Homogeneous_tag&) { typename R::RT hx, hy, hz, hw; - switch(is.iword(IO::mode)) + switch(get_mode(is)) { case IO::ASCII : is >> hx >> hy >> hz >> hw; diff -Nru cgal-4.7/include/CGAL/version.h cgal-4.8/include/CGAL/version.h --- cgal-4.7/include/CGAL/version.h 2015-10-17 19:00:44.000000000 +0000 +++ cgal-4.8/include/CGAL/version.h 2016-04-04 19:00:49.000000000 +0000 @@ -26,10 +26,10 @@ #define CGAL_xstr(s) #s #define CGAL_str(s) CGAL_xstr(s) -#define CGAL_VERSION 4.7 -#define CGAL_VERSION_NR 1040701000 +#define CGAL_VERSION 4.8 +#define CGAL_VERSION_NR 1040801000 #define CGAL_SVN_REVISION 99999 -#define CGAL_GIT_HASH 8030a2952469e87a91fa016c27d643790a17daa6 +#define CGAL_GIT_HASH dbb2be14621e43d107cfa7c3adf73d5374f5b618 #define CGAL_VERSION_STR CGAL_str(CGAL_VERSION) #endif diff -Nru cgal-4.7/include/CGAL/Voronoi_diagram_2.h cgal-4.8/include/CGAL/Voronoi_diagram_2.h --- cgal-4.7/include/CGAL/Voronoi_diagram_2.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Voronoi_diagram_2.h 2016-04-04 19:00:13.000000000 +0000 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -603,6 +604,7 @@ 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); } @@ -614,7 +616,7 @@ Halfedge_around_vertex_circulator incident_halfedges(const Vertex_handle& v, const Halfedge_handle& he) const { - internal::use(v); + CGAL_USE(v); CGAL_precondition( he->target() == v ); return Halfedge_around_vertex_circulator(*he); } diff -Nru cgal-4.7/include/CGAL/Weighted_point.h cgal-4.8/include/CGAL/Weighted_point.h --- cgal-4.7/include/CGAL/Weighted_point.h 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/include/CGAL/Weighted_point.h 2016-04-04 19:00:13.000000000 +0000 @@ -109,7 +109,7 @@ std::ostream & operator<<(std::ostream &os, const Weighted_point &p) { - switch(os.iword(IO::mode)) + switch(get_mode(os)) { case IO::ASCII : return os << p.point() << " " << p.weight(); diff -Nru cgal-4.7/include/CGAL/wlop_simplify_and_regularize_point_set.h cgal-4.8/include/CGAL/wlop_simplify_and_regularize_point_set.h --- cgal-4.7/include/CGAL/wlop_simplify_and_regularize_point_set.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/include/CGAL/wlop_simplify_and_regularize_point_set.h 2016-04-04 19:00:12.000000000 +0000 @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -499,7 +498,7 @@ if (radius < 0) { const unsigned int nb_neighbors = 6; // 1 ring - FT average_spacing = CGAL::compute_average_spacing( + FT average_spacing = CGAL::compute_average_spacing( first, beyond, point_pmap, nb_neighbors); @@ -584,8 +583,11 @@ typename std::vector::iterator update_iter = update_sample_points.begin(); +#ifndef CGAL_LINKED_WITH_TBB + CGAL_static_assertion_msg (!(boost::is_convertible::value), + "Parallel_tag is enabled but TBB is unavailable."); +#else //parallel -#ifdef CGAL_LINKED_WITH_TBB if (boost::is_convertible::value) { tbb::blocked_range block(0, number_of_sample); diff -Nru cgal-4.7/INSTALL.md cgal-4.8/INSTALL.md --- cgal-4.7/INSTALL.md 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/INSTALL.md 2016-04-04 19:00:11.000000000 +0000 @@ -60,9 +60,6 @@ * Visualization Required for most demos - - Qt3 (>= 3.3) - ftp://ftp.qt.nokia.com/qt/source/ - - Qt5 (>= 5.3) http://qt-project.org/ diff -Nru cgal-4.7/scripts/cgal_create_CMakeLists cgal-4.8/scripts/cgal_create_CMakeLists --- cgal-4.7/scripts/cgal_create_CMakeLists 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/scripts/cgal_create_CMakeLists 2016-04-04 19:00:12.000000000 +0000 @@ -42,7 +42,6 @@ #NTL #Core (implies GMP+GMPXX) -#Qt3 (implies QT3) #Qt4 (implies QT4) #ImageIO @@ -53,7 +52,6 @@ create_cmake_script_with_options() { - qt3='n' qt4='n' # parse options file @@ -125,9 +123,8 @@ if [ ! -z "$CGAL_COMPONENTS" ]; then # ensure capitalization - # CGAL: Core, Qt3, Qt4, PDB, ImageIO + # 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]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} @@ -166,9 +163,6 @@ COMPONENT=`echo $cgal_component | tr '[:upper:]' '[:lower:]'` # for qtmoc - if [ "$COMPONENT" = "qt3" ]; then - qt3='y' - fi if [ "$COMPONENT" = "qt4" ]; then qt4='y' fi @@ -266,34 +260,7 @@ #------------------------------------------------------------------------- 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 - + # Qt4 if [ "$qt4" = "y" ]; then #vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv @@ -369,47 +336,6 @@ # 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 *.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 - 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 @@ -486,31 +412,6 @@ 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 @@ -586,9 +487,6 @@ 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 @@ -611,7 +509,7 @@ 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 " 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 diff -Nru cgal-4.7/scripts/cgal_create_cmake_script cgal-4.8/scripts/cgal_create_cmake_script --- cgal-4.7/scripts/cgal_create_cmake_script 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/scripts/cgal_create_cmake_script 2016-04-04 19:00:12.000000000 +0000 @@ -47,75 +47,6 @@ cmake_minimum_required(VERSION 2.8.10) EOF - - if [ "${TYPE}" = "demo" ] ; then - target_name="${PROJECT}_${TYPE}" - - 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 - 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 <]" + echo "Usage: cgal_create_cmake_script [--source_dir ]" 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 " 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 " diff -Nru cgal-4.7/src/CGAL/assertions.cpp cgal-4.8/src/CGAL/assertions.cpp --- cgal-4.7/src/CGAL/assertions.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/assertions.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,201 +22,9 @@ // // Author(s) : Geert-Jan Giezeman and Sven Schönherr -#include -#include -#include -#include - -#include -#include - -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 +#ifndef CGAL_HEADER_ONLY -// 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; -} +#include +#include -} //namespace CGAL +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/Bbox_2_intersections.cpp cgal-4.8/src/CGAL/Bbox_2_intersections.cpp --- cgal-4.7/src/CGAL/Bbox_2_intersections.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Bbox_2_intersections.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -22,346 +22,12 @@ // // Author(s) : Geert-Jan Giezeman +#ifndef CGAL_HEADER_ONLY -#include #include -#include -typedef CGAL::Simple_cartesian 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; -} +#include +#include +#include -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 +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/Color.cpp cgal-4.8/src/CGAL/Color.cpp --- cgal-4.7/src/CGAL/Color.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/Color.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,25 +22,9 @@ // // Author(s) : Andreas Fabri, Hervé Brönnimann -#include - - -namespace CGAL { - -const Color BLACK = Color(0, 0, 0); -const Color WHITE = Color(255, 255, 255); -const Color GRAY = Color(100,100,100); +#ifndef CGAL_HEADER_ONLY -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 +#include +#include +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/File_header_extended_OFF.cpp cgal-4.8/src/CGAL/File_header_extended_OFF.cpp --- cgal-4.7/src/CGAL/File_header_extended_OFF.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_header_extended_OFF.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,175 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include - -#include -#include -#include -#include -#include -#include - - -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); } +#ifndef CGAL_HEADER_ONLY +#include +#include -// 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 +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/File_header_OFF.cpp cgal-4.8/src/CGAL/File_header_OFF.cpp --- cgal-4.7/src/CGAL/File_header_OFF.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_header_OFF.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,371 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include -#include -#include -#include -#include -#include -#include -#include - -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); -} +#ifndef CGAL_HEADER_ONLY -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( 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(h.size_of_vertices())); - I_Binary_write_big_endian_integer32( out, static_cast(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( 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); +#include +#include - 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(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; -} +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/File_scanner_OFF.cpp cgal-4.8/src/CGAL/File_scanner_OFF.cpp --- cgal-4.7/src/CGAL/File_scanner_OFF.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_scanner_OFF.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,104 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include -#include -#include -#include - -namespace CGAL { +#ifndef CGAL_HEADER_ONLY -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; -} +#include +#include -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; - } -} +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/File_writer_inventor.cpp cgal-4.8/src/CGAL/File_writer_inventor.cpp --- cgal-4.7/src/CGAL/File_writer_inventor.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_writer_inventor.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,43 +22,11 @@ // // Author(s) : Lutz Kettner -#include - -namespace CGAL { +#ifndef CGAL_HEADER_ONLY -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"; -} +#include +#include -void -File_writer_inventor:: -write_footer() const { - out() << " ] #coordIndex\n" - " } #IndexedFaceSet\n" - "} #Separator" << std::endl; -} +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/File_writer_OFF.cpp cgal-4.8/src/CGAL/File_writer_OFF.cpp --- cgal-4.7/src/CGAL/File_writer_OFF.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_writer_OFF.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,28 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include +#ifndef CGAL_HEADER_ONLY + #include +#include -namespace CGAL { +#endif // CGAL_HEADER_ONLY -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 -Nru cgal-4.7/src/CGAL/File_writer_VRML_2.cpp cgal-4.8/src/CGAL/File_writer_VRML_2.cpp --- cgal-4.7/src/CGAL/File_writer_VRML_2.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_writer_VRML_2.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,54 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include -#include - -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; +#ifndef CGAL_HEADER_ONLY - 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; -} +#include +#include -void -File_writer_VRML_2:: -write_footer() const { - out() << " ] #coordIndex\n" - " } #geometry\n" - " } #Shape\n" - " ] #children\n" - " } #Group" << std::endl; -} +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/File_writer_wavefront.cpp cgal-4.8/src/CGAL/File_writer_wavefront.cpp --- cgal-4.7/src/CGAL/File_writer_wavefront.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/File_writer_wavefront.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,29 +22,11 @@ // // Author(s) : Lutz Kettner -#include -#include -#include - -namespace CGAL { +#ifndef CGAL_HEADER_ONLY -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"; +#include +#include - out() << "\n# " << vertices << " vertices\n"; - out() << "# ------------------------------------------\n\n"; -} +#endif // CGAL_HEADER_ONLY -} //namespace CGAL // EOF // diff -Nru cgal-4.7/src/CGAL/Geomview_stream.cpp cgal-4.8/src/CGAL/Geomview_stream.cpp --- cgal-4.7/src/CGAL/Geomview_stream.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Geomview_stream.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -22,550 +22,9 @@ // // Author(s) : Andreas Fabri, Herve Bronnimann, Sylvain Pion -#include - -#ifdef CGAL_USE_GEOMVIEW - -#include -#include -#include -#include -#include -#include - -#include // kill() on SunPro requires these 2 #includes. -#include +#ifndef CGAL_HEADER_ONLY #include -#include - -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(NULL)); // cast to stop gcc warning - } else { - execlp("geomview", "geomview", "-c", "-", - static_cast(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; +#include - 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 -Nru cgal-4.7/src/CGAL/Interval_arithmetic.cpp cgal-4.8/src/CGAL/Interval_arithmetic.cpp --- cgal-4.7/src/CGAL/Interval_arithmetic.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Interval_arithmetic.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,36 +22,10 @@ // // Author(s) : Sylvain Pion +#ifndef CGAL_HEADER_ONLY + #include #include +#include -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 -Nru cgal-4.7/src/CGAL/io.cpp cgal-4.8/src/CGAL/io.cpp --- cgal-4.7/src/CGAL/io.cpp 2015-09-21 14:25:53.000000000 +0000 +++ cgal-4.8/src/CGAL/io.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,104 +22,15 @@ // // Author(s) : Andreas Fabri -#include -#include -#include +#ifndef CGAL_HEADER_ONLY -#include -#include +#include +#include namespace CGAL { int IO::mode = std::ios::xalloc(); - -IO::Mode -get_mode(std::ios& i) -{ - return static_cast(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 + +#endif diff -Nru cgal-4.7/src/CGAL/JAMA_numeric_solver.cpp cgal-4.8/src/CGAL/JAMA_numeric_solver.cpp --- cgal-4.7/src/CGAL/JAMA_numeric_solver.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/JAMA_numeric_solver.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -18,111 +18,9 @@ // // Author(s) : Daniel Russel -#include -#include - -#ifdef CGAL_HAVE_TNT -#include -#include -#include -#endif - -#include -#include -#include - -//#include - -namespace CGAL { namespace POLYNOMIAL { namespace internal { -#if CGAL_HAVE_TNT -//static const double max_error_value =0.00005; - -template -static void jama_compute_roots(const NT *begin, const NT *end, NT lb, -NT ub, std::vector &roots) -{ - int degree= end-begin-1; - TNT::Array2D 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 ev(arr); - TNT::Array1D 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()); - 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 &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(begin, end, lb, ub, roots); -#else - CGAL_error(); -#endif - //jama_compute_roots(begin, end, lb, ub, roots); - } -} +#ifndef CGAL_HEADER_ONLY +#include +#include -void jama_polynomial_compute_cleaned_roots(const double *begin, const double *end, -double lb, double ub, -std::vector &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(begin, end, lb, ub, roots); -#else - CGAL_error(); #endif - } -} - - -} } } //namespace CGAL::POLYNOMIAL::internal diff -Nru cgal-4.7/src/CGAL/KDS_Log.cpp cgal-4.8/src/CGAL/KDS_Log.cpp --- cgal-4.7/src/CGAL/KDS_Log.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/KDS_Log.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -18,30 +18,17 @@ // // Author(s) : Daniel Russel -#include +#ifndef CGAL_HEADER_ONLY -#if defined(BOOST_MSVC) -# pragma warning(disable:4251) -#endif - -#include #include -#include -namespace CGAL { -Log::State Log::state_; -} //namespace CGAL -namespace CGAL { namespace Kinetic { namespace internal { +#include +#include +#include +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 +#endif diff -Nru cgal-4.7/src/CGAL/kernel.cpp cgal-4.8/src/CGAL/kernel.cpp --- cgal-4.7/src/CGAL/kernel.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/kernel.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -22,18 +22,10 @@ // // Author(s) : Andreas Fabri, Stefan Schirra +#ifndef CGAL_HEADER_ONLY #include +#include #include +#include -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 +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/NefPolynomial.cpp cgal-4.8/src/CGAL/NefPolynomial.cpp --- cgal-4.7/src/CGAL/NefPolynomial.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/NefPolynomial.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -19,176 +19,9 @@ // Author(s) : Michael Seel // Andreas Fabri -#include - -namespace CGAL{ - - namespace Nef { - -void Polynomial::euclidean_div( - const Polynomial& f, const Polynomial& g, - Polynomial& q, Polynomial& r) -{ - r = f; r.copy_on_write(); - int rd=r.degree(), gd=g.degree(), qd; - if ( rd < gd ) { q = Polynomial(int(0)); } - else { qd = rd-gd+1; q = Polynomial(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::pseudo_div( - const Polynomial& f, const Polynomial& g, - Polynomial& q, Polynomial& r, int& D) -{ - CGAL_NEF_TRACEN("pseudo_div "<(0); r = f; D = 1; - CGAL_postcondition(Polynomial(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( 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 res = Polynomial(D)*f; - CGAL_NEF_TRACEN(" pseudo_div start "<= 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(D)*f==q*g+r); - CGAL_NEF_TRACEN(" returning "< Polynomial::gcd( - const Polynomial& p1, const Polynomial& p2) -{ CGAL_NEF_TRACEN("gcd("<(int(1)); - else return p2.abs(); - } - if ( p2.is_zero() ) - return p1.abs(); - - Polynomial f1 = p1.abs(); - Polynomial f2 = p2.abs(); - int f1c = f1.content(), f2c = f2.content(); - f1 /= f1c; f2 /= f2c; - int F = CGAL::gcd(f1c,f2c); - Polynomial q,r; int M=1,D; - bool first = true; - while ( ! f2.is_zero() ) { - Polynomial::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(F)*f1.abs(); -} - - - - -void Polynomial::euclidean_div( - const Polynomial& f, const Polynomial& g, - Polynomial& q, Polynomial& r) -{ - r = f; r.copy_on_write(); - int rd=r.degree(), gd=g.degree(), qd; - if ( rd < gd ) { q = Polynomial(double(0)); } - else { qd = rd-gd+1; q = Polynomial(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::pseudo_div( - const Polynomial& f, const Polynomial& g, - Polynomial& q, Polynomial& r, double& D) -{ - CGAL_NEF_TRACEN("pseudo_div "<(0); r = f; D = 1; - CGAL_postcondition(Polynomial(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( std::size_t(delta) ); - double G = g[gd]; // highest order coeff of g - D = G; while (--delta) D*=G; // D = G^delta - Polynomial res = Polynomial(D)*f; - CGAL_NEF_TRACEN(" pseudo_div start "<= 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(D)*f==q*g+r); - CGAL_NEF_TRACEN(" returning "< Polynomial::gcd( - const Polynomial& p1, const Polynomial& p2) -{ CGAL_NEF_TRACEN("gcd("<(double(1)); - else return p2.abs(); - } - if ( p2.is_zero() ) - return p1.abs(); - - Polynomial f1 = p1.abs(); - Polynomial f2 = p2.abs(); - double f1c = f1.content(), f2c = f2.content(); - f1 /= f1c; f2 /= f2c; - Polynomial q,r; double M=1,D; - bool first = true; - while ( ! f2.is_zero() ) { - Polynomial::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(1)*f1.abs(); -} +#ifndef CGAL_HEADER_ONLY +#include +#include -} // end namespace Nef -}//end namespace CGAL +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/numeric_solvers_support.cpp cgal-4.8/src/CGAL/numeric_solvers_support.cpp --- cgal-4.7/src/CGAL/numeric_solvers_support.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/numeric_solvers_support.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,249 +19,9 @@ // Author(s) : Daniel Russel -#include -#include - -#include -#include -#include - -/*#ifdef _MSC_VER -#pragma warning(disable:1572) -#endif*/ - -namespace CGAL { namespace POLYNOMIAL { namespace internal { - -static double max_error_value=.00005; - -namespace { -template -inline void compute_quadratic_roots_t(const NT *begin, const NT * /*end*/, NT lb, NT ub, -std::vector &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 &roots) -{ - return compute_quadratic_roots_t(begin, end, lb, ub, roots); -} - - -void compute_quadratic_cleaned_roots(const double *begin, const double *end, -double lb, double ub, std::vector &roots) -{ - return compute_quadratic_roots_t(begin, end, lb, ub, roots); -} - -namespace { -template -inline void compute_linear_roots_t(const NT *begin, const NT *, - NT lb, NT ub, - std::vector &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 &roots) -{ - return compute_linear_roots_t(begin, end, lb, ub, roots); -} - - -void compute_linear_cleaned_roots(const double *begin, const double *end, - double lb, double ub, std::vector &roots) -{ - return compute_linear_roots_t(begin, end, lb, ub, roots); -} - +#ifndef CGAL_HEADER_ONLY -namespace { -template - inline void filter_roots_t(const NT *begin, const NT *end, - NT lb, NT ub, NT last_root, std::vector &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::infinity(); - - while (roots.back() < lb) { - last_root= roots.back(); - roots.pop_back(); - }*/ - //if (roots.back() > lb+eps) return; - - //typedef CGAL_POLYNOMIAL_NS::Polynomial Fn; - - typedef CGAL_POLYNOMIAL_NS::Interval_polynomial IFn; - typedef CGAL_POLYNOMIAL_NS::internal::Derivative 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::infinity()){ - if ((end-begin)%2==1) { - vi= std::numeric_limits::infinity(); - } else { - vi = -*(end-1); - } - } else { - IFn fi(begin, end); - if (roots.empty()) { - Interval_arithmetic_guard guard; - if (ub== std::numeric_limits::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 &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 &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 &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; +#include +#include - 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 -Nru cgal-4.7/src/CGAL/primes.cpp cgal-4.8/src/CGAL/primes.cpp --- cgal-4.7/src/CGAL/primes.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/primes.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -15,280 +15,11 @@ // $URL$ // $Id$ // -// Author(s) : Michael Hemmer, Alexander Kobel +// Author(s) : Michael Hemmer -#include -#include - -namespace CGAL { -namespace internal { +#ifndef CGAL_HEADER_ONLY -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, -}; +#include +#include -} // namespace internal -} // namespace CGAL +#endif diff -Nru cgal-4.7/src/CGAL/Random.cpp cgal-4.8/src/CGAL/Random.cpp --- cgal-4.7/src/CGAL/Random.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Random.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -22,67 +22,15 @@ // // Author(s) : Sven Schönherr +#ifndef CGAL_HEADER_ONLY + #include -#include -#include +#include 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(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(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 + +#endif diff -Nru cgal-4.7/src/CGAL/Real_timer.cpp cgal-4.8/src/CGAL/Real_timer.cpp --- cgal-4.7/src/CGAL/Real_timer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Real_timer.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -23,88 +23,15 @@ // Author(s) : Lutz Kettner // Matthias Baesken -#include +#ifndef CGAL_HEADER_ONLY -#if defined (_MSC_VER) -# include -# include - -#elif defined (__MINGW32__) -# include -# include - -#else -// If none of the above PC compilers, use POSIX fct. gettimeofday() -# include -#endif +#include +#include 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 + +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/Residue_type.cpp cgal-4.8/src/CGAL/Residue_type.cpp --- cgal-4.7/src/CGAL/Residue_type.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Residue_type.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -17,21 +17,16 @@ // // Author(s) : Michael Hemmer +#ifndef CGAL_HEADER_ONLY #include +#include namespace CGAL{ -#ifdef CGAL_HAS_THREADS -boost::thread_specific_ptr Residue::prime_int_; -boost::thread_specific_ptr Residue::prime_; -boost::thread_specific_ptr 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 ); } + +#endif diff -Nru cgal-4.7/src/CGAL/test_FPU_rounding_mode.cpp cgal-4.8/src/CGAL/test_FPU_rounding_mode.cpp --- cgal-4.7/src/CGAL/test_FPU_rounding_mode.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/test_FPU_rounding_mode.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -18,34 +18,9 @@ // // Author(s) : Laurent Rineau -#ifndef CGAL_NDEBUG +#ifndef CGAL_HEADER_ONLY -#include #include -#include +#include -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 +#endif diff -Nru cgal-4.7/src/CGAL/Timer.cpp cgal-4.8/src/CGAL/Timer.cpp --- cgal-4.7/src/CGAL/Timer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Timer.cpp 2016-04-04 19:00:12.000000000 +0000 @@ -23,116 +23,15 @@ // Author(s) : Lutz Kettner // Matthias Baesken -#include - -// 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 -#ifdef _POSIX_ARG_MAX // now that should be POSIX -#include -#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 -// For the numerical limits -#else // CGAL__GETRUSAGE // -// used for clock() -#include -#endif // CGAL__GETRUSAGE // - -// For the numerical limits -#include +#ifndef CGAL_HEADER_ONLY +#include +#include 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 // +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL/Turkowski_numeric_solver.cpp cgal-4.8/src/CGAL/Turkowski_numeric_solver.cpp --- cgal-4.7/src/CGAL/Turkowski_numeric_solver.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL/Turkowski_numeric_solver.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -18,444 +18,9 @@ // // Author(s) : Daniel Russel -#include -#include - -/*#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. - * - * 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 -#include - -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(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::infinity(); - int t; - FLOAT p=std::numeric_limits::infinity(), q=std::numeric_limits::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 -static void Turkowski_polynomial_compute_roots_t(const double *begin, - const double *end, - double lb, double ub, - std::vector &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::infinity(); - }*/ - - for (unsigned int i=0; i< MAXN; ++i){ - cc[i]=std::numeric_limits::infinity(); - rp[i]=std::numeric_limits::infinity(); - cc[i]=std::numeric_limits::infinity(); - } - - FindPolynomialRoots(begin, rp, cp, cc, static_cast(numc)-1, 10*static_cast(numc), 40); - - /*if (CLEAN) { - lb-= .000005; - }*/ - double last= -std::numeric_limits::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] << "+" <()); - - 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 &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()); - break; - } - default: - Turkowski_polynomial_compute_roots_t(begin, end, lb, ub, roots); - - } - -} - - -void Turkowski_polynomial_compute_cleaned_roots(const double *begin, const double *end, - double lb, double ub, - std::vector &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::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()); - filter_solver_roots(begin, end, lb, ub, last, roots); - break; - } - default: - Turkowski_polynomial_compute_roots_t(begin, end, lb, ub, roots); - } -} +#ifndef CGAL_HEADER_ONLY +#include +#include -} } } //namespace CGAL::POLYNOMIAL::internal +#endif diff -Nru cgal-4.7/src/CGAL_Core/BigFloat.cpp cgal-4.8/src/CGAL_Core/BigFloat.cpp --- cgal-4.7/src/CGAL_Core/BigFloat.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/BigFloat.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -41,1247 +41,9 @@ * $Id$ ***************************************************************************/ -#include -#include -#include - -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(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(x.err), - abs(y.m) - static_cast(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(x.err) >> bits(t)) - // + delta + static_cast(y.err) * abs(m), - // abs(y.m) - static_cast(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(y.err) * abs(m), - // abs(y.m) - static_cast(y.err), - // bigErr, - // errRemainder); - div_rem(bigErr, errRemainder, - abs(remainder) + errx_over_Bexp + delta + static_cast(y.err) * abs(m), - abs(y.m) - static_cast(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(-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); +#ifndef CGAL_HEADER_ONLY - 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<(ee)); - else - mm = (mm << static_cast(-ee)); - if (E > 0) - mm *= (FiveTo(E)<< static_cast(E)); - else - M *= (FiveTo(-E) << static_cast(-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(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(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(le); // discard the contaminated bits. - e2 += le; // adjust the exponent - - if (e2 < 0) - return M >> static_cast(-e2); - else if (e2 > 0) - return M << static_cast(e2); - else - return M; -} +#include +#include -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(le); // discard the contaminated bits. - e2 += le; // adjust the exponent - long t; - if (e2 < 0) - t = ulongValue(M >> static_cast(-e2)); - else if (e2 > 0) - t = ulongValue(M << static_cast(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 -Nru cgal-4.7/src/CGAL_Core/CoreAux.cpp cgal-4.8/src/CGAL_Core/CoreAux.cpp --- cgal-4.7/src/CGAL_Core/CoreAux.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/CoreAux.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -33,181 +33,9 @@ * $Id$ ***************************************************************************/ -#include "CGAL/CORE/CoreAux.h" -#include +#ifndef CGAL_HEADER_ONLY -namespace CORE { +#include +#include -//////////////////////////////////////////////////////////// -// 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 (p0) { - 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"< +#include +#endif diff -Nru cgal-4.7/src/CGAL_Core/CoreIO.cpp cgal-4.8/src/CGAL_Core/CoreIO.cpp --- cgal-4.7/src/CGAL_Core/CoreIO.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/CoreIO.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -29,430 +29,6 @@ * $Id$ ***************************************************************************/ -#include -#include - -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 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) - 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 - +#ifndef CGAL_HEADER_ONLY +#include +#endif diff -Nru cgal-4.7/src/CGAL_Core/Expr.cpp cgal-4.8/src/CGAL_Core/Expr.cpp --- cgal-4.7/src/CGAL_Core/Expr.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/Expr.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -34,1119 +34,9 @@ * $Id$ ***************************************************************************/ -#include -#include - -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; -} +#ifndef CGAL_HEADER_ONLY +#include +#include -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; idebugTree(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; idebugList(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; idebugTree(level, indent + 2, depthLimit - 1); - second->debugTree(level, indent + 2, depthLimit - 1); -} - -} //namespace CORE diff -Nru cgal-4.7/src/CGAL_Core/extLong.cpp cgal-4.8/src/CGAL_Core/extLong.cpp --- cgal-4.7/src/CGAL_Core/extLong.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/extLong.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -39,157 +39,9 @@ * $Id$ ***************************************************************************/ -#include - -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; -} +#ifndef CGAL_HEADER_ONLY -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; -} +#include +#include -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 -Nru cgal-4.7/src/CGAL_Core/GmpIO.cpp cgal-4.8/src/CGAL_Core/GmpIO.cpp --- cgal-4.7/src/CGAL_Core/GmpIO.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/GmpIO.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -3,6 +3,15 @@ * 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 * @@ -12,257 +21,9 @@ * $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. */ +#ifndef CGAL_HEADER_ONLY #include -#include -#include -#include -#include - -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; -} +#include -} //namespace CORE +#endif diff -Nru cgal-4.7/src/CGAL_Core/Real.cpp cgal-4.8/src/CGAL_Core/Real.cpp --- cgal-4.7/src/CGAL_Core/Real.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Core/Real.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -35,242 +35,9 @@ * $Id$ ***************************************************************************/ -#include -#include - -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); +#ifndef CGAL_HEADER_ONLY - 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(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; - } +#include +#include -#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 -Nru cgal-4.7/src/CGAL_ImageIO/analyze.cpp cgal-4.8/src/CGAL_ImageIO/analyze.cpp --- cgal-4.7/src/CGAL_ImageIO/analyze.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/analyze.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,820 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include +#ifndef CGAL_HEADER_ONLY #include "analyze.h" +#include "analyze_impl.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; inuser; 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 *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 *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 *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 *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 ); - - -} +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/analyze.h cgal-4.8/src/CGAL_ImageIO/analyze.h --- cgal-4.7/src/CGAL_ImageIO/analyze.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/analyze.h 2016-04-04 19:00:11.000000000 +0000 @@ -67,5 +67,8 @@ */ int writeAnalyzeData( const _image* im ) ; +#ifdef CGAL_HEADER_ONLY +#include "analyze_impl.h" +#endif // CGAL_HEADER_ONLY #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/analyze_impl.h cgal-4.8/src/CGAL_ImageIO/analyze_impl.h --- cgal-4.7/src/CGAL_ImageIO/analyze_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/analyze_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#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 + +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; inuser; 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 *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 *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 *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 *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 -Nru cgal-4.7/src/CGAL_ImageIO/bmp.cpp cgal-4.8/src/CGAL_ImageIO/bmp.cpp --- cgal-4.7/src/CGAL_ImageIO/bmp.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmp.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,487 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include -#include -#include "bmptypes.h" -#include "bmpendian.h" -#include "bmpread.h" - - +#ifndef CGAL_HEADER_ONLY #include "bmp.h" +#include "bmp_impl.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 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 -#include "bmptypes.h" #include "bmpendian.h" +#include "bmpendian_impl.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: - */ - +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/bmpendian.h cgal-4.8/src/CGAL_ImageIO/bmpendian.h --- cgal-4.7/src/CGAL_ImageIO/bmpendian.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmpendian.h 2016-04-04 19:00:11.000000000 +0000 @@ -31,7 +31,11 @@ #ifndef __ENDIAN_H_INCLUDED__ #define __ENDIAN_H_INCLUDED__ - + +#include +#include "bmptypes.h" +#include + /* * Read the basic types as little-endian values. The return value will be * zero if successful, EOF, otherwise. @@ -54,6 +58,10 @@ 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__ */ diff -Nru cgal-4.7/src/CGAL_ImageIO/bmpendian_impl.h cgal-4.8/src/CGAL_ImageIO/bmpendian_impl.h --- cgal-4.7/src/CGAL_ImageIO/bmpendian_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmpendian_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#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 -Nru cgal-4.7/src/CGAL_ImageIO/bmp.h cgal-4.8/src/CGAL_ImageIO/bmp.h --- cgal-4.7/src/CGAL_ImageIO/bmp.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmp.h 2016-04-04 19:00:11.000000000 +0000 @@ -58,5 +58,8 @@ extern void IoBmp_verbose ( ); extern void IoBmp_noverbose ( ); +#ifdef CGAL_HEADER_ONLY +#include "bmp_impl.h" +#endif // CGAL_HEADER_ONLY #endif /* _bmp_h_ */ diff -Nru cgal-4.7/src/CGAL_ImageIO/bmp_impl.h cgal-4.8/src/CGAL_ImageIO/bmp_impl.h --- cgal-4.7/src/CGAL_ImageIO/bmp_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmp_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#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 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 -#include -#include -#include "bmptypes.h" -#include "bmpendian.h" #include "bmpread.h" +#include "bmpread_impl.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 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: - */ - +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/bmpread.h cgal-4.8/src/CGAL_ImageIO/bmpread.h --- cgal-4.7/src/CGAL_ImageIO/bmpread.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmpread.h 2016-04-04 19:00:11.000000000 +0000 @@ -32,6 +32,12 @@ #ifndef __READBMP_H_INCLUDED__ #define __READBMP_H_INCLUDED__ +#include +#include +#include +#include "bmptypes.h" +#include "bmpendian.h" + /* * Mid-level functions */ @@ -60,6 +66,10 @@ char ***andMasks, CGAL_UINT32 **widths, CGAL_UINT32 **heights, int *imageCount); +#ifdef CGAL_HEADER_ONLY +#include "bmpread_impl.h" +#endif // CGAL_HEADER_ONLY + #endif /* diff -Nru cgal-4.7/src/CGAL_ImageIO/bmpread_impl.h cgal-4.8/src/CGAL_ImageIO/bmpread_impl.h --- cgal-4.7/src/CGAL_ImageIO/bmpread_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/bmpread_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 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 -Nru cgal-4.7/src/CGAL_ImageIO/CMakeLists.txt cgal-4.8/src/CGAL_ImageIO/CMakeLists.txt --- cgal-4.7/src/CGAL_ImageIO/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -3,11 +3,6 @@ find_package( OpenGL ) find_package( ZLIB ) -#option(WITH_VTK "Add VTK support to libCGAL_ImageIO." OFF) - -if(WITH_VTK) - find_package(VTK COMPONENTS vtkImagingCore vtkIOImage vtkFiltersImaging NO_MODULE REQUIRED) -endif(WITH_VTK) if(OPENGL_FOUND) message( STATUS "OpenGL include: ${OPENGL_INCLUDE_DIR}" ) @@ -26,20 +21,6 @@ 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) - 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} ${vtkImagingCore_RUNTIME_LIBRARY_DIRS} ${vtkImagingCore_LIBRARY_DIRS} ${vtkIOImage_RUNTIME_LIBRARY_DIRS} ${vtkIOImage_LIBRARY_DIRS} ${vtkFiltersImaging_RUNTIME_LIBRARY_DIRS} ${vtkFiltersImaging_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 ) @@ -47,7 +28,7 @@ use_essential_libs() - include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} ) + include_directories( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ${CGAL_ImageIO_3RD_PARTY_INCLUDE_DIRS} .) link_directories ( ${CGAL_LIBRARIES_DIR} ${CGAL_3RD_PARTY_LIBRARIES_DIRS} ) diff -Nru cgal-4.7/src/CGAL_ImageIO/convert.cpp cgal-4.8/src/CGAL_ImageIO/convert.cpp --- cgal-4.7/src/CGAL_ImageIO/convert.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/convert.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,463 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -/************************************************************************* - * convert.c - conversion between types - * - * $Id$ - * - * Copyright©INRIA 1999 - * - * AUTHOR: - * Gregoire Malandain (greg@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 - * - */ +#ifndef CGAL_HEADER_ONLY #include "convert.h" +#include "convert_impl.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; i0; 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 +#ifndef CGAL_HEADER_ONLY -#include "gis.h" -#include "inr.h" +#include "fgetns.h" +#include "fgetns_impl.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; -} +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/fgetns.h cgal-4.8/src/CGAL_ImageIO/fgetns.h --- cgal-4.7/src/CGAL_ImageIO/fgetns.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/fgetns.h 2016-04-04 19:00:11.000000000 +0000 @@ -19,11 +19,17 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include +#ifndef FGETNS_H +#define FGETNS_H -#include "gis.h" -#include "inr.h" +#include /* 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 -Nru cgal-4.7/src/CGAL_ImageIO/fgetns_impl.h cgal-4.8/src/CGAL_ImageIO/fgetns_impl.h --- cgal-4.7/src/CGAL_ImageIO/fgetns_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/fgetns_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +/* 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 -Nru cgal-4.7/src/CGAL_ImageIO/gif.cpp cgal-4.8/src/CGAL_ImageIO/gif.cpp --- cgal-4.7/src/CGAL_ImageIO/gif.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gif.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,640 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include +#ifndef CGAL_HEADER_ONLY #include "gif.h" +#include "gif_impl.h" -#ifdef WIN32 -#include -#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 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; -} - +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/gif.h cgal-4.8/src/CGAL_ImageIO/gif.h --- cgal-4.7/src/CGAL_ImageIO/gif.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gif.h 2016-04-04 19:00:11.000000000 +0000 @@ -31,5 +31,8 @@ /** 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 -Nru cgal-4.7/src/CGAL_ImageIO/gif_impl.h cgal-4.8/src/CGAL_ImageIO/gif_impl.h --- cgal-4.7/src/CGAL_ImageIO/gif_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gif_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 + +#ifdef WIN32 +#include +#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 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 -Nru cgal-4.7/src/CGAL_ImageIO/gis.cpp cgal-4.8/src/CGAL_ImageIO/gis.cpp --- cgal-4.7/src/CGAL_ImageIO/gis.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gis.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,700 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include -#include +#ifndef CGAL_HEADER_ONLY -#include "gis.h" -#include "inr.h" -#include "fgetns.h" +#include "gis.h" +#include "gis_impl.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; jdata; - do { - memset( str, 0, _LGTH_STRING_ ); - for ( j=0; jsign ) */ - 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; jdata; - do { - memset( str, 0, _LGTH_STRING_ ); - for ( j=0; jsign ) */ - 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; nuser[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; -} +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/gis.h cgal-4.8/src/CGAL_ImageIO/gis.h --- cgal-4.7/src/CGAL_ImageIO/gis.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gis.h 2016-04-04 19:00:11.000000000 +0000 @@ -134,5 +134,8 @@ */ int writeGisData( const _image* im ) ; +#ifdef CGAL_HEADER_ONLY +#include "gis_impl.h" +#endif // CGAL_HEADER_ONLY #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/gis_impl.h cgal-4.8/src/CGAL_ImageIO/gis_impl.h --- cgal-4.7/src/CGAL_ImageIO/gis_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/gis_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include + +#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; jdata; + do { + memset( str, 0, _LGTH_STRING_ ); + for ( j=0; jsign ) */ + 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; jdata; + do { + memset( str, 0, _LGTH_STRING_ ); + for ( j=0; jsign ) */ + 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; nuser[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 -Nru cgal-4.7/src/CGAL_ImageIO/Image_3.cpp cgal-4.8/src/CGAL_ImageIO/Image_3.cpp --- cgal-4.7/src/CGAL_ImageIO/Image_3.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/Image_3.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -18,205 +18,9 @@ // // Author(s) : Laurent Rineau, Pierre Alliez -#include -#include - -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;ixdim;i+=5) - for(unsigned int j=0;jydim;j+=5) - for(unsigned int k=0;kzdim;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()); +#ifndef CGAL_HEADER_ONLY - 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 -#include - -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]; - 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 +#include +#include -#endif // CGAL_USE_VTK +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/ImageIO.cpp cgal-4.8/src/CGAL_ImageIO/ImageIO.cpp --- cgal-4.7/src/CGAL_ImageIO/ImageIO.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/ImageIO.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,1568 +19,9 @@ // $Id$ // -#ifdef _MSC_VER -// Suppress deprecated warning for fileno and strdup -# pragma warning(disable:4996) - -#include -#include -#include -#include -#include -#endif - -#include -#include -#include -#include +#ifndef CGAL_HEADER_ONLY #include +#include -/* 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 - reading failed.
    - 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;iimageFormat==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(posx /(image->vx)); - posy = static_cast(posy /(image->vy)); - posz = static_cast(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(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; idata ); - image->data = array; - - image->wordKind = WK_FLOAT; - image->wdim = 4; -} - +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/inr.cpp cgal-4.8/src/CGAL_ImageIO/inr.cpp --- cgal-4.7/src/CGAL_ImageIO/inr.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/inr.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,488 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#include "inr.h" -#include "fgetns.h" - -#include -#include - -/* 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 -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; -} - - - +#ifndef CGAL_HEADER_ONLY -/* 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)); +#include "inr.h" +#include "inr_impl.h" - 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; -} +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/inr.h cgal-4.8/src/CGAL_ImageIO/inr.h --- cgal-4.7/src/CGAL_ImageIO/inr.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/inr.h 2016-04-04 19:00:11.000000000 +0000 @@ -57,5 +57,9 @@ /** 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 -Nru cgal-4.7/src/CGAL_ImageIO/inr_impl.h cgal-4.8/src/CGAL_ImageIO/inr_impl.h --- cgal-4.7/src/CGAL_ImageIO/inr_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/inr_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include + +/* 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 +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 -Nru cgal-4.7/src/CGAL_ImageIO/iris.cpp cgal-4.8/src/CGAL_ImageIO/iris.cpp --- cgal-4.7/src/CGAL_ImageIO/iris.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/iris.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,473 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -/* - * xviris.c - load routine for IRIS 'rgb' format pictures - * - * LoadIRIS() - * WriteIRIS() - */ -#include -#include -#include -#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(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 +#endif // CGAL_HEADER_ONLY #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/iris_impl.h cgal-4.8/src/CGAL_ImageIO/iris_impl.h --- cgal-4.7/src/CGAL_ImageIO/iris_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/iris_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include + + + +/** 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(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 -#include -#include -#include - - - -/** 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; -} - +#include "mincio_impl.h" -#endif +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/mincio.h cgal-4.8/src/CGAL_ImageIO/mincio.h --- cgal-4.7/src/CGAL_ImageIO/mincio.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/mincio.h 2016-04-04 19:00:11.000000000 +0000 @@ -70,4 +70,8 @@ #endif +#ifdef CGAL_HEADER_ONLY +#include "mincio_impl.h" +#endif // CGAL_HEADER_ONLY + #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/mincio_impl.h cgal-4.8/src/CGAL_ImageIO/mincio_impl.h --- cgal-4.7/src/CGAL_ImageIO/mincio_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/mincio_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include +#include +#include + + + +/** 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 -Nru cgal-4.7/src/CGAL_ImageIO/pnm.cpp cgal-4.8/src/CGAL_ImageIO/pnm.cpp --- cgal-4.7/src/CGAL_ImageIO/pnm.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/pnm.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,612 +19,9 @@ // // Author(s) : ASCLEPIOS Project (INRIA Sophia-Antipolis), Laurent Rineau -#ifdef _MSC_VER -#pragma warning ( disable : 4068 4786 4081 ) -#endif - -#include -#include +#ifndef CGAL_HEADER_ONLY #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(x); - im->ydim = static_cast(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; ixdim*im->ydim*3; i++, buf++ ) - if ( max < *buf ) max = *buf; - } - break; - case 2 : - { - unsigned short *buf = (unsigned short *)im->data; - for ( i=0; ixdim*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; ixdim*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; ixdim*im->ydim; i++, buf++ ) - if ( max < *buf ) max = *buf; - } - break; - case 2 : - { - unsigned short *buf = (unsigned short *)im->data; - for ( i=0; ixdim*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; jdata; - do { - memset( str, 0, _LGTH_STRING_ ); - for ( j=0; jwdim == 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; ixdim*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; -} - - +#include "pnm_impl.h" +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/pnm.h cgal-4.8/src/CGAL_ImageIO/pnm.h --- cgal-4.7/src/CGAL_ImageIO/pnm.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/pnm.h 2016-04-04 19:00:11.000000000 +0000 @@ -39,5 +39,8 @@ PTRIMAGE_FORMAT createPgmAscIIFormat(); PTRIMAGE_FORMAT createPpmFormat(); +#ifdef CGAL_HEADER_ONLY +#include "pnm_impl.h" +#endif // CGAL_HEADER_ONLY #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/pnm_impl.h cgal-4.8/src/CGAL_ImageIO/pnm_impl.h --- cgal-4.7/src/CGAL_ImageIO/pnm_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/pnm_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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 +#include + +#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(x); + im->ydim = static_cast(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; ixdim*im->ydim*3; i++, buf++ ) + if ( max < *buf ) max = *buf; + } + break; + case 2 : + { + unsigned short *buf = (unsigned short *)im->data; + for ( i=0; ixdim*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; ixdim*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; ixdim*im->ydim; i++, buf++ ) + if ( max < *buf ) max = *buf; + } + break; + case 2 : + { + unsigned short *buf = (unsigned short *)im->data; + for ( i=0; ixdim*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; jdata; + do { + memset( str, 0, _LGTH_STRING_ ); + for ( j=0; jwdim == 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; ixdim*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 -Nru cgal-4.7/src/CGAL_ImageIO/recbuffer.cpp cgal-4.8/src/CGAL_ImageIO/recbuffer.cpp --- cgal-4.7/src/CGAL_ImageIO/recbuffer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/recbuffer.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,1719 +19,9 @@ // // 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@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 -#include -#include +#ifndef CGAL_HEADER_ONLY - - -#include "convert.h" #include "recbuffer.h" +#include "recbuffer_impl.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 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 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 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 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 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 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 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 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 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 0 ) { - dbl_pt1 = theLine + borderXlength; dbl_first = *dbl_pt1; - dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; - for ( x=0; x 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 0 ) { - dbl_pt1 = theLine + borderYlength; dbl_first = *dbl_pt1; - dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; - for ( y=0; y 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 0 ) { - dbl_pt1 = theLine + borderZlength; dbl_first = *dbl_pt1; - dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; - for ( z=0; z +#include +#include + +#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 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 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 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 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 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 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 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 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 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 0 ) { + dbl_pt1 = theLine + borderXlength; dbl_first = *dbl_pt1; + dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; + for ( x=0; x 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 0 ) { + dbl_pt1 = theLine + borderYlength; dbl_first = *dbl_pt1; + dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; + for ( y=0; y 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 0 ) { + dbl_pt1 = theLine + borderZlength; dbl_first = *dbl_pt1; + dbl_pt2 = theLine + offsetLastPoint; dbl_last = *dbl_pt2; + for ( z=0; z -#include -#include - - +#ifndef CGAL_HEADER_ONLY #include "recline.h" +#include "recline_impl.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=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 ; iderivative ) { - 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=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 ; isp1; - 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=0; i--,w0--,w1--,w2--,d1--) - *(w0) = rn1 * *(d1) - - rd1 * *(w1) - rd2 * *(w2); - - /*--- calcul final ---*/ - w1 = work1; w2 = work2; d0 = out; - for (i=0 ; isp0; 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=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 +#include +#include + + + +#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=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 ; iderivative ) { + 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=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 ; isp1; + 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=0; i--,w0--,w1--,w2--,d1--) + *(w0) = rn1 * *(d1) + - rd1 * *(w1) - rd2 * *(w2); + + /*--- calcul final ---*/ + w1 = work1; w2 = work2; d0 = out; + for (i=0 ; isp0; 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=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 -#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; -} +#include "reech4x4_impl.h" +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_ImageIO/reech4x4.h cgal-4.8/src/CGAL_ImageIO/reech4x4.h --- cgal-4.7/src/CGAL_ImageIO/reech4x4.h 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/reech4x4.h 2016-04-04 19:00:11.000000000 +0000 @@ -280,5 +280,9 @@ extern void Reech4x4_verbose ( ); extern void Reech4x4_noverbose ( ); +#ifdef CGAL_HEADER_ONLY +#include "reech4x4_impl.h" +#endif // CGAL_HEADER_ONLY + #endif diff -Nru cgal-4.7/src/CGAL_ImageIO/reech4x4_impl.h cgal-4.8/src/CGAL_ImageIO/reech4x4_impl.h --- cgal-4.7/src/CGAL_ImageIO/reech4x4_impl.h 1970-01-01 00:00:00.000000000 +0000 +++ cgal-4.8/src/CGAL_ImageIO/reech4x4_impl.h 2016-04-04 19:00:11.000000000 +0000 @@ -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@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 +#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 -Nru cgal-4.7/src/CGAL_Qt3/CMakeLists.txt cgal-4.8/src/CGAL_Qt3/CMakeLists.txt --- cgal-4.7/src/CGAL_Qt3/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 @@ -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 FindQt5: 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 ${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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake cgal-4.8/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake --- cgal-4.7/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_data_structures.qtmoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_faster.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_faster.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_faster.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_faster.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_pause.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_pause.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_pause.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_pause.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* XPM */ -static const char * pause_xpm[] = { -"27 27 2 1", -" c None", -". c #000000", -" ", -" ", -" ", -" ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ........ ........ ", -" ", -" ", -" ", -" "}; diff -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_pixmaps.cpp cgal-4.8/src/CGAL_Qt3/Kinetic_pixmaps.cpp --- cgal-4.7/src/CGAL_Qt3/Kinetic_pixmaps.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_pixmaps.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include -#include - -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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_play_through.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_play_through.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_play_through.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_play_through.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_play_to.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_play_to.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_play_to.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_play_to.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_play.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_play.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_play.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_play.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_print.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_print.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_print.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_print.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_core.cpp cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_core.cpp --- cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_core.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_core.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include - -#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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_timer.cpp cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_timer.cpp --- cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_timer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_timer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include -#include - -#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(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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp --- cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_widget_2_core.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include -#include - -#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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp --- cgal-4.7/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_Qt_window_2.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -#include -#include -#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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_reverse.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_reverse.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_reverse.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_reverse.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_slower.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_slower.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_slower.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_slower.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Kinetic_stop.xpm cgal-4.8/src/CGAL_Qt3/Kinetic_stop.xpm --- cgal-4.7/src/CGAL_Qt3/Kinetic_stop.xpm 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Kinetic_stop.xpm 1970-01-01 00:00:00.000000000 +0000 @@ -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 - */ - -/* XPM */ -static const char * stop_xpm[] = { -"27 27 2 1", -" c None", -". c #000000", -" ", -" ", -" ", -" ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ................... ", -" ", -" ", -" ", -" "}; diff -Nru cgal-4.7/src/CGAL_Qt3/Nef_S2.qtmoc.cmake cgal-4.8/src/CGAL_Qt3/Nef_S2.qtmoc.cmake --- cgal-4.7/src/CGAL_Qt3/Nef_S2.qtmoc.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Nef_S2.qtmoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_help_window.cpp cgal-4.8/src/CGAL_Qt3/Qt_help_window.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_help_window.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_help_window.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - -/* 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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include - -#include -#include - -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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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::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((x-xmin)*xscal) ); -} - -int Qt_widget::y_pixel(double y) const -{ - return( - static_cast((y-ymax)*yscal) ); -} - -int Qt_widget::x_pixel_dist(double d) const -{ - if (d>0) - return( static_cast(d*xscal) ); - else - return( static_cast(d*xscal) ); -} - -int Qt_widget::y_pixel_dist(double d) const -{ - if (d>0) - return( static_cast(d*yscal) ); - else - return( static_cast(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::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::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::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::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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget_history.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget_history.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget_history.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget_history.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include - -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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget_layer.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget_layer.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget_layer.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget_layer.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include - -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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget_OpenGL.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget_OpenGL.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget_OpenGL.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget_OpenGL.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 -// Peter Hachenberger - -#include - -#include -#include - -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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget.qtmoc.cmake cgal-4.8/src/CGAL_Qt3/Qt_widget.qtmoc.cmake --- cgal-4.7/src/CGAL_Qt3/Qt_widget.qtmoc.cmake 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget.qtmoc.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget_standard_toolbar.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - - -#include -#include - -// icons -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -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(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 -Nru cgal-4.7/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp cgal-4.8/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp --- cgal-4.7/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt3/Qt_widget_xpm_icons.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -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 - -#include - - - -/* 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", -" ........ ", -" .......... ", -" .....+++++.. ", -" .....++...++.. ", -"......+.....+...", -"......+.....+...", -"......+.....+...", -"......++...++...", -".......+++++....", -"..@@@@@.........", -"...@@@@.........", -"...@@@@.........", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - -/* 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", -" ........ ", -" .......... ", -" .....+++++.. ", -" ...++++..++@.. ", -"..++++...++..@..", -".+++.....++...@.", -".@.++...++....@.", -"..@.++..++..@@@.", -"..@..++++.@@..@.", -"...@..++@@...@..", -"...@...@....@...", -"....@..@...@....", -" ...@..@..@.... ", -" ...@.@.@.... ", -" ..@.@@.... ", -" ..@@.... "}; - - -/* 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", -" ........ ", -" ++++++++.. ", -" .+@@@@@@++.. ", -" ..+@@@@++@@+.. ", -"...+@@@+@@@@@+..", -"...++++@@@@@@+..", -"......++++++++..", -"......+@@@+.....", -"......++@@+.....", -"......+@+++.....", -".....+@@@@++....", -"....+@@@+++@+...", -" ..+@+++@@@@+.. ", -" .++@@@@@@@+. ", -" .++++++++. ", -" ........ "}; - - -/* 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", -" ........ ", -" .......... ", -" ............ ", -" ....++++++++.. ", -".....+......+...", -".....+......+...", -".....+......+...", -".....++++++++...", -"................", -"..@@@@@.........", -"...@@@@.........", -"...@@@@.........", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - -/* XPM */ -const char * iso_rectangle_xpm[] = { -"16 16 4 1", -" c None", -". c #EDA1A1", -"+ c #000000", -"@ c #1F0670", -" ........ ", -" .......... ", -" ............ ", -" ....++++++++.. ", -".....+......+...", -".....+......+...", -".....+......+...", -".....++++++++...", -"................", -"..@@@@@.........", -"...@@@@.........", -"...@@@@.........", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - -/* 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", -" ........ ", -" .......... ", -" ............ ", -" .....+........ ", -".......+........", -"........+.......", -".........+......", -"..........+.....", -"...........+....", -"..@@@@@.....+...", -"...@@@@.........", -"...@@@@.........", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - - - -/* 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", -" ........ ", -" ......+++. ", -" ......@+++.. ", -" ....@@@.+++@.. ", -"..@@@.....@..@..", -".@@......@....@.", -".@.@@....@....@.", -"..@..@..@...@@@.", -"..@...@.@.@@..@.", -"...@...@@@...@..", -"...@...@....@...", -"....@..@...@....", -" ...@..@..@.... ", -" ...@.@.@.... ", -" ..@.@@.... ", -" ..@@.... "}; - -/* 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", -" ........ ", -" ++++++++.. ", -" .+@@@@@@++.. ", -" ..+@@@@++@@+.. ", -"...+@@@+@@@@@+..", -"...++++@@@@@@+..", -"......++++++++..", -"......+@@@+.....", -"......++@@+.....", -"......+@+++.....", -".....+@@@@++....", -"....+@@@+++@+...", -" ..+@+++@@@@+.. ", -" .++@@@@@@@+. ", -" .++++++++. ", -" ........ "}; - - -/* 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", -" ........ ", -" .......... ", -" ............ ", -" .............. ", -".........+......", -".........+......", -".......+++++....", -".........+......", -".........+......", -"..@@@@@.........", -"...@@@@.........", -"...@@@@.........", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - -/* 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", -" ........ ", -" ..+++++++. ", -" ...+.....+.. ", -" ....+.....+++. ", -".....++++....+..", -"........+....+..", -"........+....+..", -"........+++..+..", -"..........+..+..", -"..@@@@@...+..+..", -"...@@@@...+..+..", -"...@@@@...++++..", -" .@@@@@........ ", -" @@@..@....... ", -"@@@.......... ", -"@@ ........ "}; - -/* 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", -" ........ ", -" ++++++++.. ", -" .+@@@@@@++.. ", -" ..+@.....@@+.. ", -"...+@@@.....@+..", -"...++++@.@@@@+..", -"......+@.@++++..", -"......+@.@+.....", -"......+@.@+.....", -"......+@.@+.....", -".....+@..@++....", -"....+@...@@@+...", -" ..+@......@+.. ", -" .++@@@@@@@+. ", -" .++++++++. ", -" ........ "}; - - -/* 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", -" ........ ", -" .......... ", -" .....+++.... ", -" .@...+.+.+.@@. ", -"..@@..+.+..@@...", -"...@@+..+..@+...", -"....@@..+.@@.+..", -"....+@@.+@@..+..", -"....+.@@@@..+...", -"...+..@@@@@.+...", -"...+.@@.+.@@....", -"....@@..+..@@...", -" ..@@+..+.+.@@. ", -" .@..+.+.+... ", -" ....+++... ", -" ....+... "}; - -/* 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", -" ........ ", -" ++++++++.. ", -" .+@@@@@@++.. ", -" ..+@@@@++@@+.. ", -"...+@@@+@@@@@+..", -"...++++@@@@@@+..", -"......++++++++..", -"......+@@@+.....", -"......++@@+.....", -"......+@+++.....", -".....+@@@@++....", -"....+@@@+++@+...", -" ..+@+++@@@@+.. ", -" .++@@@@@@@+. ", -" .++++++++. ", -" ........ "}; - - -/* 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 -Nru cgal-4.7/src/CGAL_Qt5/debug.cpp cgal-4.8/src/CGAL_Qt5/debug.cpp --- cgal-4.7/src/CGAL_Qt5/debug.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/debug.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,35 +19,9 @@ // Author(s) : Andreas Fabri // Laurent Rineau -#include -#include - -#include - -namespace CGAL { -namespace Qt { +#ifndef CGAL_HEADER_ONLY +#include +#include -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 +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_Qt5/DemosMainWindow.cpp cgal-4.8/src/CGAL_Qt5/DemosMainWindow.cpp --- cgal-4.7/src/CGAL_Qt5/DemosMainWindow.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/DemosMainWindow.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,425 +19,9 @@ // Author(s) : Andreas Fabri // Laurent Rineau -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifndef CGAL_HEADER_ONLY - -#include // needed to get CGAL_VERSION_STR #include -#include - -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); -} - -DemosMainWindow::~DemosMainWindow() -{ -} - -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); - view->setRenderHint(QPainter::HighQualityAntialiasing, checked); - - 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(objectName); - - // then search if a menu has title()==title - if(menu) { - return menu; - } else { - Q_FOREACH(menu, this->findChildren()) { - 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("", - QString(" (version %1)") - .arg(cgal_version)); -#endif - QMessageBox mb(QMessageBox::NoIcon, - title, - about_CGAL_txt, - QMessageBox::Ok, - this); - - QLabel* mb_label = mb.findChild("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(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(); -} - +#include -} // namespace Qt -} // namespace CGAL +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_Qt5/GraphicsViewNavigation.cpp cgal-4.8/src/CGAL_Qt5/GraphicsViewNavigation.cpp --- cgal-4.7/src/CGAL_Qt5/GraphicsViewNavigation.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/GraphicsViewNavigation.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,320 +19,9 @@ // Author(s) : Andreas Fabri // Laurent Rineau -#include -#include // for mapToScene(QGraphicsView*, QRect) -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -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(obj); - if(v == NULL) { - QWidget* viewport = qobject_cast(obj); - if(viewport == NULL) { - return false; - } - v = qobject_cast(viewport->parent()); - if(v == NULL) { - return false; - } - } - switch(event->type()) - { - case QEvent::KeyPress: { - QKeyEvent *keyEvent = static_cast(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(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(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(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(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(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; +#ifndef CGAL_HEADER_ONLY - 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 +#include +#include +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp cgal-4.8/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp --- cgal-4.7/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,178 +19,9 @@ // Author(s) : Andreas Fabri // Laurent Rineau -#include -#include -#include -#include -#include -#include -#include -#include -#include +#ifndef CGAL_HEADER_ONLY #include +#include -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(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(event); - mouseMoveEvent(mouseEvent); - return QObject::eventFilter(obj, event); - } else if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(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 +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_Qt5/resources.cpp cgal-4.8/src/CGAL_Qt5/resources.cpp --- cgal-4.7/src/CGAL_Qt5/resources.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/resources.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -18,13 +18,9 @@ // // Author(s) : Laurent Rineau -#include +#ifndef CGAL_HEADER_ONLY + #include +#include -// cannot use namespaces because of the Q_INIT_RESOURCE macro -void CGAL_Qt_init_resources() { - Q_INIT_RESOURCE(File); - Q_INIT_RESOURCE(Triangulation_2); - Q_INIT_RESOURCE(Input); - Q_INIT_RESOURCE(CGAL); -} +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CGAL_Qt5/utility.cpp cgal-4.8/src/CGAL_Qt5/utility.cpp --- cgal-4.7/src/CGAL_Qt5/utility.cpp 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CGAL_Qt5/utility.cpp 2016-04-04 19:00:11.000000000 +0000 @@ -19,36 +19,9 @@ // Author(s) : Andreas Fabri // Laurent Rineau -#include -#include -#include -#include -#include -#include - -namespace CGAL { -namespace Qt { +#ifndef CGAL_HEADER_ONLY -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; -} +#include +#include -} // namespace Qt -} // namespace CGAL +#endif // CGAL_HEADER_ONLY diff -Nru cgal-4.7/src/CMakeLists.txt cgal-4.8/src/CMakeLists.txt --- cgal-4.7/src/CMakeLists.txt 2015-09-21 14:25:52.000000000 +0000 +++ cgal-4.8/src/CMakeLists.txt 2016-04-04 19:00:11.000000000 +0000 @@ -7,7 +7,11 @@ # 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}) + 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}) @@ -40,7 +44,6 @@ ${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}" @@ -62,18 +65,24 @@ endif() endif() - install(TARGETS ${LIBRARY_NAME} EXPORT CGALExports - RUNTIME DESTINATION ${CGAL_INSTALL_BIN_DIR} - LIBRARY DESTINATION ${CGAL_INSTALL_LIB_DIR} - ARCHIVE DESTINATION ${CGAL_INSTALL_LIB_DIR}) + 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 ) - if(${COMPONENT} STREQUAL "CGAL_Qt3") - set(enabled_by_default OFF) - else() - set(enabled_by_default ON) - endif() + set(enabled_by_default ON) option( WITH_${COMPONENT} "Enable CGAL component ${COMPONENT}" ${enabled_by_default}) if ( WITH_${COMPONENT}) add_subdirectory( ${DIR} ${COMPONENT} ) @@ -178,7 +187,6 @@ CGAL_add_if_target(CGAL) CGAL_add_if_target(CGAL_Core) CGAL_add_if_target(CGAL_ImageIO) -CGAL_add_if_target(CGAL_Qt3) CGAL_add_if_target(CGAL_Qt5) export(TARGETS ${CGAL_ACTUAL_CONFIGURED_LIBRARIES} NAMESPACE CGAL:: FILE "${CMAKE_BINARY_DIR}/CGALExports.cmake") diff -Nru cgal-4.7/VERSION cgal-4.8/VERSION --- cgal-4.7/VERSION 2015-10-17 19:00:44.000000000 +0000 +++ cgal-4.8/VERSION 2016-04-04 19:00:49.000000000 +0000 @@ -1 +1 @@ -4.7 \ No newline at end of file +4.8 \ No newline at end of file