Merge branch 'et_world_coordinates' into fs_emboss

# Conflicts:
#	src/libslic3r/Technologies.hpp
This commit is contained in:
Filip Sykala 2022-04-20 10:41:11 +02:00
commit c58a8302b6
323 changed files with 9915 additions and 246420 deletions

View File

@ -414,6 +414,7 @@ if(SLIC3R_STATIC)
endif()
set(TBB_DEBUG 1)
find_package(TBB REQUIRED)
slic3r_remap_configs(TBB::tbb RelWithDebInfo Release)
# include_directories(${TBB_INCLUDE_DIRS})
# add_definitions(${TBB_DEFINITIONS})
# if(MSVC)
@ -469,18 +470,7 @@ include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR})
# Find expat or use bundled version
# Always use the system libexpat on Linux.
find_package(EXPAT)
if (NOT EXPAT_FOUND)
add_library(expat STATIC
${LIBDIR}/expat/xmlparse.c
${LIBDIR}/expat/xmlrole.c
${LIBDIR}/expat/xmltok.c
)
set(EXPAT_FOUND 1)
set(EXPAT_INCLUDE_DIRS ${LIBDIR}/expat/)
set(EXPAT_LIBRARIES expat)
endif ()
find_package(EXPAT REQUIRED)
find_package(PNG REQUIRED)
@ -493,16 +483,7 @@ if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_GLEW)
set(GLEW_VERBOSE ON)
endif()
find_package(GLEW)
if (NOT TARGET GLEW::GLEW)
message(STATUS "GLEW not found, using bundled version.")
add_library(glew STATIC ${LIBDIR}/glew/src/glew.c)
set(GLEW_FOUND TRUE)
set(GLEW_INCLUDE_DIRS ${LIBDIR}/glew/include/)
target_compile_definitions(glew PUBLIC GLEW_STATIC)
target_include_directories(glew PUBLIC ${GLEW_INCLUDE_DIRS})
add_library(GLEW::GLEW ALIAS glew)
endif ()
find_package(GLEW REQUIRED)
# Find the Cereal serialization library
find_package(cereal REQUIRED)

View File

@ -0,0 +1,36 @@
set(_q "")
if(EXPAT_FIND_QUIETLY)
set(_q QUIET)
endif()
find_package(EXPAT ${EXPAT_FIND_VERSION} CONFIG ${_q})
if(NOT EXPAT_FIND_QUIETLY)
if (NOT EXPAT_FOUND)
message(STATUS "Falling back to MODULE search for EXPAT...")
else()
message(STATUS "EXPAT found in ${EXPAT_DIR}")
endif()
endif()
if (NOT EXPAT_FOUND)
set(_modpath ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "")
include(FindEXPAT)
set(CMAKE_MODULE_PATH ${_modpath})
if (NOT TARGET EXPAT::EXPAT)
add_library(EXPAT::EXPAT INTERFACE)
target_link_libraries(EXPAT::EXPAT INTERFACE ${EXPAT_LIBRARIES})
target_include_directories(EXPAT::EXPAT INTERFACE ${EXPAT_INCLUDE_DIRS})
endif ()
endif()
if (EXPAT_FOUND AND NOT TARGET EXPAT::EXPAT)
add_library(libexpat INTERFACE)
add_library(EXPAT::EXPAT ALIAS libexpat)
target_link_libraries(libexpat INTERFACE expat::expat)
if (NOT EXPAT_LIBRARIES)
set(EXPAT_LIBRARIES expat::expat CACHE STRING "")
endif ()
endif ()

View File

@ -1,351 +1,20 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
# PrusaSlicer specifics:
# This file is backported from CMake 3.15 distribution to behave uniformly
# across all versions of CMake. It explicitly adds GLEW_STATIC complile
# definition to static targets which is needed to prevent link errors.
#[=======================================================================[.rst:
FindGLEW
--------
Find the OpenGL Extension Wrangler Library (GLEW)
Input Variables
^^^^^^^^^^^^^^^
The following variables may be set to influence this modules behavior:
``GLEW_USE_STATIC_LIBS``
to find and create :prop_tgt:`IMPORTED` target for static linkage.
``GLEW_VERBOSE``
to output a detailed log of this module.
Imported Targets
^^^^^^^^^^^^^^^^
This module defines the following :ref:`Imported Targets <Imported Targets>`:
``GLEW::glew``
The GLEW shared library.
``GLEW::glew_s``
The GLEW static library, if ``GLEW_USE_STATIC_LIBS`` is set to ``TRUE``.
``GLEW::GLEW``
Duplicates either ``GLEW::glew`` or ``GLEW::glew_s`` based on availability.
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
``GLEW_INCLUDE_DIRS``
include directories for GLEW
``GLEW_LIBRARIES``
libraries to link against GLEW
``GLEW_SHARED_LIBRARIES``
libraries to link against shared GLEW
``GLEW_STATIC_LIBRARIES``
libraries to link against static GLEW
``GLEW_FOUND``
true if GLEW has been found and can be used
``GLEW_VERSION``
GLEW version
``GLEW_VERSION_MAJOR``
GLEW major version
``GLEW_VERSION_MINOR``
GLEW minor version
``GLEW_VERSION_MICRO``
GLEW micro version
#]=======================================================================]
include(FindPackageHandleStandardArgs)
find_package(GLEW CONFIG QUIET)
if(GLEW_FOUND)
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_CONFIG)
return()
set(_q "")
if(GLEW_FIND_QUIETLY)
set(_q QUIET)
endif()
find_package(GLEW ${GLEW_FIND_VERSION} CONFIG ${_q})
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: did not find GLEW CMake config file. Searching for libraries.")
endif()
if(APPLE)
find_package(OpenGL QUIET)
if(OpenGL_FOUND)
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: Found OpenGL Framework.")
message(STATUS "FindGLEW: OPENGL_LIBRARIES: ${OPENGL_LIBRARIES}")
endif()
if(NOT GLEW_FIND_QUIETLY)
if (NOT GLEW_FOUND)
message(STATUS "Falling back to MODULE search for GLEW...")
else()
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: could not find GLEW library.")
endif()
return()
message(STATUS "GLEW found in ${GLEW_DIR}")
endif()
endif()
function(__glew_set_find_library_suffix shared_or_static)
if((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "SHARED")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" PARENT_SCOPE)
elseif((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "STATIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
elseif(APPLE AND "${shared_or_static}" MATCHES "SHARED")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so" PARENT_SCOPE)
elseif(APPLE AND "${shared_or_static}" MATCHES "STATIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
elseif(WIN32 AND "${shared_or_static}" MATCHES "SHARED")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" PARENT_SCOPE)
elseif(WIN32 AND "${shared_or_static}" MATCHES "STATIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.a;.dll.a" PARENT_SCOPE)
endif()
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: CMAKE_FIND_LIBRARY_SUFFIXES for ${shared_or_static}: ${CMAKE_FIND_LIBRARY_SUFFIXES}")
endif()
endfunction()
if(GLEW_VERBOSE)
if(DEFINED GLEW_USE_STATIC_LIBS)
message(STATUS "FindGLEW: GLEW_USE_STATIC_LIBS: ${GLEW_USE_STATIC_LIBS}.")
else()
message(STATUS "FindGLEW: GLEW_USE_STATIC_LIBS is undefined. Treated as FALSE.")
endif()
endif()
find_path(GLEW_INCLUDE_DIR GL/glew.h)
mark_as_advanced(GLEW_INCLUDE_DIR)
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: GLEW_INCLUDE_DIR: ${GLEW_INCLUDE_DIR}")
message(STATUS "FindGLEW: GLEW_INCLUDE_DIRS: ${GLEW_INCLUDE_DIRS}")
endif()
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64" OR "${CMAKE_GENERATOR}" MATCHES "Win64")
set(_arch "x64")
else()
set(_arch "Win32")
endif()
set(__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
__glew_set_find_library_suffix(SHARED)
find_library(GLEW_SHARED_LIBRARY_RELEASE
NAMES GLEW glew glew32
PATH_SUFFIXES lib lib64 libx32 lib/Release/${_arch}
PATHS ENV GLEW_ROOT)
find_library(GLEW_SHARED_LIBRARY_DEBUG
NAMES GLEWd glewd glew32d
PATH_SUFFIXES lib lib64
PATHS ENV GLEW_ROOT)
__glew_set_find_library_suffix(STATIC)
find_library(GLEW_STATIC_LIBRARY_RELEASE
NAMES GLEW glew glew32s
PATH_SUFFIXES lib lib64 libx32 lib/Release/${_arch}
PATHS ENV GLEW_ROOT)
find_library(GLEW_STATIC_LIBRARY_DEBUG
NAMES GLEWds glewd glewds glew32ds
PATH_SUFFIXES lib lib64
PATHS ENV GLEW_ROOT)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES})
unset(__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES)
include(SelectLibraryConfigurations)
select_library_configurations(GLEW_SHARED)
select_library_configurations(GLEW_STATIC)
if(NOT GLEW_USE_STATIC_LIBS)
set(GLEW_LIBRARIES ${GLEW_SHARED_LIBRARY})
else()
set(GLEW_LIBRARIES ${GLEW_STATIC_LIBRARY})
endif()
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY_RELEASE: ${GLEW_SHARED_LIBRARY_RELEASE}")
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY_RELEASE: ${GLEW_STATIC_LIBRARY_RELEASE}")
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY_DEBUG: ${GLEW_SHARED_LIBRARY_DEBUG}")
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY_DEBUG: ${GLEW_STATIC_LIBRARY_DEBUG}")
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY: ${GLEW_SHARED_LIBRARY}")
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY: ${GLEW_STATIC_LIBRARY}")
message(STATUS "FindGLEW: GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
endif()
# Read version from GL/glew.h file
if(EXISTS "${GLEW_INCLUDE_DIR}/GL/glew.h")
file(STRINGS "${GLEW_INCLUDE_DIR}/GL/glew.h" _contents REGEX "^VERSION_.+ [0-9]+")
if(_contents)
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MAJOR "${_contents}")
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MINOR "${_contents}")
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MICRO "${_contents}")
set(GLEW_VERSION "${GLEW_VERSION_MAJOR}.${GLEW_VERSION_MINOR}.${GLEW_VERSION_MICRO}")
endif()
endif()
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: GLEW_VERSION_MAJOR: ${GLEW_VERSION_MAJOR}")
message(STATUS "FindGLEW: GLEW_VERSION_MINOR: ${GLEW_VERSION_MINOR}")
message(STATUS "FindGLEW: GLEW_VERSION_MICRO: ${GLEW_VERSION_MICRO}")
message(STATUS "FindGLEW: GLEW_VERSION: ${GLEW_VERSION}")
endif()
find_package_handle_standard_args(GLEW
REQUIRED_VARS GLEW_INCLUDE_DIRS GLEW_LIBRARIES
VERSION_VAR GLEW_VERSION)
if (NOT GLEW_FOUND)
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: could not find GLEW library.")
endif()
return()
endif()
if(NOT TARGET GLEW::glew AND NOT GLEW_USE_STATIC_LIBS)
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: Creating GLEW::glew imported target.")
endif()
add_library(GLEW::glew UNKNOWN IMPORTED)
set_target_properties(GLEW::glew
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
if(APPLE)
set_target_properties(GLEW::glew
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
endif()
if(GLEW_SHARED_LIBRARY_RELEASE)
set_property(TARGET GLEW::glew
APPEND
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(GLEW::glew
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_SHARED_LIBRARY_RELEASE}")
endif()
if(GLEW_SHARED_LIBRARY_DEBUG)
set_property(TARGET GLEW::glew
APPEND
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(GLEW::glew
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_SHARED_LIBRARY_DEBUG}")
endif()
elseif(NOT TARGET GLEW::glew_s AND GLEW_USE_STATIC_LIBS)
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: Creating GLEW::glew_s imported target.")
endif()
add_library(GLEW::glew_s UNKNOWN IMPORTED)
set_target_properties(GLEW::glew_s
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
set_target_properties(GLEW::glew_s PROPERTIES INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
if(APPLE)
set_target_properties(GLEW::glew_s
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
endif()
if(GLEW_STATIC_LIBRARY_RELEASE)
set_property(TARGET GLEW::glew_s
APPEND
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(GLEW::glew_s
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_STATIC_LIBRARY_RELEASE}")
endif()
if(GLEW_STATIC_LIBRARY_DEBUG)
set_property(TARGET GLEW::glew_s
APPEND
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(GLEW::glew_s
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_STATIC_LIBRARY_DEBUG}")
endif()
endif()
if(NOT TARGET GLEW::GLEW)
if(GLEW_VERBOSE)
message(STATUS "FindGLEW: Creating GLEW::GLEW imported target.")
endif()
add_library(GLEW::GLEW UNKNOWN IMPORTED)
set_target_properties(GLEW::GLEW
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
if(APPLE)
set_target_properties(GLEW::GLEW
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
endif()
if(TARGET GLEW::glew)
if(GLEW_SHARED_LIBRARY_RELEASE)
set_property(TARGET GLEW::GLEW
APPEND
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(GLEW::GLEW
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_SHARED_LIBRARY_RELEASE}")
endif()
if(GLEW_SHARED_LIBRARY_DEBUG)
set_property(TARGET GLEW::GLEW
APPEND
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(GLEW::GLEW
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_SHARED_LIBRARY_DEBUG}")
endif()
elseif(TARGET GLEW::glew_s)
if(GLEW_STATIC_LIBRARY_RELEASE)
set_property(TARGET GLEW::GLEW
APPEND
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(GLEW::GLEW
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_STATIC_LIBRARY_RELEASE}"
INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
endif()
if(GLEW_STATIC_LIBRARY_DEBUG AND GLEW_USE_STATIC_LIBS)
set_property(TARGET GLEW::GLEW
APPEND
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(GLEW::GLEW
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_STATIC_LIBRARY_DEBUG}"
INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
endif()
elseif(GLEW_VERBOSE)
message(WARNING "FindGLEW: no `GLEW::glew` or `GLEW::glew_s` target was created. Something went wrong in FindGLEW target creation.")
endif()
set(_modpath ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "")
include(FindGLEW)
set(CMAKE_MODULE_PATH ${_modpath})
endif()

View File

@ -8,11 +8,7 @@ if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(_q QUIET)
endif()
# Only consider the config scripts if not building with the static dependencies
# and this call is not made from a static dependency build (e.g. dep_OpenVDB will use this module)
# BUILD_SHARED_LIBS will always be defined for dependency projects and will be OFF.
# Newer versions of TBB also discourage from using TBB as a static library
if (NOT SLIC3R_STATIC AND (NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS))
find_package(${CMAKE_FIND_PACKAGE_NAME} ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG ${_q})
if(NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
@ -23,8 +19,6 @@ if (NOT SLIC3R_STATIC AND (NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS))
endif()
endif()
endif ()
if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FOUND)
include(${CMAKE_CURRENT_LIST_DIR}/FindTBB.cmake.in)
endif ()

View File

@ -8,12 +8,10 @@ else()
set(_build_cmd ./b2)
endif()
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/common.jam ./tools/build/src/tools/common.jam)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
set(_boost_toolset gcc)
set(_patch_command ${_patch_command} && ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam)
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
if (MSVC_VERSION EQUAL 1800)
@ -40,7 +38,9 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif (APPLE)
set(_boost_toolset "clang")
else()
set(_boost_toolset "clang")
set(_boost_toolset clang)
configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam boost-user-config.jam)
set(_patch_command ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/boost-user-config.jam ./tools/build/src/tools/user-config.jam)
endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(_boost_toolset "intel")
@ -97,7 +97,7 @@ if (_cfg_rel GREATER -1 OR _cfg_relwdeb GREATER -1 OR _cfg_minsizerel GREATER -1
list(APPEND _boost_variants release)
endif()
if (_cfg_deb GREATER -1 OR (MSVC AND ${DEP_DEBUG}) )
if ( (NOT MSVC AND _cfg_deb GREATER -1) OR (MSVC AND ${DEP_DEBUG}) )
list(APPEND _boost_variants debug)
endif()
@ -135,8 +135,8 @@ endif ()
ExternalProject_Add(
dep_Boost
URL "https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz"
URL_HASH SHA256=aeb26f80e80945e82ee93e5939baebdca47b9dee80a07d3144be1e1a6a66dd6a
URL "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip"
URL_HASH SHA256=f22143b5528e081123c3c5ed437e92f648fe69748e95fa6e2bd41484e2986cc3
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/Boost
CONFIGURE_COMMAND "${_bootstrap_cmd}"
PATCH_COMMAND ${_patch_command}

1095
deps/Boost/common.jam vendored

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
using gcc : : @CMAKE_CXX_COMPILER@ ;
using @_boost_toolset@ : : @CMAKE_CXX_COMPILER@ ;

24
deps/CGAL/CGAL.cmake vendored
View File

@ -3,29 +3,9 @@ prusaslicer_add_cmake_project(
# GIT_REPOSITORY https://github.com/CGAL/cgal.git
# GIT_TAG bec70a6d52d8aacb0b3d82a7b4edc3caa899184b # releases/CGAL-5.0
# For whatever reason, this keeps downloading forever (repeats downloads if finished)
URL https://github.com/CGAL/cgal/archive/releases/CGAL-5.0.zip
URL_HASH SHA256=c2b035bd078687b6d8c0fb6371a7443adcdb647856af9969532c4050cd5f48e5
URL https://github.com/CGAL/cgal/archive/refs/tags/v5.4.zip
URL_HASH SHA256=d7605e0a5a5ca17da7547592f6f6e4a59430a0bc861948974254d0de43eab4c0
DEPENDS dep_Boost dep_GMP dep_MPFR
)
include(GNUInstallDirs)
# CGAL, for whatever reason, makes itself non-relocatable by writing the build directory into
# CGALConfig-installation-dirs.cmake and including it in configure time.
# If this file is not present, it will not consider the stored absolute path
ExternalProject_Add_Step(dep_CGAL dep_CGAL_relocation_fix
DEPENDEES install
COMMAND ${CMAKE_COMMAND} -E remove CGALConfig-installation-dirs.cmake
WORKING_DIRECTORY "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL"
)
# Again, for whatever reason, CGAL thinks that its version is not relevant if
# configured as a header only library. Fixing it by placing a cmake version file
# besides the installed config file.
ExternalProject_Add_Step(dep_CGAL dep_CGAL_version_fix
DEPENDEES install
COMMAND ${CMAKE_COMMAND} -E copy cgal/CGALConfigVersion.cmake "${DESTDIR}/usr/local/${CMAKE_INSTALL_LIBDIR}/cmake/CGAL/CGALConfigVersion.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
)

9
deps/CMakeLists.txt vendored
View File

@ -195,19 +195,16 @@ set(_dep_list
dep_OpenVDB
dep_OpenCSG
dep_CGAL
dep_Qhull
${PNG_PKG}
${ZLIB_PKG}
${EXPAT_PKG}
)
if (MSVC)
# Experimental
#list(APPEND _dep_list "dep_qhull")
else()
list(APPEND _dep_list "dep_Qhull")
# if (NOT MSVC)
# Not working, static build has different Eigen
#list(APPEND _dep_list "dep_libigl")
endif()
# endif()
add_custom_target(deps ALL DEPENDS ${_dep_list})

View File

@ -1,6 +1,8 @@
prusaslicer_add_cmake_project(Cereal
URL "https://github.com/USCiLab/cereal/archive/v1.2.2.tar.gz"
URL_HASH SHA256=1921f26d2e1daf9132da3c432e2fd02093ecaedf846e65d7679ddf868c7289c4
URL "https://github.com/USCiLab/cereal/archive/refs/tags/v1.3.0.zip"
URL_HASH SHA256=71642cb54658e98c8f07a0f0d08bf9766f1c3771496936f6014169d3726d9657
CMAKE_ARGS
-DJUST_INSTALL_CEREAL=on
-DJUST_INSTALL_CEREAL=ON
-DSKIP_PERFORMANCE_COMPARISON=ON
-DBUILD_TESTS=OFF
)

View File

@ -1,7 +1,19 @@
#prusaslicer_add_cmake_project(EXPAT
# # GIT_REPOSITORY https://github.com/nigels-com/glew.git
# # GIT_TAG 3a8eff7 # 2.1.0
# SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/expat
#)
prusaslicer_add_cmake_project(EXPAT
# GIT_REPOSITORY https://github.com/nigels-com/glew.git
# GIT_TAG 3a8eff7 # 2.1.0
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/expat
URL https://github.com/libexpat/libexpat/archive/refs/tags/R_2_4_3.zip
URL_HASH SHA256=8851e199d763dc785277d6d414ed3e70ff683915158b51b8d8781df0e3af950a
SOURCE_SUBDIR expat
CMAKE_ARGS
-DEXPAT_BUILD_TOOLS:BOOL=OFF
-DEXPAT_BUILD_EXAMPLES:BOOL=OFF
-DEXPAT_BUILD_TESTS:BOOL=OFF
-DEXPAT_BUILD_DOCS=OFF
-DEXPAT_BUILD_PKGCONFIG=OFF
)
if (MSVC)

View File

@ -1,71 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(EXPAT)
if (BUILD_SHARED_LIBS AND MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
add_library(expat
xmlparse.c
xmlrole.c
xmltok.c
)
target_include_directories(expat PRIVATE ${PROJECT_SOURCE_DIR})
include(GNUInstallDirs)
install(
FILES
${PROJECT_SOURCE_DIR}/expat.h
${PROJECT_SOURCE_DIR}/expat_config.h
${PROJECT_SOURCE_DIR}/expat_external.h
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}
)
add_library(EXPAT INTERFACE)
target_link_libraries(EXPAT INTERFACE expat)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
VERSION 1.95
COMPATIBILITY AnyNewerVersion
)
install(TARGETS expat EXPAT
EXPORT ${PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
export(EXPORT ${PROJECT_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
NAMESPACE ${PROJECT_NAME}:: )
set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
install(EXPORT ${PROJECT_NAME}Targets
FILE
"${PROJECT_NAME}Targets.cmake"
NAMESPACE
${PROJECT_NAME}::
DESTINATION
${ConfigPackageLocation}
)
configure_file(config.cmake.in ${PROJECT_NAME}Config.cmake @ONLY)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION
${ConfigPackageLocation}
)

View File

@ -1,21 +0,0 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2016 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,146 +0,0 @@
Expat, Release 2.2.0, stripped and modified for inclusion into Slic3r.
Only the library sources needed for static linking were left.
The original README follows:
---------------------------------------------------------------------
Expat, Release 2.2.0
This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of
structures for which you may register handlers.
Windows users should use the expat_win32bin package, which includes
both precompiled libraries and executables, and source code for
developers.
Expat is free software. You may copy, distribute, and modify it under
the terms of the License contained in the file COPYING distributed
with this package. This license is the same as the MIT/X Consortium
license.
Versions of Expat that have an odd minor version (the middle number in
the release above), are development releases and should be considered
as beta software. Releases with even minor version numbers are
intended to be production grade software.
If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.58 or newer. Run the script like this:
./buildconf.sh
Once this has been done, follow the same instructions as for building
from a source distribution.
To build Expat from a source distribution, you first run the
configuration shell script in the top level distribution directory:
./configure
There are many options which you may provide to configure (which you
can discover by running configure with the --help option). But the
one of most interest is the one that sets the installation directory.
By default, the configure script will set things up to install
libexpat into /usr/local/lib, expat.h into /usr/local/include, and
xmlwf into /usr/local/bin. If, for example, you'd prefer to install
into /home/me/mystuff/lib, /home/me/mystuff/include, and
/home/me/mystuff/bin, you can tell configure about that with:
./configure --prefix=/home/me/mystuff
Another interesting option is to enable 64-bit integer support for
line and column numbers and the over-all byte index:
./configure CPPFLAGS=-DXML_LARGE_SIZE
However, such a modification would be a breaking change to the ABI
and is therefore not recommended for general use - e.g. as part of
a Linux distribution - but rather for builds with special requirements.
After running the configure script, the "make" command will build
things and "make install" will install things into their proper
location. Have a look at the "Makefile" to learn about additional
"make" options. Note that you need to have write permission into
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error
strings as char), run:
./configure CPPFLAGS=-DXML_UNICODE
For UTF-16 output as wchar_t (incl. version/error strings),
run:
./configure CFLAGS="-g -O2 -fshort-wchar" \
CPPFLAGS=-DXML_UNICODE_WCHAR_T
2. Edit the MakeFile, changing:
LIBRARY = libexpat.la
to:
LIBRARY = libexpatw.la
(Note the additional "w" in the library name.)
3. Run "make buildlib" (which builds the library only).
Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
4. Run "make installlib" (which installs the library only).
Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
value for DESTDIR, and the rest of the make file using only DESTDIR.
It works as follows:
$ make install DESTDIR=/path/to/image
overrides the in-makefile set DESTDIR, while both
$ INSTALL_ROOT=/path/to/image make install
$ make install INSTALL_ROOT=/path/to/image
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to
add this to your path for the "make" command, and probably also switch
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
properly -- apparently it does not understand .PHONY directives). If
you're using ksh or bash, use this command to build:
PATH=/usr/ccs/bin:$PATH make
When using Expat with a project using autoconf for configuration, you
can use the probing macro in conftools/expat.m4 to determine how to
include Expat. See the comments at the top of that file for more
information.
A reference manual is available in the file doc/reference.html in this
distribution.
The homepage for this project is http://www.libexpat.org/. There
are links there to connect you to the bug reports page. If you need
to report a bug when you don't have access to a browser, you may also
send a bug report by email to expat-bugs@mail.libexpat.org.
Discussion related to the direction of future expat development takes
place on expat-discuss@mail.libexpat.org. Archives of this list and
other Expat-related lists may be found at:
http://mail.libexpat.org/mailman/listinfo/

View File

@ -1,92 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#define ASCII_O 0x4F
#define ASCII_P 0x50
#define ASCII_Q 0x51
#define ASCII_R 0x52
#define ASCII_S 0x53
#define ASCII_T 0x54
#define ASCII_U 0x55
#define ASCII_V 0x56
#define ASCII_W 0x57
#define ASCII_X 0x58
#define ASCII_Y 0x59
#define ASCII_Z 0x5A
#define ASCII_a 0x61
#define ASCII_b 0x62
#define ASCII_c 0x63
#define ASCII_d 0x64
#define ASCII_e 0x65
#define ASCII_f 0x66
#define ASCII_g 0x67
#define ASCII_h 0x68
#define ASCII_i 0x69
#define ASCII_j 0x6A
#define ASCII_k 0x6B
#define ASCII_l 0x6C
#define ASCII_m 0x6D
#define ASCII_n 0x6E
#define ASCII_o 0x6F
#define ASCII_p 0x70
#define ASCII_q 0x71
#define ASCII_r 0x72
#define ASCII_s 0x73
#define ASCII_t 0x74
#define ASCII_u 0x75
#define ASCII_v 0x76
#define ASCII_w 0x77
#define ASCII_x 0x78
#define ASCII_y 0x79
#define ASCII_z 0x7A
#define ASCII_0 0x30
#define ASCII_1 0x31
#define ASCII_2 0x32
#define ASCII_3 0x33
#define ASCII_4 0x34
#define ASCII_5 0x35
#define ASCII_6 0x36
#define ASCII_7 0x37
#define ASCII_8 0x38
#define ASCII_9 0x39
#define ASCII_TAB 0x09
#define ASCII_SPACE 0x20
#define ASCII_EXCL 0x21
#define ASCII_QUOT 0x22
#define ASCII_AMP 0x26
#define ASCII_APOS 0x27
#define ASCII_MINUS 0x2D
#define ASCII_PERIOD 0x2E
#define ASCII_COLON 0x3A
#define ASCII_SEMI 0x3B
#define ASCII_LT 0x3C
#define ASCII_EQUALS 0x3D
#define ASCII_GT 0x3E
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C

View File

@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

View File

@ -1,4 +0,0 @@
include(${CMAKE_CURRENT_LIST_DIR}/EXPATTargets.cmake)
set(EXPAT_LIBRARIES EXPAT::expat)
set(EXPAT_INCLUDE_DIRS ${_IMPORT_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})

1048
deps/EXPAT/expat/expat.h vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
/*================================================================
** Copyright 2000, Clark Cooper
** All rights reserved.
**
** This is free software. You are permitted to copy, distribute, or modify
** it under the terms of the MIT/X license (contained in the COPYING file
** with this distribution.)
*/
#ifndef EXPATCONFIG_H
#define EXPATCONFIG_H
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#else
#endif
#endif /* ifndef EXPATCONFIG_H */

View File

@ -1,129 +0,0 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(_MSC_VER)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
#ifdef XML_USE_MSC_EXTENSIONS
// #define XMLIMPORT __declspec(dllimport)
#endif
#endif
#endif /* not defined XML_STATIC */
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
#define XMLIMPORT __attribute__ ((visibility ("default")))
#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
#define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
#define XML_ATTR_MALLOC
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
#define XML_ATTR_ALLOC_SIZE(x)
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */

View File

@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

View File

@ -1,95 +0,0 @@
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
*/
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
#define FASTCALL __attribute__((regparm(3)))
#define PTRFASTCALL __attribute__((regparm(3)))
#endif
/* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
/* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef PTRCALL
#define PTRCALL
#endif
#ifndef PTRFASTCALL
#define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
#ifndef UNUSED_P
# ifdef __GNUC__
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
# else
# define UNUSED_P(p) UNUSED_ ## p
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
void
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
#ifdef __cplusplus
}
#endif

View File

@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,

View File

@ -1,150 +0,0 @@
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000,
0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003,
0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003,
0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001,
0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003,
0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003,
0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003,
0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000,
0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF,
0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB,
0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF,
0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
0x00000000, 0x00004C40, 0x00000000, 0x00000000,
0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF,
0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF,
0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000,
0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003,
0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF,
0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF,
0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF,
0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0,
0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3,
0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80,
0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000,
0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000,
0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF,
0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00,
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00,
0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,114 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
#ifdef __VMS
/* 0 1 2 3 0 1 2 3
1234567890123456789012345678901 1234567890123456789012345678901 */
#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
#endif
#include "xmltok.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
XML_ROLE_ERROR = -1,
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID,
XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME,
XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME,
XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID,
XML_ROLE_NOTATION_PUBLIC_ID,
XML_ROLE_ATTRIBUTE_NAME,
XML_ROLE_ATTRIBUTE_TYPE_CDATA,
XML_ROLE_ATTRIBUTE_TYPE_ID,
XML_ROLE_ATTRIBUTE_TYPE_IDREF,
XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY,
XML_ROLE_CONTENT_PCDATA,
XML_ROLE_GROUP_OPEN,
XML_ROLE_GROUP_CLOSE,
XML_ROLE_GROUP_CLOSE_REP,
XML_ROLE_GROUP_CLOSE_OPT,
XML_ROLE_GROUP_CLOSE_PLUS,
XML_ROLE_GROUP_CHOICE,
XML_ROLE_GROUP_SEQUENCE,
XML_ROLE_CONTENT_ELEMENT,
XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS,
XML_ROLE_PI,
XML_ROLE_COMMENT,
#ifdef XML_DTD
XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT,
XML_ROLE_INNER_PARAM_ENTITY_REF,
#endif /* XML_DTD */
XML_ROLE_PARAM_ENTITY_REF
};
typedef struct prolog_state {
int (PTRCALL *handler) (struct prolog_state *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc);
unsigned level;
int role_none;
#ifdef XML_DTD
unsigned includeLevel;
int documentEntity;
int inEntityValue;
#endif /* XML_DTD */
} PROLOG_STATE;
void XmlPrologStateInit(PROLOG_STATE *);
#ifdef XML_DTD
void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
#endif /* XML_DTD */
#define XmlTokenRole(state, tok, ptr, end, enc) \
(((state)->handler)(state, tok, ptr, end, enc))
#ifdef __cplusplus
}
#endif
#endif /* not XmlRole_INCLUDED */

File diff suppressed because it is too large Load Diff

View File

@ -1,322 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlTok_INCLUDED
#define XmlTok_INCLUDED 1
#ifdef __cplusplus
extern "C" {
#endif
/* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
start of illegal ]]> sequence */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_NONE -4 /* The string to be scanned is empty */
#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
might be part of CRLF sequence */
#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
#define XML_TOK_PARTIAL -1 /* only part of a token */
#define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
*/
#define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
#define XML_TOK_END_TAG 5
#define XML_TOK_DATA_CHARS 6
#define XML_TOK_DATA_NEWLINE 7
#define XML_TOK_CDATA_SECT_OPEN 8
#define XML_TOK_ENTITY_REF 9
#define XML_TOK_CHAR_REF 10 /* numeric character reference */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_PI 11 /* processing instruction */
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13
#define XML_TOK_BOM 14 /* Byte order mark */
/* The following tokens are returned only by XmlPrologTok */
#define XML_TOK_PROLOG_S 15
#define XML_TOK_DECL_OPEN 16 /* <!foo */
#define XML_TOK_DECL_CLOSE 17 /* > */
#define XML_TOK_NAME 18
#define XML_TOK_NMTOKEN 19
#define XML_TOK_POUND_NAME 20 /* #name */
#define XML_TOK_OR 21 /* | */
#define XML_TOK_PERCENT 22
#define XML_TOK_OPEN_PAREN 23
#define XML_TOK_CLOSE_PAREN 24
#define XML_TOK_OPEN_BRACKET 25
#define XML_TOK_CLOSE_BRACKET 26
#define XML_TOK_LITERAL 27
#define XML_TOK_PARAM_ENTITY_REF 28
#define XML_TOK_INSTANCE_START 29
/* The following occur only in element type declarations */
#define XML_TOK_NAME_QUESTION 30 /* name? */
#define XML_TOK_NAME_ASTERISK 31 /* name* */
#define XML_TOK_NAME_PLUS 32 /* name+ */
#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
#define XML_TOK_COMMA 38
/* The following token is returned only by XmlAttributeValueTok */
#define XML_TOK_ATTRIBUTE_VALUE_S 39
/* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40
/* With namespace processing this is returned by XmlPrologTok for a
name with a colon.
*/
#define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD
#define XML_TOK_IGNORE_SECT 42
#endif /* XML_DTD */
#ifdef XML_DTD
#define XML_N_STATES 4
#else /* not XML_DTD */
#define XML_N_STATES 3
#endif /* not XML_DTD */
#define XML_PROLOG_STATE 0
#define XML_CONTENT_STATE 1
#define XML_CDATA_SECTION_STATE 2
#ifdef XML_DTD
#define XML_IGNORE_SECTION_STATE 3
#endif /* XML_DTD */
#define XML_N_LITERAL_TYPES 2
#define XML_ATTRIBUTE_VALUE_LITERAL 0
#define XML_ENTITY_VALUE_LITERAL 1
/* The size of the buffer passed to XmlUtf8Encode must be at least this. */
#define XML_UTF8_ENCODE_MAX 4
/* The size of the buffer passed to XmlUtf16Encode must be at least this. */
#define XML_UTF16_ENCODE_MAX 2
typedef struct position {
/* first line and first column are 0 not 1 */
XML_Size lineNumber;
XML_Size columnNumber;
} POSITION;
typedef struct {
const char *name;
const char *valuePtr;
const char *valueEnd;
char normalized;
} ATTRIBUTE;
struct encoding;
typedef struct encoding ENCODING;
typedef int (PTRCALL *SCANNER)(const ENCODING *,
const char *,
const char *,
const char **);
enum XML_Convert_Result {
XML_CONVERT_COMPLETED = 0,
XML_CONVERT_INPUT_INCOMPLETE = 1,
XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
};
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
int (PTRCALL *sameName)(const ENCODING *,
const char *,
const char *);
int (PTRCALL *nameMatchesAscii)(const ENCODING *,
const char *,
const char *,
const char *);
int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
int (PTRCALL *getAtts)(const ENCODING *enc,
const char *ptr,
int attsMax,
ATTRIBUTE *atts);
int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
int (PTRCALL *predefinedEntityName)(const ENCODING *,
const char *,
const char *);
void (PTRCALL *updatePosition)(const ENCODING *,
const char *ptr,
const char *end,
POSITION *);
int (PTRCALL *isPublicId)(const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr);
enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
char **toP,
const char *toLim);
enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,
const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
};
/* Scan the string starting at ptr until the end of the next complete
token, but do not scan past eptr. Return an integer giving the
type of token.
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
Return XML_TOK_PARTIAL when the string does not contain a complete
token; nextTokPtr will not be set.
Return XML_TOK_INVALID when the string does not start a valid
token; nextTokPtr will be set to point to the character which made
the token invalid.
Otherwise the string starts with a valid token; nextTokPtr will be
set to point to the character following the end of that token.
Each data character counts as a single token, but adjacent data
characters may be returned together. Similarly for characters in
the prolog outside literals, comments and processing instructions.
*/
#define XmlTok(enc, state, ptr, end, nextTokPtr) \
(((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
#define XmlPrologTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
#define XmlContentTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
#ifdef XML_DTD
#define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr)
#endif /* XML_DTD */
/* This is used for performing a 2nd-level tokenization on the content
of a literal that has already been returned by XmlTok.
*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2))
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \
(((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
#define XmlNameLength(enc, ptr) \
(((enc)->nameLength)(enc, ptr))
#define XmlSkipS(enc, ptr) \
(((enc)->skipS)(enc, ptr))
#define XmlGetAttributes(enc, ptr, attsMax, atts) \
(((enc)->getAtts)(enc, ptr, attsMax, atts))
#define XmlCharRefNumber(enc, ptr) \
(((enc)->charRefNumber)(enc, ptr))
#define XmlPredefinedEntityName(enc, ptr, end) \
(((enc)->predefinedEntityName)(enc, ptr, end))
#define XmlUpdatePosition(enc, ptr, end, pos) \
(((enc)->updatePosition)(enc, ptr, end, pos))
#define XmlIsPublicId(enc, ptr, end, badPtr) \
(((enc)->isPublicId)(enc, ptr, end, badPtr))
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
typedef struct {
ENCODING initEnc;
const ENCODING **encPtr;
} INIT_ENCODING;
int XmlParseXmlDecl(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void);
const ENCODING *XmlGetUtf16InternalEncoding(void);
int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void);
typedef int (XMLCALL *CONVERTER) (void *userData, const char *p);
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
void *userData);
#ifdef __cplusplus
}
#endif
#endif /* not XmlTok_INCLUDED */

View File

@ -1,46 +0,0 @@
/*
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
enum {
BT_NONXML,
BT_MALFORM,
BT_LT,
BT_AMP,
BT_RSQB,
BT_LEAD2,
BT_LEAD3,
BT_LEAD4,
BT_TRAIL,
BT_CR,
BT_LF,
BT_GT,
BT_QUOT,
BT_APOS,
BT_EQUALS,
BT_QUEST,
BT_EXCL,
BT_SOL,
BT_SEMI,
BT_NUM,
BT_LSQB,
BT_S,
BT_NMSTRT,
BT_COLON,
BT_HEX,
BT_DIGIT,
BT_NAME,
BT_MINUS,
BT_OTHER, /* known not to be a name or name start character */
BT_NONASCII, /* might be a name or name start character */
BT_PERCNT,
BT_LPAR,
BT_RPAR,
BT_AST,
BT_PLUS,
BT_COMMA,
BT_VERBAR
};
#include <stddef.h>

File diff suppressed because it is too large Load Diff

View File

@ -1,115 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_NS_C
const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void)
{
return &ns(internal_utf8_encoding).enc;
}
const ENCODING *
NS(XmlGetUtf16InternalEncoding)(void)
{
#if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc;
#elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc;
#else
const short n = 1;
return (*(const char *)&n
? &ns(internal_little2_encoding).enc
: &ns(internal_big2_encoding).enc);
#endif
}
static const ENCODING * const NS(encodings)[] = {
&ns(latin1_encoding).enc,
&ns(ascii_encoding).enc,
&ns(utf8_encoding).enc,
&ns(big2_encoding).enc,
&ns(big2_encoding).enc,
&ns(little2_encoding).enc,
&ns(utf8_encoding).enc /* NO_ENC */
};
static int PTRCALL
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_PROLOG_STATE, ptr, end, nextTokPtr);
}
static int PTRCALL
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_CONTENT_STATE, ptr, end, nextTokPtr);
}
int
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
const char *name)
{
int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC)
return 0;
SET_INIT_ENC_INDEX(p, i);
p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
p->initEnc.updatePosition = initUpdatePosition;
p->encPtr = encPtr;
*encPtr = &(p->initEnc);
return 1;
}
static const ENCODING *
NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
{
#define ENCODING_MAX 128
char buf[ENCODING_MAX];
char *p = buf;
int i;
XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
if (ptr != end)
return 0;
*p = 0;
if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
return enc;
i = getEncodingIndex(buf);
if (i == UNKNOWN_ENC)
return 0;
return NS(encodings)[i];
}
int
NS(XmlParseXmlDecl)(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingName,
const ENCODING **encoding,
int *standalone)
{
return doParseXmlDecl(NS(findEncoding),
isGeneralTextEntity,
enc,
ptr,
end,
badPtr,
versionPtr,
versionEndPtr,
encodingName,
encoding,
standalone);
}
#endif /* XML_TOK_NS_C */

View File

@ -4,7 +4,11 @@ find_package(OpenGL QUIET REQUIRED)
prusaslicer_add_cmake_project(
GLEW
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/glew
URL https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip
URL_HASH SHA256=2700383d4de2455f06114fbaf872684f15529d4bdc5cdea69b5fb0e9aa7763f1
SOURCE_SUBDIR build/cmake
CMAKE_ARGS
-DBUILD_UTILS=OFF
)
if (MSVC)

View File

@ -1,33 +0,0 @@
cmake_minimum_required(VERSION 3.0)
project(GLEW)
find_package(OpenGL REQUIRED)
add_library(glew src/glew.c)
target_include_directories(glew PRIVATE include/)
target_link_libraries(glew PUBLIC OpenGL::GL)
if (NOT BUILD_SHARED_LIBS)
target_compile_definitions(glew PUBLIC GLEW_STATIC)
endif ()
include(GNUInstallDirs)
install(
FILES
${PROJECT_SOURCE_DIR}/include/GL/glew.h
${PROJECT_SOURCE_DIR}/include/GL/wglew.h
${PROJECT_SOURCE_DIR}/include/GL/glxew.h
DESTINATION
${CMAKE_INSTALL_INCLUDEDIR}/GL
)
add_library(GLEW INTERFACE)
target_link_libraries(GLEW INTERFACE glew)
install(TARGETS glew GLEW
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

View File

@ -1,73 +0,0 @@
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 Brian Paul 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 and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BRIAN PAUL 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.
Copyright (c) 2007 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

View File

@ -1,196 +0,0 @@
THIS IS NOT THE COMPLETE GLEW DISTRIBUTION. ONLY FILES NEEDED FOR COMPILING GLEW INTO SLIC3R WERE PUT INTO THE SLIC3R SOURCE DISTRIBUTION.
A CMAKE CONFIG EXPORT IS ADDED TO ENABLE FIND PACKAGE TO FIND DEBUG BUILD ON MSVC
# GLEW - The OpenGL Extension Wrangler Library
![](http://glew.sourceforge.net/glew.png)
http://glew.sourceforge.net/
https://github.com/nigels-com/glew
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
## Downloads
Current release is [2.0.0](https://sourceforge.net/projects/glew/files/glew/2.0.0/).
[(Change Log)](http://glew.sourceforge.net/log.html)
Sources available as
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.zip/download) or
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz/download).
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0-win32.zip/download).
### Recent snapshots
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
[glew-20160708.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160708.tgz/download)
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
[glew-20160402.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160402.tgz/download)
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
## Build
From a downloaded tarball or zip archive:
### Linux and Mac
#### Using GNU Make
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev git`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git`
##### Build
$ make
$ sudo make install
$ make clean
Targets: `all, glew.lib, glew.bin, clean, install, uninstall`
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
#### Using cmake
*CMake 2.8.12 or higher is required.*
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev git cmake`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git cmake`
##### Build
$ cd build
$ cmake ./cmake
$ make -j4
| Target | Description |
| ---------- | ----------- |
| glew | Build the glew shared library. |
| glew_s | Build the glew static library. |
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
| clean | Clean up build artifacts. |
| all | Build all enabled targets (default target). |
| Variables | Description |
| --------------- | ----------- |
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
| GLEW_REGAL | Build in Regal mode. |
| GLEW_OSMESA | Build in off-screen Mesa mode. |
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
### Windows
#### Visual Studio
Use the provided Visual Studio project file in build/vc12/
Projects for vc6 and vc10 are also provided
#### MSYS/Mingw
Available from [Mingw](http://www.mingw.org/)
Requirements: bash, make, gcc
$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all
Alternative toolchain: `SYSTEM=mingw-win32`
#### MSYS2/Mingw-w64
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
Requirements: bash, make, gcc
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
$ make
$ make install
$ make install.all
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
## glewinfo
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
OpenGL implementation and GLEW support for that. Please include the output of
`glewinfo` with bug reports, as appropriate.
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
GL_VERSION_1_1: OK
---------------
GL_VERSION_1_2: OK
---------------
glCopyTexSubImage3D: OK
glDrawRangeElements: OK
glTexImage3D: OK
glTexSubImage3D: OK
...
## Code Generation
A Unix or Mac environment is neded for building GLEW from scratch to
include new extensions, or customize the code generation. The extension
data is regenerated from the top level source directory with:
make extensions
An alternative to generating the GLEW sources from scratch is to
download a pre-generated (unsupported) snapshot:
https://sourceforge.net/projects/glew/files/glew/snapshots/
Travis-built snapshots are also available:
https://glew.s3.amazonaws.com/index.html
## Authors
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
with bug fixes, new OpenGL extension support and new releases.
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
assisted with the design and debugging process.
The acronym GLEW originates from Aaron Lefohn.
Pasi K&auml;rkk&auml;inen identified and fixed several problems with
GLX and SDL. Nate Robins created the `wglinfo` utility, to
which modifications were made by Michael Wimmer.
## Copyright and Licensing
GLEW is originally derived from the EXTGL project by Lev Povalahev.
The source code is licensed under the
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
The automatic code generation scripts are released under the
[GNU GPL](http://glew.sourceforge.net/gpl.txt).

View File

@ -1 +0,0 @@
1.13.0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

18614
deps/GLEW/glew/src/glew.c vendored

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ endif()
find_package(OpenGL REQUIRED)
set(GLEW_VERBOSE ON)
find_package(GLEW 1.13.0 REQUIRED)
find_package(GLEW REQUIRED)
set(_srcfiles
src/area.cpp

View File

@ -7,8 +7,9 @@ else()
endif()
prusaslicer_add_cmake_project(OpenVDB
URL https://github.com/tamasmeszaros/openvdb/archive/refs/tags/v6.2.1-prusa3d.zip #v6.2.1 patched
URL_HASH SHA256=caf9f0c91976722883ff9cb32420ef142af22f7e625fc643b91c23d6e4172f62
# 8.2 patched
URL https://github.com/tamasmeszaros/openvdb/archive/a68fd58d0e2b85f01adeb8b13d7555183ab10aa5.zip
URL_HASH SHA256=f353e7b99bd0cbfc27ac9082de51acf32a8bc0b3e21ff9661ecca6f205ec1d81
DEPENDS dep_TBB dep_Blosc dep_OpenEXR dep_Boost
CMAKE_ARGS
-DCMAKE_POSITION_INDEPENDENT_CODE=ON

7
deps/TBB/TBB.cmake vendored
View File

@ -1,11 +1,10 @@
prusaslicer_add_cmake_project(
TBB
URL "https://github.com/wjakob/tbb/archive/a0dc9bf76d0120f917b641ed095360448cabc85b.tar.gz"
URL_HASH SHA256=0545cb6033bd1873fcae3ea304def720a380a88292726943ae3b9b207f322efe
URL "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.5.0.zip"
URL_HASH SHA256=83ea786c964a384dd72534f9854b419716f412f9d43c0be88d41874763e7bb47
CMAKE_ARGS
-DTBB_BUILD_SHARED=OFF
-DTBB_BUILD_TESTS=OFF
-DTBB_BUILD_TESTS=OFF
-DTBB_TEST=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCMAKE_DEBUG_POSTFIX=_debug
)

View File

@ -1,3 +1,6 @@
min_slic3r_version = 2.4.1-beta3
0.0.5 Correct Marlin Error accumulation for Ditto printer profiles.
0.0.4 Correct Marlin Error accumulation
min_slic3r_version = 2.3.0-beta2
0.0.3 Removed obsolete host keys.
min_slic3r_version = 2.2.0-alpha3

View File

@ -5,7 +5,7 @@
name = BIBO
# Configuration version of this file. Config file will only be installed, if the config_version differs.
# This means, the server may force the PrusaSlicer configuration to be downgraded.
config_version = 0.0.3
config_version = 0.0.5
# Where to get the updates from?
config_update_url = https://files.prusa3d.com/wp-content/uploads/repository/PrusaSlicer-settings-master/live/BIBO/
@ -694,7 +694,7 @@ cooling = 1
[printer:*common*]
printer_technology = FFF
bed_shape = -107x-93,107x-93,107x93,-107x93
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\n\n
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n
between_objects_gcode =
deretract_speed = 0 # By setting this value to 0 deretract used the retract_speed
extruder_colour = #FFFF00
@ -837,7 +837,7 @@ printer_notes = Do not remove the following keywords! These keywords are used in
bed_shape = 0x-93,33x-93,33x93,0x93
#bed_model = BIBO2_bed.stl
#bed_texture = BIBO2.svg
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T1 ; set 2nd nozzle heater to print temperature\n
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T1 ; set 2nd nozzle heater to print temperature\nG92 E0\n
start_gcode = ;Start code PrusaSlicer BIBO 2 printers E1 only (i.e. T0)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM190 S{first_layer_bed_temperature[0] - 5} ; wait for bed temp\nM140 S{first_layer_bed_temperature[0]} ; continue bed heating to full temp while other things are happening\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to first layer temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to same first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; wait for 1st nozzle heat to first layer temperature\nM109 S{first_layer_temperature[0]} T1 ; wait for 2nd nozzle heat to same first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Y0 F1200 E0 ; move Y to min endstop and extrude 0 filament\nT[initial_tool] ; switch to initial tool position\nG92 E0.0 ; reset extruder\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nM117 Cleaning... ; Put Cleaning message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder and zero the current extruder coordinate before printing\nM117 BIBO E1 now Printing... ; Put now printing message on screen
end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM420 S0 ; Turn off Ditto Printing function\nM117 BIBO Print complete ; Put print complete message on screen
@ -848,6 +848,6 @@ printer_notes = Do not remove the following keywords! These keywords are used in
bed_shape = -33x-93,0x-93,0x93,-33x93
#bed_model = BIBO2_bed.stl
#bed_texture = BIBO2.svg
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T0 ; set 1st nozzle heater to print temperature\n
before_layer_gcode = ;BEFORE_LAYER_CHANGE\n;[layer_z]\nM104 S{temperature[0]} T0 ; set 1st nozzle heater to print temperature\nG92 E0\n
start_gcode = ;Start code PrusaSlicer BIBO 2 printers E2 only (i.e. T1)\nM420 S1 ; Turn on Ditto Printing\nG21 ; set units to metric\nG90 ; absolute positioning\nM107 ; start with the fan off\nM140 S{first_layer_bed_temperature[0] - 5} ; set bed temp\nM105 ; Report Temperatures\nM190 S{first_layer_bed_temperature[0]} ; wait for bed temp\nM104 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto print temperature\nM104 S{first_layer_temperature[0]} T1 ; set 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nM109 S{first_layer_temperature[0]} T0 ; set 1st nozzle heater to ditto printing temperature\nM109 S{first_layer_temperature[0]} T1 ; Wait for 2nd nozzle heater to first layer temperature\nM105 ; Report Temperatures\nG28 X0 Y0 ; move X/Y to min endstops\nG28 Z0 ; move Z to min endstops\nG1 Z2 F400 ; move the print bed down 2mm\nT0 ; switch to tool position T0\nG90 ; absolute positioning\nG92 E0.0 ; zero the current extruder coordinate\nG28 ; Home all axis\nG1 Y0 F1200 E0 ; move Y to min endstop and reset extruder\nG92 E0.0 ; zero the current extruder coordinate\nT1 ; switch to tool position T1\nG92 E0.0 ; zero the current extruder coordinate\nM117 E2 nozzle wipe... ; Put Nozzle wipe message on screen, Attempt Nozzle Wipe (for ooze free startup)\nG1 X-15.0 Y-92.9 Z0.3 F2400.0 ; move to start-line position\nG1 X15.0 Y-92.9 Z0.3 F1000.0 E2 ; draw 1st line\nG1 X15.0 Y-92.6 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92.6 Z0.3 F1000.0 E4 ; draw 2nd line\nG1 X-15.0 Y-92.3 Z0.3 F3000.0 ; move to side a little\nG1 X15.0 Y-92.3 Z0.3 F1000.0 E6 ; draw 3rd line\nG1 X15.0 Y-92 Z0.3 F3000.0 ; move to side a little\nG1 X-15.0 Y-92 Z0.3 F1000.0 E8 ; draw 4th line\nG92 E0.0 ; reset extruder coordinate to zero before printing\nM117 BIBO Now Printing from E2... ; Put now printing message on screen
end_gcode = ;BIBO End GCode\nM107 ; turn fans off\nG91 ; Relative positioning\nG1 Z1 F100\nM140 S0 ; Disable heated bed\nM104 T0 S0 ; extruder T0 heater off\nM104 T1 S0 ; extruder T1 heater off\nG1 Z+0.5 X-20 Y-20 F300 ; move Z down then move print head a bit out of the way\nG28 X0 Y0 ; move X/Y to min endstops, so the head is out of the way\nG90 ; Absolute positioning\nG92 E0.0 ; Reset extruder position\nM84 ; Turn steppers off\nM420 S0 ; Turn off Ditto Printing function\nM117 BIBO Print complete ; Put print complete message on screen

View File

@ -30,5 +30,7 @@ vec4 non_svg_color()
void main()
{
gl_FragColor = svg_source ? svg_color() : non_svg_color();
vec4 color = svg_source ? svg_color() : non_svg_color();
color.a = transparent_background ? color.a * 0.5 : color.a;
gl_FragColor = color;
}

View File

@ -31,5 +31,7 @@ vec4 non_svg_color()
void main()
{
frag_color = svg_source ? svg_color() : non_svg_color();
vec4 color = svg_source ? svg_color() : non_svg_color();
color.a = transparent_background ? color.a * 0.5 : color.a;
frag_color = color;
}

View File

@ -30,5 +30,7 @@ vec4 non_svg_color()
void main()
{
gl_FragColor = svg_source ? svg_color() : non_svg_color();
vec4 color = svg_source ? svg_color() : non_svg_color();
color.a = transparent_background ? color.a * 0.5 : color.a;
gl_FragColor = color;
}

View File

@ -9,7 +9,6 @@ add_subdirectory(boost)
add_subdirectory(clipper)
add_subdirectory(miniz)
add_subdirectory(glu-libtess)
add_subdirectory(qhull)
add_subdirectory(Shiny)
add_subdirectory(semver)
add_subdirectory(libigl)
@ -19,6 +18,16 @@ add_subdirectory(qoi)
# Adding libnest2d project for bin packing...
add_subdirectory(libnest2d)
find_package(Qhull 7.2 REQUIRED)
add_library(qhull INTERFACE)
if(SLIC3R_STATIC)
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhullstatic_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhullstatic_r)
else()
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhull_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhull_r)
endif()
add_subdirectory(libslic3r)
if (SLIC3R_GUI)
@ -83,7 +92,7 @@ if (SLIC3R_GUI)
string(REGEX MATCH "wxexpat" WX_EXPAT_BUILTIN ${wxWidgets_LIBRARIES})
if (EXPAT_FOUND AND NOT WX_EXPAT_BUILTIN)
list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX expat)
list(APPEND wxWidgets_LIBRARIES ${EXPAT_LIBRARIES})
list(APPEND wxWidgets_LIBRARIES EXPAT::EXPAT)
endif ()
# This is an issue in the new wxWidgets cmake build, doesn't deal with librt

View File

@ -1,21 +0,0 @@
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
Copyright (c) 2001-2016 Expat maintainers
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,146 +0,0 @@
Expat, Release 2.2.0, stripped and modified for inclusion into Slic3r.
Only the library sources needed for static linking were left.
The original README follows:
---------------------------------------------------------------------
Expat, Release 2.2.0
This is Expat, a C library for parsing XML, written by James Clark.
Expat is a stream-oriented XML parser. This means that you register
handlers with the parser before starting the parse. These handlers
are called when the parser discovers the associated structures in the
document being parsed. A start tag is an example of the kind of
structures for which you may register handlers.
Windows users should use the expat_win32bin package, which includes
both precompiled libraries and executables, and source code for
developers.
Expat is free software. You may copy, distribute, and modify it under
the terms of the License contained in the file COPYING distributed
with this package. This license is the same as the MIT/X Consortium
license.
Versions of Expat that have an odd minor version (the middle number in
the release above), are development releases and should be considered
as beta software. Releases with even minor version numbers are
intended to be production grade software.
If you are building Expat from a check-out from the CVS repository,
you need to run a script that generates the configure script using the
GNU autoconf and libtool tools. To do this, you need to have
autoconf 2.58 or newer. Run the script like this:
./buildconf.sh
Once this has been done, follow the same instructions as for building
from a source distribution.
To build Expat from a source distribution, you first run the
configuration shell script in the top level distribution directory:
./configure
There are many options which you may provide to configure (which you
can discover by running configure with the --help option). But the
one of most interest is the one that sets the installation directory.
By default, the configure script will set things up to install
libexpat into /usr/local/lib, expat.h into /usr/local/include, and
xmlwf into /usr/local/bin. If, for example, you'd prefer to install
into /home/me/mystuff/lib, /home/me/mystuff/include, and
/home/me/mystuff/bin, you can tell configure about that with:
./configure --prefix=/home/me/mystuff
Another interesting option is to enable 64-bit integer support for
line and column numbers and the over-all byte index:
./configure CPPFLAGS=-DXML_LARGE_SIZE
However, such a modification would be a breaking change to the ABI
and is therefore not recommended for general use - e.g. as part of
a Linux distribution - but rather for builds with special requirements.
After running the configure script, the "make" command will build
things and "make install" will install things into their proper
location. Have a look at the "Makefile" to learn about additional
"make" options. Note that you need to have write permission into
the directories into which things will be installed.
If you are interested in building Expat to provide document
information in UTF-16 encoding rather than the default UTF-8, follow
these instructions (after having run "make distclean"):
1. For UTF-16 output as unsigned short (and version/error
strings as char), run:
./configure CPPFLAGS=-DXML_UNICODE
For UTF-16 output as wchar_t (incl. version/error strings),
run:
./configure CFLAGS="-g -O2 -fshort-wchar" \
CPPFLAGS=-DXML_UNICODE_WCHAR_T
2. Edit the MakeFile, changing:
LIBRARY = libexpat.la
to:
LIBRARY = libexpatw.la
(Note the additional "w" in the library name.)
3. Run "make buildlib" (which builds the library only).
Or, to save step 2, run "make buildlib LIBRARY=libexpatw.la".
4. Run "make installlib" (which installs the library only).
Or, if step 2 was omitted, run "make installlib LIBRARY=libexpatw.la".
Using DESTDIR or INSTALL_ROOT is enabled, with INSTALL_ROOT being the default
value for DESTDIR, and the rest of the make file using only DESTDIR.
It works as follows:
$ make install DESTDIR=/path/to/image
overrides the in-makefile set DESTDIR, while both
$ INSTALL_ROOT=/path/to/image make install
$ make install INSTALL_ROOT=/path/to/image
use DESTDIR=$(INSTALL_ROOT), even if DESTDIR eventually is defined in the
environment, because variable-setting priority is
1) commandline
2) in-makefile
3) environment
Note: This only applies to the Expat library itself, building UTF-16 versions
of xmlwf and the tests is currently not supported.
Note for Solaris users: The "ar" command is usually located in
"/usr/ccs/bin", which is not in the default PATH. You will need to
add this to your path for the "make" command, and probably also switch
to GNU make (the "make" found in /usr/ccs/bin does not seem to work
properly -- apparently it does not understand .PHONY directives). If
you're using ksh or bash, use this command to build:
PATH=/usr/ccs/bin:$PATH make
When using Expat with a project using autoconf for configuration, you
can use the probing macro in conftools/expat.m4 to determine how to
include Expat. See the comments at the top of that file for more
information.
A reference manual is available in the file doc/reference.html in this
distribution.
The homepage for this project is http://www.libexpat.org/. There
are links there to connect you to the bug reports page. If you need
to report a bug when you don't have access to a browser, you may also
send a bug report by email to expat-bugs@mail.libexpat.org.
Discussion related to the direction of future expat development takes
place on expat-discuss@mail.libexpat.org. Archives of this list and
other Expat-related lists may be found at:
http://mail.libexpat.org/mailman/listinfo/

View File

@ -1,92 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#define ASCII_A 0x41
#define ASCII_B 0x42
#define ASCII_C 0x43
#define ASCII_D 0x44
#define ASCII_E 0x45
#define ASCII_F 0x46
#define ASCII_G 0x47
#define ASCII_H 0x48
#define ASCII_I 0x49
#define ASCII_J 0x4A
#define ASCII_K 0x4B
#define ASCII_L 0x4C
#define ASCII_M 0x4D
#define ASCII_N 0x4E
#define ASCII_O 0x4F
#define ASCII_P 0x50
#define ASCII_Q 0x51
#define ASCII_R 0x52
#define ASCII_S 0x53
#define ASCII_T 0x54
#define ASCII_U 0x55
#define ASCII_V 0x56
#define ASCII_W 0x57
#define ASCII_X 0x58
#define ASCII_Y 0x59
#define ASCII_Z 0x5A
#define ASCII_a 0x61
#define ASCII_b 0x62
#define ASCII_c 0x63
#define ASCII_d 0x64
#define ASCII_e 0x65
#define ASCII_f 0x66
#define ASCII_g 0x67
#define ASCII_h 0x68
#define ASCII_i 0x69
#define ASCII_j 0x6A
#define ASCII_k 0x6B
#define ASCII_l 0x6C
#define ASCII_m 0x6D
#define ASCII_n 0x6E
#define ASCII_o 0x6F
#define ASCII_p 0x70
#define ASCII_q 0x71
#define ASCII_r 0x72
#define ASCII_s 0x73
#define ASCII_t 0x74
#define ASCII_u 0x75
#define ASCII_v 0x76
#define ASCII_w 0x77
#define ASCII_x 0x78
#define ASCII_y 0x79
#define ASCII_z 0x7A
#define ASCII_0 0x30
#define ASCII_1 0x31
#define ASCII_2 0x32
#define ASCII_3 0x33
#define ASCII_4 0x34
#define ASCII_5 0x35
#define ASCII_6 0x36
#define ASCII_7 0x37
#define ASCII_8 0x38
#define ASCII_9 0x39
#define ASCII_TAB 0x09
#define ASCII_SPACE 0x20
#define ASCII_EXCL 0x21
#define ASCII_QUOT 0x22
#define ASCII_AMP 0x26
#define ASCII_APOS 0x27
#define ASCII_MINUS 0x2D
#define ASCII_PERIOD 0x2E
#define ASCII_COLON 0x3A
#define ASCII_SEMI 0x3B
#define ASCII_LT 0x3C
#define ASCII_EQUALS 0x3D
#define ASCII_GT 0x3E
#define ASCII_LSQB 0x5B
#define ASCII_RSQB 0x5D
#define ASCII_UNDERSCORE 0x5F
#define ASCII_LPAREN 0x28
#define ASCII_RPAREN 0x29
#define ASCII_FF 0x0C
#define ASCII_SLASH 0x2F
#define ASCII_HASH 0x23
#define ASCII_PIPE 0x7C
#define ASCII_COMMA 0x2C

View File

@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +0,0 @@
/*================================================================
** Copyright 2000, Clark Cooper
** All rights reserved.
**
** This is free software. You are permitted to copy, distribute, or modify
** it under the terms of the MIT/X license (contained in the COPYING file
** with this distribution.)
*/
#ifndef EXPATCONFIG_H
#define EXPATCONFIG_H
#include <memory.h>
#include <string.h>
#define XML_NS 1
#define XML_DTD 1
#define XML_CONTEXT_BYTES 1024
/* we will assume all Windows platforms are little endian */
#define BYTEORDER 1234
/* Windows has memmove() available. */
#define HAVE_MEMMOVE
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#else
#endif
#endif /* ifndef EXPATCONFIG_H */

View File

@ -1,129 +0,0 @@
/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1
/* External API definitions */
#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
#define XML_USE_MSC_EXTENSIONS 1
#endif
/* Expat tries very hard to make the API boundary very specifically
defined. There are two macros defined to control this boundary;
each of these can be defined before including this header to
achieve some different behavior, but doing so it not recommended or
tested frequently.
XMLCALL - The calling convention to use for all calls across the
"library boundary." This will default to cdecl, and
try really hard to tell the compiler that's what we
want.
XMLIMPORT - Whatever magic is needed to note that a function is
to be imported from a dynamically loaded library
(.dll, .so, or .sl, depending on your platform).
The XMLCALL macro was added in Expat 1.95.7. The only one which is
expected to be directly useful in client code is XMLCALL.
Note that on at least some Unix versions, the Expat library must be
compiled with the cdecl calling convention as the default since
system headers may assume the cdecl convention.
*/
#ifndef XMLCALL
#if defined(_MSC_VER)
#define XMLCALL __cdecl
#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER)
#define XMLCALL __attribute__((cdecl))
#else
/* For any platform which uses this definition and supports more than
one calling convention, we need to extend this definition to
declare the convention used on that platform, if it's possible to
do so.
If this is the case for your platform, please file a bug report
with information on how to identify your platform via the C
pre-processor and how to specify the same calling convention as the
platform's malloc() implementation.
*/
#define XMLCALL
#endif
#endif /* not defined XMLCALL */
#if !defined(XML_STATIC) && !defined(XMLIMPORT)
#ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
#ifdef XML_USE_MSC_EXTENSIONS
// #define XMLIMPORT __declspec(dllimport)
#endif
#endif
#endif /* not defined XML_STATIC */
#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4)
#define XMLIMPORT __attribute__ ((visibility ("default")))
#endif
/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
#endif
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
#define XML_ATTR_MALLOC __attribute__((__malloc__))
#else
#define XML_ATTR_MALLOC
#endif
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
#else
#define XML_ATTR_ALLOC_SIZE(x)
#endif
#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
#ifdef __cplusplus
extern "C" {
#endif
#ifdef XML_UNICODE_WCHAR_T
#define XML_UNICODE
#endif
#ifdef XML_UNICODE /* Information is UTF-16 encoded. */
#ifdef XML_UNICODE_WCHAR_T
typedef wchar_t XML_Char;
typedef wchar_t XML_LChar;
#else
typedef unsigned short XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE_WCHAR_T */
#else /* Information is UTF-8 encoded. */
typedef char XML_Char;
typedef char XML_LChar;
#endif /* XML_UNICODE */
#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */
#ifdef __cplusplus
}
#endif
#endif /* not Expat_External_INCLUDED */

View File

@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,

View File

@ -1,95 +0,0 @@
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following calling convention macros are defined for frequently
called functions:
FASTCALL - Used for those internal functions that have a simple
body and a low number of arguments and local variables.
PTRCALL - Used for functions called though function pointers.
PTRFASTCALL - Like PTRCALL, but for low number of arguments.
inline - Used for selected internal functions for which inlining
may improve performance on some platforms.
Note: Use of these macros is based on judgement, not hard rules,
and therefore subject to change.
*/
#if defined(__GNUC__) && defined(__i386__) && !defined(__MINGW32__)
/* We'll use this version by default only where we know it helps.
regparm() generates warnings on Solaris boxes. See SF bug #692878.
Instability reported with egcs on a RedHat Linux 7.3.
Let's comment out:
#define FASTCALL __attribute__((stdcall, regparm(3)))
and let's try this:
*/
#define FASTCALL __attribute__((regparm(3)))
#define PTRFASTCALL __attribute__((regparm(3)))
#endif
/* Using __fastcall seems to have an unexpected negative effect under
MS VC++, especially for function pointers, so we won't use it for
now on that platform. It may be reconsidered for a future release
if it can be made more effective.
Likely reason: __fastcall on Windows is like stdcall, therefore
the compiler cannot perform stack optimizations for call clusters.
*/
/* Make sure all of these are defined if they aren't already. */
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef PTRCALL
#define PTRCALL
#endif
#ifndef PTRFASTCALL
#define PTRFASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
#ifndef UNUSED_P
# ifdef __GNUC__
# define UNUSED_P(p) UNUSED_ ## p __attribute__((__unused__))
# else
# define UNUSED_P(p) UNUSED_ ## p
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
void
align_limit_to_full_utf8_characters(const char * from, const char ** fromLimRef);
#ifdef __cplusplus
}
#endif

View File

@ -1,36 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,

View File

@ -1,150 +0,0 @@
static const unsigned namingBitmap[] = {
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x00000000, 0x04000000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00000000, 0xFF7FFFFF, 0xFF7FFFFF,
0xFFFFFFFF, 0x7FF3FFFF, 0xFFFFFDFE, 0x7FFFFFFF,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFE00F, 0xFC31FFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00000003, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFD740, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF0003, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0x0000007F, 0x00000000, 0xFFFF0000, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x000007FE, 0xFFFE0000,
0xFFFFFFFF, 0x7CFFFFFF, 0x002F7FFF, 0x00000060,
0xFFFFFFE0, 0x23FFFFFF, 0xFF000000, 0x00000003,
0xFFF99FE0, 0x03C5FDFF, 0xB0000000, 0x00030003,
0xFFF987E0, 0x036DFDFF, 0x5E000000, 0x001C0000,
0xFFFBAFE0, 0x23EDFDFF, 0x00000000, 0x00000001,
0xFFF99FE0, 0x23CDFDFF, 0xB0000000, 0x00000003,
0xD63DC7E0, 0x03BFC718, 0x00000000, 0x00000000,
0xFFFDDFE0, 0x03EFFDFF, 0x00000000, 0x00000003,
0xFFFDDFE0, 0x03EFFDFF, 0x40000000, 0x00000003,
0xFFFDDFE0, 0x03FFFDFF, 0x00000000, 0x00000003,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x000D7FFF, 0x0000003F, 0x00000000,
0xFEF02596, 0x200D6CAE, 0x0000001F, 0x00000000,
0x00000000, 0x00000000, 0xFFFFFEFF, 0x000003FF,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0xFFFFFFFF, 0xFFFF003F, 0x007FFFFF,
0x0007DAED, 0x50000000, 0x82315001, 0x002C62AB,
0x40000000, 0xF580C900, 0x00000007, 0x02010800,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0x0FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF,
0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
0x00000000, 0x00004C40, 0x00000000, 0x00000000,
0x00000007, 0x00000000, 0x00000000, 0x00000000,
0x00000080, 0x000003FE, 0xFFFFFFFE, 0xFFFFFFFF,
0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x07FFFFFF,
0xFFFFFFE0, 0x00001FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
0xFFFFFFFF, 0x0000000F, 0x00000000, 0x00000000,
0x00000000, 0x07FF6000, 0x87FFFFFE, 0x07FFFFFE,
0x00000000, 0x00800000, 0xFF7FFFFF, 0xFF7FFFFF,
0x00FFFFFF, 0x00000000, 0xFFFF0000, 0xFFFFFFFF,
0xFFFFFFFF, 0xF80001FF, 0x00030003, 0x00000000,
0xFFFFFFFF, 0xFFFFFFFF, 0x0000003F, 0x00000003,
0xFFFFD7C0, 0xFFFFFFFB, 0x547F7FFF, 0x000FFFFD,
0xFFFFDFFE, 0xFFFFFFFF, 0xDFFEFFFF, 0xFFFFFFFF,
0xFFFF007B, 0xFFFFFFFF, 0xFFFF199F, 0x033FCFFF,
0x00000000, 0xFFFE0000, 0x027FFFFF, 0xFFFFFFFE,
0xFFFE007F, 0xBBFFFFFB, 0xFFFF0016, 0x000707FF,
0x00000000, 0x07FFFFFE, 0x0007FFFF, 0xFFFF03FF,
0xFFFFFFFF, 0x7CFFFFFF, 0xFFEF7FFF, 0x03FF3DFF,
0xFFFFFFEE, 0xF3FFFFFF, 0xFF1E3FFF, 0x0000FFCF,
0xFFF99FEE, 0xD3C5FDFF, 0xB080399F, 0x0003FFCF,
0xFFF987E4, 0xD36DFDFF, 0x5E003987, 0x001FFFC0,
0xFFFBAFEE, 0xF3EDFDFF, 0x00003BBF, 0x0000FFC1,
0xFFF99FEE, 0xF3CDFDFF, 0xB0C0398F, 0x0000FFC3,
0xD63DC7EC, 0xC3BFC718, 0x00803DC7, 0x0000FF80,
0xFFFDDFEE, 0xC3EFFDFF, 0x00603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3EFFDFF, 0x40603DDF, 0x0000FFC3,
0xFFFDDFEC, 0xC3FFFDFF, 0x00803DCF, 0x0000FFC3,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xFFFFFFFE, 0x07FF7FFF, 0x03FF7FFF, 0x00000000,
0xFEF02596, 0x3BFF6CAE, 0x03FF3F5F, 0x00000000,
0x03000000, 0xC2A003FF, 0xFFFFFEFF, 0xFFFE03FF,
0xFEBF0FDF, 0x02FE3FFF, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x1FFF0000, 0x00000002,
0x000000A0, 0x003EFFFE, 0xFFFFFFFE, 0xFFFFFFFF,
0x661FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0x77FFFFFF,
};
static const unsigned char nmstrtPages[] = {
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x00,
0x00, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x15, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
static const unsigned char namePages[] = {
0x19, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x00,
0x00, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
0x10, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x13,
0x26, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x27, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x17,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

View File

@ -1,37 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,114 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlRole_INCLUDED
#define XmlRole_INCLUDED 1
#ifdef __VMS
/* 0 1 2 3 0 1 2 3
1234567890123456789012345678901 1234567890123456789012345678901 */
#define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
#endif
#include "xmltok.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
XML_ROLE_ERROR = -1,
XML_ROLE_NONE = 0,
XML_ROLE_XML_DECL,
XML_ROLE_INSTANCE_START,
XML_ROLE_DOCTYPE_NONE,
XML_ROLE_DOCTYPE_NAME,
XML_ROLE_DOCTYPE_SYSTEM_ID,
XML_ROLE_DOCTYPE_PUBLIC_ID,
XML_ROLE_DOCTYPE_INTERNAL_SUBSET,
XML_ROLE_DOCTYPE_CLOSE,
XML_ROLE_GENERAL_ENTITY_NAME,
XML_ROLE_PARAM_ENTITY_NAME,
XML_ROLE_ENTITY_NONE,
XML_ROLE_ENTITY_VALUE,
XML_ROLE_ENTITY_SYSTEM_ID,
XML_ROLE_ENTITY_PUBLIC_ID,
XML_ROLE_ENTITY_COMPLETE,
XML_ROLE_ENTITY_NOTATION_NAME,
XML_ROLE_NOTATION_NONE,
XML_ROLE_NOTATION_NAME,
XML_ROLE_NOTATION_SYSTEM_ID,
XML_ROLE_NOTATION_NO_SYSTEM_ID,
XML_ROLE_NOTATION_PUBLIC_ID,
XML_ROLE_ATTRIBUTE_NAME,
XML_ROLE_ATTRIBUTE_TYPE_CDATA,
XML_ROLE_ATTRIBUTE_TYPE_ID,
XML_ROLE_ATTRIBUTE_TYPE_IDREF,
XML_ROLE_ATTRIBUTE_TYPE_IDREFS,
XML_ROLE_ATTRIBUTE_TYPE_ENTITY,
XML_ROLE_ATTRIBUTE_TYPE_ENTITIES,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN,
XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS,
XML_ROLE_ATTRIBUTE_ENUM_VALUE,
XML_ROLE_ATTRIBUTE_NOTATION_VALUE,
XML_ROLE_ATTLIST_NONE,
XML_ROLE_ATTLIST_ELEMENT_NAME,
XML_ROLE_IMPLIED_ATTRIBUTE_VALUE,
XML_ROLE_REQUIRED_ATTRIBUTE_VALUE,
XML_ROLE_DEFAULT_ATTRIBUTE_VALUE,
XML_ROLE_FIXED_ATTRIBUTE_VALUE,
XML_ROLE_ELEMENT_NONE,
XML_ROLE_ELEMENT_NAME,
XML_ROLE_CONTENT_ANY,
XML_ROLE_CONTENT_EMPTY,
XML_ROLE_CONTENT_PCDATA,
XML_ROLE_GROUP_OPEN,
XML_ROLE_GROUP_CLOSE,
XML_ROLE_GROUP_CLOSE_REP,
XML_ROLE_GROUP_CLOSE_OPT,
XML_ROLE_GROUP_CLOSE_PLUS,
XML_ROLE_GROUP_CHOICE,
XML_ROLE_GROUP_SEQUENCE,
XML_ROLE_CONTENT_ELEMENT,
XML_ROLE_CONTENT_ELEMENT_REP,
XML_ROLE_CONTENT_ELEMENT_OPT,
XML_ROLE_CONTENT_ELEMENT_PLUS,
XML_ROLE_PI,
XML_ROLE_COMMENT,
#ifdef XML_DTD
XML_ROLE_TEXT_DECL,
XML_ROLE_IGNORE_SECT,
XML_ROLE_INNER_PARAM_ENTITY_REF,
#endif /* XML_DTD */
XML_ROLE_PARAM_ENTITY_REF
};
typedef struct prolog_state {
int (PTRCALL *handler) (struct prolog_state *state,
int tok,
const char *ptr,
const char *end,
const ENCODING *enc);
unsigned level;
int role_none;
#ifdef XML_DTD
unsigned includeLevel;
int documentEntity;
int inEntityValue;
#endif /* XML_DTD */
} PROLOG_STATE;
void XmlPrologStateInit(PROLOG_STATE *);
#ifdef XML_DTD
void XmlPrologStateInitExternalEntity(PROLOG_STATE *);
#endif /* XML_DTD */
#define XmlTokenRole(state, tok, ptr, end, enc) \
(((state)->handler)(state, tok, ptr, end, enc))
#ifdef __cplusplus
}
#endif
#endif /* not XmlRole_INCLUDED */

File diff suppressed because it is too large Load Diff

View File

@ -1,322 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
#ifndef XmlTok_INCLUDED
#define XmlTok_INCLUDED 1
#ifdef __cplusplus
extern "C" {
#endif
/* The following token may be returned by XmlContentTok */
#define XML_TOK_TRAILING_RSQB -5 /* ] or ]] at the end of the scan; might be
start of illegal ]]> sequence */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_NONE -4 /* The string to be scanned is empty */
#define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan;
might be part of CRLF sequence */
#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
#define XML_TOK_PARTIAL -1 /* only part of a token */
#define XML_TOK_INVALID 0
/* The following tokens are returned by XmlContentTok; some are also
returned by XmlAttributeValueTok, XmlEntityTok, XmlCdataSectionTok.
*/
#define XML_TOK_START_TAG_WITH_ATTS 1
#define XML_TOK_START_TAG_NO_ATTS 2
#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
#define XML_TOK_END_TAG 5
#define XML_TOK_DATA_CHARS 6
#define XML_TOK_DATA_NEWLINE 7
#define XML_TOK_CDATA_SECT_OPEN 8
#define XML_TOK_ENTITY_REF 9
#define XML_TOK_CHAR_REF 10 /* numeric character reference */
/* The following tokens may be returned by both XmlPrologTok and
XmlContentTok.
*/
#define XML_TOK_PI 11 /* processing instruction */
#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
#define XML_TOK_COMMENT 13
#define XML_TOK_BOM 14 /* Byte order mark */
/* The following tokens are returned only by XmlPrologTok */
#define XML_TOK_PROLOG_S 15
#define XML_TOK_DECL_OPEN 16 /* <!foo */
#define XML_TOK_DECL_CLOSE 17 /* > */
#define XML_TOK_NAME 18
#define XML_TOK_NMTOKEN 19
#define XML_TOK_POUND_NAME 20 /* #name */
#define XML_TOK_OR 21 /* | */
#define XML_TOK_PERCENT 22
#define XML_TOK_OPEN_PAREN 23
#define XML_TOK_CLOSE_PAREN 24
#define XML_TOK_OPEN_BRACKET 25
#define XML_TOK_CLOSE_BRACKET 26
#define XML_TOK_LITERAL 27
#define XML_TOK_PARAM_ENTITY_REF 28
#define XML_TOK_INSTANCE_START 29
/* The following occur only in element type declarations */
#define XML_TOK_NAME_QUESTION 30 /* name? */
#define XML_TOK_NAME_ASTERISK 31 /* name* */
#define XML_TOK_NAME_PLUS 32 /* name+ */
#define XML_TOK_COND_SECT_OPEN 33 /* <![ */
#define XML_TOK_COND_SECT_CLOSE 34 /* ]]> */
#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
#define XML_TOK_CLOSE_PAREN_PLUS 37 /* )+ */
#define XML_TOK_COMMA 38
/* The following token is returned only by XmlAttributeValueTok */
#define XML_TOK_ATTRIBUTE_VALUE_S 39
/* The following token is returned only by XmlCdataSectionTok */
#define XML_TOK_CDATA_SECT_CLOSE 40
/* With namespace processing this is returned by XmlPrologTok for a
name with a colon.
*/
#define XML_TOK_PREFIXED_NAME 41
#ifdef XML_DTD
#define XML_TOK_IGNORE_SECT 42
#endif /* XML_DTD */
#ifdef XML_DTD
#define XML_N_STATES 4
#else /* not XML_DTD */
#define XML_N_STATES 3
#endif /* not XML_DTD */
#define XML_PROLOG_STATE 0
#define XML_CONTENT_STATE 1
#define XML_CDATA_SECTION_STATE 2
#ifdef XML_DTD
#define XML_IGNORE_SECTION_STATE 3
#endif /* XML_DTD */
#define XML_N_LITERAL_TYPES 2
#define XML_ATTRIBUTE_VALUE_LITERAL 0
#define XML_ENTITY_VALUE_LITERAL 1
/* The size of the buffer passed to XmlUtf8Encode must be at least this. */
#define XML_UTF8_ENCODE_MAX 4
/* The size of the buffer passed to XmlUtf16Encode must be at least this. */
#define XML_UTF16_ENCODE_MAX 2
typedef struct position {
/* first line and first column are 0 not 1 */
XML_Size lineNumber;
XML_Size columnNumber;
} POSITION;
typedef struct {
const char *name;
const char *valuePtr;
const char *valueEnd;
char normalized;
} ATTRIBUTE;
struct encoding;
typedef struct encoding ENCODING;
typedef int (PTRCALL *SCANNER)(const ENCODING *,
const char *,
const char *,
const char **);
enum XML_Convert_Result {
XML_CONVERT_COMPLETED = 0,
XML_CONVERT_INPUT_INCOMPLETE = 1,
XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
};
struct encoding {
SCANNER scanners[XML_N_STATES];
SCANNER literalScanners[XML_N_LITERAL_TYPES];
int (PTRCALL *sameName)(const ENCODING *,
const char *,
const char *);
int (PTRCALL *nameMatchesAscii)(const ENCODING *,
const char *,
const char *,
const char *);
int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
int (PTRCALL *getAtts)(const ENCODING *enc,
const char *ptr,
int attsMax,
ATTRIBUTE *atts);
int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
int (PTRCALL *predefinedEntityName)(const ENCODING *,
const char *,
const char *);
void (PTRCALL *updatePosition)(const ENCODING *,
const char *ptr,
const char *end,
POSITION *);
int (PTRCALL *isPublicId)(const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr);
enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
char **toP,
const char *toLim);
enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
const char **fromP,
const char *fromLim,
unsigned short **toP,
const unsigned short *toLim);
int minBytesPerChar;
char isUtf8;
char isUtf16;
};
/* Scan the string starting at ptr until the end of the next complete
token, but do not scan past eptr. Return an integer giving the
type of token.
Return XML_TOK_NONE when ptr == eptr; nextTokPtr will not be set.
Return XML_TOK_PARTIAL when the string does not contain a complete
token; nextTokPtr will not be set.
Return XML_TOK_INVALID when the string does not start a valid
token; nextTokPtr will be set to point to the character which made
the token invalid.
Otherwise the string starts with a valid token; nextTokPtr will be
set to point to the character following the end of that token.
Each data character counts as a single token, but adjacent data
characters may be returned together. Similarly for characters in
the prolog outside literals, comments and processing instructions.
*/
#define XmlTok(enc, state, ptr, end, nextTokPtr) \
(((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
#define XmlPrologTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
#define XmlContentTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
#define XmlCdataSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
#ifdef XML_DTD
#define XmlIgnoreSectionTok(enc, ptr, end, nextTokPtr) \
XmlTok(enc, XML_IGNORE_SECTION_STATE, ptr, end, nextTokPtr)
#endif /* XML_DTD */
/* This is used for performing a 2nd-level tokenization on the content
of a literal that has already been returned by XmlTok.
*/
#define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \
(((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
#define XmlAttributeValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlEntityValueTok(enc, ptr, end, nextTokPtr) \
XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
#define XmlSameName(enc, ptr1, ptr2) (((enc)->sameName)(enc, ptr1, ptr2))
#define XmlNameMatchesAscii(enc, ptr1, end1, ptr2) \
(((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
#define XmlNameLength(enc, ptr) \
(((enc)->nameLength)(enc, ptr))
#define XmlSkipS(enc, ptr) \
(((enc)->skipS)(enc, ptr))
#define XmlGetAttributes(enc, ptr, attsMax, atts) \
(((enc)->getAtts)(enc, ptr, attsMax, atts))
#define XmlCharRefNumber(enc, ptr) \
(((enc)->charRefNumber)(enc, ptr))
#define XmlPredefinedEntityName(enc, ptr, end) \
(((enc)->predefinedEntityName)(enc, ptr, end))
#define XmlUpdatePosition(enc, ptr, end, pos) \
(((enc)->updatePosition)(enc, ptr, end, pos))
#define XmlIsPublicId(enc, ptr, end, badPtr) \
(((enc)->isPublicId)(enc, ptr, end, badPtr))
#define XmlUtf8Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
#define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
(((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
typedef struct {
ENCODING initEnc;
const ENCODING **encPtr;
} INIT_ENCODING;
int XmlParseXmlDecl(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncoding(void);
const ENCODING *XmlGetUtf16InternalEncoding(void);
int FASTCALL XmlUtf8Encode(int charNumber, char *buf);
int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf);
int XmlSizeOfUnknownEncoding(void);
typedef int (XMLCALL *CONVERTER) (void *userData, const char *p);
ENCODING *
XmlInitUnknownEncoding(void *mem,
int *table,
CONVERTER convert,
void *userData);
int XmlParseXmlDeclNS(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingNamePtr,
const ENCODING **namedEncodingPtr,
int *standalonePtr);
int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name);
const ENCODING *XmlGetUtf8InternalEncodingNS(void);
const ENCODING *XmlGetUtf16InternalEncodingNS(void);
ENCODING *
XmlInitUnknownEncodingNS(void *mem,
int *table,
CONVERTER convert,
void *userData);
#ifdef __cplusplus
}
#endif
#endif /* not XmlTok_INCLUDED */

View File

@ -1,46 +0,0 @@
/*
Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
enum {
BT_NONXML,
BT_MALFORM,
BT_LT,
BT_AMP,
BT_RSQB,
BT_LEAD2,
BT_LEAD3,
BT_LEAD4,
BT_TRAIL,
BT_CR,
BT_LF,
BT_GT,
BT_QUOT,
BT_APOS,
BT_EQUALS,
BT_QUEST,
BT_EXCL,
BT_SOL,
BT_SEMI,
BT_NUM,
BT_LSQB,
BT_S,
BT_NMSTRT,
BT_COLON,
BT_HEX,
BT_DIGIT,
BT_NAME,
BT_MINUS,
BT_OTHER, /* known not to be a name or name start character */
BT_NONASCII, /* might be a name or name start character */
BT_PERCNT,
BT_LPAR,
BT_RPAR,
BT_AST,
BT_PLUS,
BT_COMMA,
BT_VERBAR
};
#include <stddef.h>

File diff suppressed because it is too large Load Diff

View File

@ -1,115 +0,0 @@
/* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
See the file COPYING for copying permission.
*/
/* This file is included! */
#ifdef XML_TOK_NS_C
const ENCODING *
NS(XmlGetUtf8InternalEncoding)(void)
{
return &ns(internal_utf8_encoding).enc;
}
const ENCODING *
NS(XmlGetUtf16InternalEncoding)(void)
{
#if BYTEORDER == 1234
return &ns(internal_little2_encoding).enc;
#elif BYTEORDER == 4321
return &ns(internal_big2_encoding).enc;
#else
const short n = 1;
return (*(const char *)&n
? &ns(internal_little2_encoding).enc
: &ns(internal_big2_encoding).enc);
#endif
}
static const ENCODING * const NS(encodings)[] = {
&ns(latin1_encoding).enc,
&ns(ascii_encoding).enc,
&ns(utf8_encoding).enc,
&ns(big2_encoding).enc,
&ns(big2_encoding).enc,
&ns(little2_encoding).enc,
&ns(utf8_encoding).enc /* NO_ENC */
};
static int PTRCALL
NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_PROLOG_STATE, ptr, end, nextTokPtr);
}
static int PTRCALL
NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr)
{
return initScan(NS(encodings), (const INIT_ENCODING *)enc,
XML_CONTENT_STATE, ptr, end, nextTokPtr);
}
int
NS(XmlInitEncoding)(INIT_ENCODING *p, const ENCODING **encPtr,
const char *name)
{
int i = getEncodingIndex(name);
if (i == UNKNOWN_ENC)
return 0;
SET_INIT_ENC_INDEX(p, i);
p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
p->initEnc.updatePosition = initUpdatePosition;
p->encPtr = encPtr;
*encPtr = &(p->initEnc);
return 1;
}
static const ENCODING *
NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end)
{
#define ENCODING_MAX 128
char buf[ENCODING_MAX];
char *p = buf;
int i;
XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
if (ptr != end)
return 0;
*p = 0;
if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
return enc;
i = getEncodingIndex(buf);
if (i == UNKNOWN_ENC)
return 0;
return NS(encodings)[i];
}
int
NS(XmlParseXmlDecl)(int isGeneralTextEntity,
const ENCODING *enc,
const char *ptr,
const char *end,
const char **badPtr,
const char **versionPtr,
const char **versionEndPtr,
const char **encodingName,
const ENCODING **encoding,
int *standalone)
{
return doParseXmlDecl(NS(findEncoding),
isGeneralTextEntity,
enc,
ptr,
end,
badPtr,
versionPtr,
versionEndPtr,
encodingName,
encoding,
standalone);
}
#endif /* XML_TOK_NS_C */

View File

@ -1,73 +0,0 @@
The OpenGL Extension Wrangler Library
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
Copyright (C) 2002, Lev Povalahev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Mesa 3-D graphics library
Version: 7.0
Copyright (C) 1999-2007 Brian Paul 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 and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
BRIAN PAUL 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.
Copyright (c) 2007 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Materials.
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

View File

@ -1,260 +0,0 @@
THIS IS NOT THE COMPLETE GLEW DISTRIBUTION. ONLY FILES NEEDED FOR COMPILING GLEW INTO SLIC3R WERE PUT INTO THE SLIC3R SOURCE DISTRIBUTION.
# GLEW - The OpenGL Extension Wrangler Library
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. GLEW has been tested on a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris.
![](http://glew.sourceforge.net/glew.png)
http://glew.sourceforge.net/
https://github.com/nigels-com/glew
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
## Table of Contents
* [Downloads](#downloads)
* [Recent snapshots](#recent-snapshots)
* [Build](#build)
* [Linux and Mac](#linux-and-mac)
* [Using GNU Make](#using-gnu-make)
* [Install build tools](#install-build-tools)
* [Build](#build-1)
* [Linux EGL](#linux-egl)
* [Linux OSMesa](#linux-osmesa)
* [Linux mingw-w64](#linux-mingw-w64)
* [Using cmake](#using-cmake)
* [Install build tools](#install-build-tools-1)
* [Build](#build-2)
* [Windows](#windows)
* [Visual Studio](#visual-studio)
* [MSYS/Mingw](#msysmingw)
* [MSYS2/Mingw-w64](#msys2mingw-w64)
* [glewinfo](#glewinfo)
* [Code Generation](#code-generation)
* [Authors](#authors)
* [Contributions](#contributions)
* [Copyright and Licensing](#copyright-and-licensing)
## Downloads
Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/).
[(Change Log)](http://glew.sourceforge.net/log.html)
Sources available as
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download).
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download).
### Recent snapshots
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
[glew-20200115.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20200115.tgz/download) *GLEW 2.2.0 RC3: fixes*
[glew-20190928.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20190928.tgz/download) *GLEW 2.2.0 RC2: New extensions, bug fixes*
## Build
It is highly recommended to build from a tgz or zip release snapshot.
The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
The code generation is known to work on Windows using [MSYS2](https://www.msys2.org/).
For most end-users of GLEW the official releases are the best choice, with first class support.
### Linux and Mac
#### Using GNU Make
GNU make is the primary build system for GLEW, historically.
It includes targets for building the sources and headers, for maintenance purposes.
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
FreeBSD: `# pkg install xorg lang/gcc git cmake gmake bash python perl5`
##### Build
$ make
$ sudo make install
$ make clean
Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall`
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
_Note: you may need to call `make` in the **auto** folder first_
##### Linux EGL
$ sudo apt install libegl1-mesa-dev
$ make SYSTEM=linux-egl
##### Linux OSMesa
$ sudo apt install libosmesa-dev
$ make SYSTEM=linux-osmesa
##### Linux mingw-w64
$ sudo apt install mingw-w64
$ make SYSTEM=linux-mingw32
$ make SYSTEM=linux-mingw64
#### Using cmake
The cmake build is mostly contributer maintained.
Due to the multitude of use cases this is maintained on a _best effort_ basis.
Pull requests are welcome.
*CMake 2.8.12 or higher is required.*
##### Install build tools
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git`
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git`
##### Build
$ cd build
$ cmake ./cmake
$ make -j4
| Target | Description |
| ---------- | ----------- |
| glew | Build the glew shared library. |
| glew_s | Build the glew static library. |
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
| clean | Clean up build artifacts. |
| all | Build all enabled targets (default target). |
| Variables | Description |
| --------------- | ----------- |
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
| GLEW_REGAL | Build in Regal mode. |
| GLEW_OSMESA | Build in off-screen Mesa mode. |
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
### Windows
#### Visual Studio
Use the provided Visual Studio project file in build/vc15/
Projects for vc6, vc10, vc12 and vc14 are also provided
#### MSYS/Mingw
Available from [Mingw](http://www.mingw.org/)
Requirements: bash, make, gcc
$ mingw32-make
$ mingw32-make install
$ mingw32-make install.all
Alternative toolchain: `SYSTEM=mingw-win32`
#### MSYS2/Mingw-w64
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
Requirements: bash, make, gcc
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
$ make
$ make install
$ make install.all
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
## glewinfo
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
OpenGL implementation and GLEW support for that. Please include `glewinfo.txt`
with bug reports, as appropriate.
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.0.0
Reporting capabilities of pixelformat 3
Running on a Intel(R) HD Graphics 3000 from Intel
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
GL_VERSION_1_1: OK
---------------
GL_VERSION_1_2: OK
---------------
glCopyTexSubImage3D: OK
glDrawRangeElements: OK
glTexImage3D: OK
glTexSubImage3D: OK
...
## Code Generation
A Unix or Mac environment is needed for building GLEW from scratch to
include new extensions, or customize the code generation. The extension
data is regenerated from the top level source directory with:
make extensions
An alternative to generating the GLEW sources from scratch is to
download a pre-generated (unsupported) snapshot:
https://sourceforge.net/projects/glew/files/glew/snapshots/
## Authors
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
with bug fixes, new OpenGL extension support and new releases.
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
assisted with the design and debugging process.
The acronym GLEW originates from Aaron Lefohn.
Pasi K&auml;rkk&auml;inen identified and fixed several problems with
GLX and SDL. Nate Robins created the `wglinfo` utility, to
which modifications were made by Michael Wimmer.
## Contributions
GLEW welcomes community contributions. Typically these are co-ordinated
via [Issues](https://github.com/nigels-com/glew/issues) or
[Pull Requests](https://github.com/nigels-com/glew/pulls) in the
GitHub web interface.
Be sure to mention platform and compiler toolchain details when filing
a bug report. The output of `glewinfo` can be quite useful for discussion
also.
Generally GLEW is usually released once a year, around the time of the Siggraph
computer graphics conference. If you're not using the current release
version of GLEW, be sure to check if the issue or bug is fixed there.
## Copyright and Licensing
GLEW is originally derived from the EXTGL project by Lev Povalahev.
The source code is licensed under the
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
The automatic code generation scripts are released under the
[GNU GPL](http://glew.sourceforge.net/gpl.txt).

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -373,7 +373,7 @@ target_link_libraries(libslic3r
boost_libs
clipper
nowide
${EXPAT_LIBRARIES}
EXPAT::EXPAT
glu-libtess
qhull
semver
@ -398,6 +398,12 @@ if(SLIC3R_PROFILE)
target_link_libraries(libslic3r Shiny)
endif()
if (APPLE)
# This flag prevents the need for minimum SDK version 10.14
# currently, PS targets v10.10
target_compile_options(libslic3r PUBLIC "-fno-aligned-allocation")
endif ()
if (SLIC3R_PCH AND NOT SLIC3R_SYNTAXONLY)
add_precompiled_header(libslic3r pchheader.hpp FORCEINCLUDE)
endif ()

View File

@ -34,6 +34,9 @@ static const float DEFAULT_TRAVEL_ACCELERATION = 1250.0f;
static const size_t MIN_EXTRUDERS_COUNT = 5;
static const float DEFAULT_FILAMENT_DIAMETER = 1.75f;
static const float DEFAULT_FILAMENT_DENSITY = 1.245f;
#if ENABLE_USED_FILAMENT_POST_PROCESS
static const float DEFAULT_FILAMENT_COST = 0.0f;
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
static const Slic3r::Vec3f DEFAULT_EXTRUDER_OFFSET = Slic3r::Vec3f::Zero();
#if ENABLE_PROCESS_G2_G3_LINES
@ -358,6 +361,7 @@ void GCodeProcessor::TimeProcessor::reset()
machines[static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Normal)].enabled = true;
}
#if !ENABLE_USED_FILAMENT_POST_PROCESS
void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, std::vector<GCodeProcessorResult::MoveVertex>& moves, std::vector<size_t>& lines_ends)
{
FilePtr in{ boost::nowide::fopen(filename.c_str(), "rb") };
@ -663,16 +667,17 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
throw Slic3r::RuntimeError(std::string("Failed to rename the output G-code file from ") + out_path + " to " + filename + '\n' +
"Is " + out_path + " locked?" + '\n');
}
#endif // !ENABLE_USED_FILAMENT_POST_PROCESS
void GCodeProcessor::UsedFilaments::reset()
{
color_change_cache = 0.0f;
color_change_cache = 0.0;
volumes_per_color_change = std::vector<double>();
tool_change_cache = 0.0f;
tool_change_cache = 0.0;
volumes_per_extruder.clear();
role_cache = 0.0f;
role_cache = 0.0;
filaments_per_role.clear();
}
@ -694,21 +699,21 @@ void GCodeProcessor::UsedFilaments::process_color_change_cache()
void GCodeProcessor::UsedFilaments::process_extruder_cache(GCodeProcessor* processor)
{
size_t active_extruder_id = processor->m_extruder_id;
if (tool_change_cache != 0.0f) {
if (tool_change_cache != 0.0) {
if (volumes_per_extruder.find(active_extruder_id) != volumes_per_extruder.end())
volumes_per_extruder[active_extruder_id] += tool_change_cache;
else
volumes_per_extruder[active_extruder_id] = tool_change_cache;
tool_change_cache = 0.0f;
tool_change_cache = 0.0;
}
}
void GCodeProcessor::UsedFilaments::process_role_cache(GCodeProcessor* processor)
{
if (role_cache != 0.0f) {
if (role_cache != 0.0) {
std::pair<double, double> filament = { 0.0f, 0.0f };
double s = PI * sqr(0.5 * processor->m_result.filament_diameters[processor->m_extruder_id]);
const double s = PI * sqr(0.5 * processor->m_result.filament_diameters[processor->m_extruder_id]);
filament.first = role_cache / s * 0.001;
filament.second = role_cache * processor->m_result.filament_densities[processor->m_extruder_id] * 0.001;
@ -719,7 +724,7 @@ void GCodeProcessor::UsedFilaments::process_role_cache(GCodeProcessor* processor
}
else
filaments_per_role[active_role] = filament;
role_cache = 0.0f;
role_cache = 0.0;
}
}
@ -740,6 +745,9 @@ void GCodeProcessorResult::reset() {
extruder_colors = std::vector<std::string>();
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
#if ENABLE_USED_FILAMENT_POST_PROCESS
filament_cost = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_COST);
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
spiral_vase_layers = std::vector<std::pair<float, std::pair<size_t, size_t>>>();
time = 0;
@ -756,6 +764,9 @@ void GCodeProcessorResult::reset() {
extruder_colors = std::vector<std::string>();
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
#if ENABLE_USED_FILAMENT_POST_PROCESS
filament_cost = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_COST);
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
spiral_vase_layers = std::vector<std::pair<float, std::pair<size_t, size_t>>>();
}
@ -850,6 +861,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
m_extruder_colors.resize(extruders_count);
m_result.filament_diameters.resize(extruders_count);
m_result.filament_densities.resize(extruders_count);
#if ENABLE_USED_FILAMENT_POST_PROCESS
m_result.filament_cost.resize(extruders_count);
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
m_extruder_temps.resize(extruders_count);
for (size_t i = 0; i < extruders_count; ++ i) {
@ -857,6 +871,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
m_extruder_colors[i] = static_cast<unsigned char>(i);
m_result.filament_diameters[i] = static_cast<float>(config.filament_diameter.get_at(i));
m_result.filament_densities[i] = static_cast<float>(config.filament_density.get_at(i));
#if ENABLE_USED_FILAMENT_POST_PROCESS
m_result.filament_cost[i] = static_cast<float>(config.filament_cost.get_at(i));
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
}
if ((m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfRepRapFirmware) && config.machine_limits_usage.value != MachineLimitsUsage::Ignore) {
@ -970,6 +987,23 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
}
}
#if ENABLE_USED_FILAMENT_POST_PROCESS
const ConfigOptionFloats* filament_cost = config.option<ConfigOptionFloats>("filament_cost");
if (filament_cost != nullptr) {
m_result.filament_cost.clear();
m_result.filament_cost.resize(filament_cost->values.size());
for (size_t i = 0; i < filament_cost->values.size(); ++i) {
m_result.filament_cost[i] = static_cast<float>(filament_cost->values[i]);
}
}
if (m_result.filament_cost.size() < m_result.extruders_count) {
for (size_t i = m_result.filament_cost.size(); i < m_result.extruders_count; ++i) {
m_result.filament_cost.emplace_back(DEFAULT_FILAMENT_COST);
}
}
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
const ConfigOptionPoints* extruder_offset = config.option<ConfigOptionPoints>("extruder_offset");
if (extruder_offset != nullptr) {
m_extruder_offsets.resize(extruder_offset->values.size());
@ -1331,7 +1365,7 @@ void GCodeProcessor::process_buffer(const std::string &buffer)
});
}
void GCodeProcessor::finalize(bool post_process)
void GCodeProcessor::finalize(bool perform_post_process)
{
// update width/height of wipe moves
for (GCodeProcessorResult::MoveVertex& move : m_result.moves) {
@ -1361,8 +1395,12 @@ void GCodeProcessor::finalize(bool post_process)
m_width_compare.output();
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
if (post_process)
if (perform_post_process)
#if ENABLE_USED_FILAMENT_POST_PROCESS
post_process();
#else
m_time_processor.post_process(m_result.filename, m_result.moves, m_result.lines_ends);
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
#if ENABLE_GCODE_VIEWER_STATISTICS
m_result.time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - m_start_time).count();
#endif // ENABLE_GCODE_VIEWER_STATISTICS
@ -1534,6 +1572,12 @@ void GCodeProcessor::apply_config_simplify3d(const std::string& filename)
} else if (comment.find("filamentDensities") != comment.npos) {
m_result.filament_densities.clear();
extract_floats(comment, "filamentDensities", m_result.filament_densities);
#if ENABLE_USED_FILAMENT_POST_PROCESS
}
else if (comment.find("filamentPricesPerKg") != comment.npos) {
m_result.filament_cost.clear();
extract_floats(comment, "filamentPricesPerKg", m_result.filament_cost);
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
} else if (comment.find("extruderDiameter") != comment.npos) {
std::vector<float> extruder_diameters;
extract_floats(comment, "extruderDiameter", extruder_diameters);
@ -1549,8 +1593,14 @@ void GCodeProcessor::apply_config_simplify3d(const std::string& filename)
}
});
#if ENABLE_USED_FILAMENT_POST_PROCESS
if (m_result.extruders_count == 0)
m_result.extruders_count = std::max<size_t>(1, std::min(m_result.filament_diameters.size(),
std::min(m_result.filament_densities.size(), m_result.filament_cost.size())));
#else
if (m_result.extruders_count == 0)
m_result.extruders_count = std::max<size_t>(1, std::min(m_result.filament_diameters.size(), m_result.filament_densities.size()));
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
if (bed_size.is_defined()) {
m_result.bed_shape = {
@ -3493,6 +3543,354 @@ void GCodeProcessor::process_T(const std::string_view command)
}
}
#if ENABLE_USED_FILAMENT_POST_PROCESS
void GCodeProcessor::post_process()
{
FilePtr in{ boost::nowide::fopen(m_result.filename.c_str(), "rb") };
if (in.f == nullptr)
throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nCannot open file for reading.\n"));
// temporary file to contain modified gcode
std::string out_path = m_result.filename + ".postprocess";
FilePtr out{ boost::nowide::fopen(out_path.c_str(), "wb") };
if (out.f == nullptr) {
throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nCannot open file for writing.\n"));
}
auto time_in_minutes = [](float time_in_seconds) {
assert(time_in_seconds >= 0.f);
return int((time_in_seconds + 0.5f) / 60.0f);
};
auto time_in_last_minute = [](float time_in_seconds) {
assert(time_in_seconds <= 60.0f);
return time_in_seconds / 60.0f;
};
auto format_line_M73_main = [](const std::string& mask, int percent, int time) {
char line_M73[64];
sprintf(line_M73, mask.c_str(),
std::to_string(percent).c_str(),
std::to_string(time).c_str());
return std::string(line_M73);
};
auto format_line_M73_stop_int = [](const std::string& mask, int time) {
char line_M73[64];
sprintf(line_M73, mask.c_str(), std::to_string(time).c_str());
return std::string(line_M73);
};
auto format_time_float = [](float time) {
return Slic3r::float_to_string_decimal_point(time, 2);
};
auto format_line_M73_stop_float = [format_time_float](const std::string& mask, float time) {
char line_M73[64];
sprintf(line_M73, mask.c_str(), format_time_float(time).c_str());
return std::string(line_M73);
};
std::string gcode_line;
size_t g1_lines_counter = 0;
// keeps track of last exported pair <percent, remaining time>
std::array<std::pair<int, int>, static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count)> last_exported_main;
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
last_exported_main[i] = { 0, time_in_minutes(m_time_processor.machines[i].time) };
}
// keeps track of last exported remaining time to next printer stop
std::array<int, static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count)> last_exported_stop;
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
last_exported_stop[i] = time_in_minutes(m_time_processor.machines[i].time);
}
// buffer line to export only when greater than 64K to reduce writing calls
std::string export_line;
// replace placeholder lines with the proper final value
// gcode_line is in/out parameter, to reduce expensive memory allocation
auto process_placeholders = [&](std::string& gcode_line) {
unsigned int extra_lines_count = 0;
// remove trailing '\n'
auto line = std::string_view(gcode_line).substr(0, gcode_line.length() - 1);
std::string ret;
if (line.length() > 1) {
line = line.substr(1);
if (m_time_processor.export_remaining_time_enabled &&
(line == reserved_tag(ETags::First_Line_M73_Placeholder) || line == reserved_tag(ETags::Last_Line_M73_Placeholder))) {
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
const TimeMachine& machine = m_time_processor.machines[i];
if (machine.enabled) {
// export pair <percent, remaining time>
ret += format_line_M73_main(machine.line_m73_main_mask.c_str(),
(line == reserved_tag(ETags::First_Line_M73_Placeholder)) ? 0 : 100,
(line == reserved_tag(ETags::First_Line_M73_Placeholder)) ? time_in_minutes(machine.time) : 0);
++extra_lines_count;
// export remaining time to next printer stop
if (line == reserved_tag(ETags::First_Line_M73_Placeholder) && !machine.stop_times.empty()) {
int to_export_stop = time_in_minutes(machine.stop_times.front().elapsed_time);
ret += format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop);
last_exported_stop[i] = to_export_stop;
++extra_lines_count;
}
}
}
}
else if (line == reserved_tag(ETags::Estimated_Printing_Time_Placeholder)) {
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
const TimeMachine& machine = m_time_processor.machines[i];
PrintEstimatedStatistics::ETimeMode mode = static_cast<PrintEstimatedStatistics::ETimeMode>(i);
if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) {
char buf[128];
sprintf(buf, "; estimated printing time (%s mode) = %s\n",
(mode == PrintEstimatedStatistics::ETimeMode::Normal) ? "normal" : "silent",
get_time_dhms(machine.time).c_str());
ret += buf;
}
}
}
}
if (!ret.empty())
// Not moving the move operator on purpose, so that the gcode_line allocation will grow and it will not be reallocated after handful of lines are processed.
gcode_line = ret;
return std::tuple(!ret.empty(), (extra_lines_count == 0) ? extra_lines_count : extra_lines_count - 1);
};
struct FilamentData
{
double mm{ 0.0 };
double cm3{ 0.0 };
double g{ 0.0 };
double cost{ 0.0 };
};
FilamentData filament_data;
for (const auto& [role, used] : m_result.print_statistics.used_filaments_per_role) {
filament_data.mm += used.first;
filament_data.g += used.second;
}
for (const auto& [id, volume] : m_result.print_statistics.volumes_per_extruder) {
filament_data.cm3 += volume;
filament_data.cost += volume * double(m_result.filament_densities[id]) * double(m_result.filament_cost[id]) * 0.000001;
}
auto process_used_filament = [&filament_data](std::string& gcode_line) {
auto process_tag = [](std::string& gcode_line, const std::string& tag, double value) {
if (boost::algorithm::istarts_with(gcode_line, tag)) {
char buf[128];
sprintf(buf, "%s %.2lf\n", tag.c_str(), value);
gcode_line = buf;
return true;
}
return false;
};
bool ret = false;
ret |= process_tag(gcode_line, "; filament used [mm] =", filament_data.mm * 1000.0);
ret |= process_tag(gcode_line, "; filament used [g] =", filament_data.g);
ret |= process_tag(gcode_line, "; total filament used [g] =", filament_data.g);
ret |= process_tag(gcode_line, "; filament used [cm3] =", filament_data.cm3 / 1000.0);
ret |= process_tag(gcode_line, "; filament cost =", filament_data.cost);
ret |= process_tag(gcode_line, "; total filament cost =", filament_data.cost);
return ret;
};
// check for temporary lines
auto is_temporary_decoration = [](const std::string_view gcode_line) {
// remove trailing '\n'
assert(!gcode_line.empty());
assert(gcode_line.back() == '\n');
// return true for decorations which are used in processing the gcode but that should not be exported into the final gcode
// i.e.:
// bool ret = gcode_line.substr(0, gcode_line.length() - 1) == ";" + Layer_Change_Tag;
// ...
// return ret;
return false;
};
// Iterators for the normal and silent cached time estimate entry recently processed, used by process_line_G1.
auto g1_times_cache_it = Slic3r::reserve_vector<std::vector<TimeMachine::G1LinesCacheItem>::const_iterator>(m_time_processor.machines.size());
for (const auto& machine : m_time_processor.machines)
g1_times_cache_it.emplace_back(machine.g1_times_cache.begin());
// add lines M73 to exported gcode
auto process_line_G1 = [this,
// Lambdas, mostly for string formatting, all with an empty capture block.
time_in_minutes, format_time_float, format_line_M73_main, format_line_M73_stop_int, format_line_M73_stop_float, time_in_last_minute,
// Caches, to be modified
&g1_times_cache_it, &last_exported_main, &last_exported_stop,
// String output
&export_line]
(const size_t g1_lines_counter) {
unsigned int exported_lines_count = 0;
if (m_time_processor.export_remaining_time_enabled) {
for (size_t i = 0; i < static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Count); ++i) {
const TimeMachine& machine = m_time_processor.machines[i];
if (machine.enabled) {
// export pair <percent, remaining time>
// Skip all machine.g1_times_cache below g1_lines_counter.
auto& it = g1_times_cache_it[i];
while (it != machine.g1_times_cache.end() && it->id < g1_lines_counter)
++it;
if (it != machine.g1_times_cache.end() && it->id == g1_lines_counter) {
std::pair<int, int> to_export_main = { int(100.0f * it->elapsed_time / machine.time),
time_in_minutes(machine.time - it->elapsed_time) };
if (last_exported_main[i] != to_export_main) {
export_line += format_line_M73_main(machine.line_m73_main_mask.c_str(),
to_export_main.first, to_export_main.second);
last_exported_main[i] = to_export_main;
++exported_lines_count;
}
// export remaining time to next printer stop
auto it_stop = std::upper_bound(machine.stop_times.begin(), machine.stop_times.end(), it->elapsed_time,
[](float value, const TimeMachine::StopTime& t) { return value < t.elapsed_time; });
if (it_stop != machine.stop_times.end()) {
int to_export_stop = time_in_minutes(it_stop->elapsed_time - it->elapsed_time);
if (last_exported_stop[i] != to_export_stop) {
if (to_export_stop > 0) {
if (last_exported_stop[i] != to_export_stop) {
export_line += format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop);
last_exported_stop[i] = to_export_stop;
++exported_lines_count;
}
}
else {
bool is_last = false;
auto next_it = it + 1;
is_last |= (next_it == machine.g1_times_cache.end());
if (next_it != machine.g1_times_cache.end()) {
auto next_it_stop = std::upper_bound(machine.stop_times.begin(), machine.stop_times.end(), next_it->elapsed_time,
[](float value, const TimeMachine::StopTime& t) { return value < t.elapsed_time; });
is_last |= (next_it_stop != it_stop);
std::string time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - it->elapsed_time));
std::string next_time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - next_it->elapsed_time));
is_last |= (string_to_double_decimal_point(time_float_str) > 0. && string_to_double_decimal_point(next_time_float_str) == 0.);
}
if (is_last) {
if (std::distance(machine.stop_times.begin(), it_stop) == static_cast<ptrdiff_t>(machine.stop_times.size() - 1))
export_line += format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop);
else
export_line += format_line_M73_stop_float(machine.line_m73_stop_mask.c_str(), time_in_last_minute(it_stop->elapsed_time - it->elapsed_time));
last_exported_stop[i] = to_export_stop;
++exported_lines_count;
}
}
}
}
}
}
}
}
return exported_lines_count;
};
// helper function to write to disk
size_t out_file_pos = 0;
m_result.lines_ends.clear();
auto write_string = [this, &export_line, &out, &out_path, &out_file_pos](const std::string& str) {
fwrite((const void*)export_line.c_str(), 1, export_line.length(), out.f);
if (ferror(out.f)) {
out.close();
boost::nowide::remove(out_path.c_str());
throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nIs the disk full?\n"));
}
for (size_t i = 0; i < export_line.size(); ++i)
if (export_line[i] == '\n')
m_result.lines_ends.emplace_back(out_file_pos + i + 1);
out_file_pos += export_line.size();
export_line.clear();
};
unsigned int line_id = 0;
std::vector<std::pair<unsigned int, unsigned int>> offsets;
{
// Read the input stream 64kB at a time, extract lines and process them.
std::vector<char> buffer(65536 * 10, 0);
// Line buffer.
assert(gcode_line.empty());
for (;;) {
size_t cnt_read = ::fread(buffer.data(), 1, buffer.size(), in.f);
if (::ferror(in.f))
throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nError while reading from file.\n"));
bool eof = cnt_read == 0;
auto it = buffer.begin();
auto it_bufend = buffer.begin() + cnt_read;
while (it != it_bufend || (eof && !gcode_line.empty())) {
// Find end of line.
bool eol = false;
auto it_end = it;
for (; it_end != it_bufend && !(eol = *it_end == '\r' || *it_end == '\n'); ++it_end);
// End of line is indicated also if end of file was reached.
eol |= eof && it_end == it_bufend;
gcode_line.insert(gcode_line.end(), it, it_end);
if (eol) {
++line_id;
gcode_line += "\n";
// replace placeholder lines
auto [processed, lines_added_count] = process_placeholders(gcode_line);
if (processed && lines_added_count > 0)
offsets.push_back({ line_id, lines_added_count });
if (!processed)
processed = process_used_filament(gcode_line);
if (!processed && !is_temporary_decoration(gcode_line) && GCodeReader::GCodeLine::cmd_is(gcode_line, "G1")) {
// remove temporary lines, add lines M73 where needed
unsigned int extra_lines_count = process_line_G1(g1_lines_counter++);
if (extra_lines_count > 0)
offsets.push_back({ line_id, extra_lines_count });
}
export_line += gcode_line;
if (export_line.length() > 65535)
write_string(export_line);
gcode_line.clear();
}
// Skip EOL.
it = it_end;
if (it != it_bufend && *it == '\r')
++it;
if (it != it_bufend && *it == '\n')
++it;
}
if (eof)
break;
}
}
if (!export_line.empty())
write_string(export_line);
out.close();
in.close();
// updates moves' gcode ids which have been modified by the insertion of the M73 lines
unsigned int curr_offset_id = 0;
unsigned int total_offset = 0;
for (GCodeProcessorResult::MoveVertex& move : m_result.moves) {
while (curr_offset_id < static_cast<unsigned int>(offsets.size()) && offsets[curr_offset_id].first <= move.gcode_id) {
total_offset += offsets[curr_offset_id].second;
++curr_offset_id;
}
move.gcode_id += total_offset;
}
if (rename_file(out_path, m_result.filename))
throw Slic3r::RuntimeError(std::string("Failed to rename the output G-code file from ") + out_path + " to " + m_result.filename + '\n' +
"Is " + out_path + " locked?" + '\n');
}
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
#if ENABLE_PROCESS_G2_G3_LINES
void GCodeProcessor::store_move_vertex(EMoveType type, bool internal_only)
#else

View File

@ -67,6 +67,9 @@ namespace Slic3r {
std::vector<double> volumes_per_color_change;
std::map<size_t, double> volumes_per_extruder;
std::map<ExtrusionRole, std::pair<double, double>> used_filaments_per_role;
#if ENABLE_USED_FILAMENT_POST_PROCESS
std::map<size_t, double> cost_per_extruder;
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
std::array<Mode, static_cast<size_t>(ETimeMode::Count)> modes;
@ -79,6 +82,9 @@ namespace Slic3r {
volumes_per_color_change.clear();
volumes_per_extruder.clear();
used_filaments_per_role.clear();
#if ENABLE_USED_FILAMENT_POST_PROCESS
cost_per_extruder.clear();
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
}
};
@ -132,6 +138,10 @@ namespace Slic3r {
std::vector<std::string> extruder_colors;
std::vector<float> filament_diameters;
std::vector<float> filament_densities;
#if ENABLE_USED_FILAMENT_POST_PROCESS
std::vector<float> filament_cost;
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
PrintEstimatedStatistics print_statistics;
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
std::vector<std::pair<float, std::pair<size_t, size_t>>> spiral_vase_layers;
@ -352,9 +362,13 @@ namespace Slic3r {
void reset();
#if ENABLE_USED_FILAMENT_POST_PROCESS
friend class GCodeProcessor;
#else
// post process the file with the given filename to add remaining time lines M73
// and updates moves' gcode ids accordingly
void post_process(const std::string& filename, std::vector<GCodeProcessorResult::MoveVertex>& moves, std::vector<size_t>& lines_ends);
#endif // !ENABLE_USED_FILAMENT_POST_PROCESS
};
struct UsedFilaments // filaments per ColorChange
@ -753,6 +767,13 @@ namespace Slic3r {
void process_T(const GCodeReader::GCodeLine& line);
void process_T(const std::string_view command);
#if ENABLE_USED_FILAMENT_POST_PROCESS
// post process the file with the given filename to:
// 1) add remaining time lines M73 and update moves' gcode ids accordingly
// 2) update used filament data
void post_process();
#endif // ENABLE_USED_FILAMENT_POST_PROCESS
#if ENABLE_PROCESS_G2_G3_LINES
void store_move_vertex(EMoveType type, bool internal_only = false);
#else

View File

@ -83,5 +83,12 @@
#define ENABLE_NEW_CAMERA_MOVEMENTS (1 && ENABLE_2_5_0_ALPHA1)
// Enable modified rectangle selection
#define ENABLE_NEW_RECTANGLE_SELECTION (1 && ENABLE_2_5_0_ALPHA1)
// Enable alternative version of file_wildcards()
#define ENABLE_ALTERNATIVE_FILE_WILDCARDS_GENERATOR (1 && ENABLE_2_5_0_ALPHA1)
// Enable processing of gcode G2 and G3 lines
#define ENABLE_PROCESS_G2_G3_LINES (1 && ENABLE_2_5_0_ALPHA1)
// Enable fix of used filament data exported to gcode file
#define ENABLE_USED_FILAMENT_POST_PROCESS (1 && ENABLE_2_5_0_ALPHA1)
#endif // _prusaslicer_technologies_h_

View File

@ -1,47 +0,0 @@
Qhull 2015.2 2016/01/18
http://www.qhull.org
git@github.com:qhull/qhull.git
http://www.geomview.org
Qhull computes convex hulls, Delaunay triangulations, Voronoi diagrams,
furthest-site Voronoi diagrams, and halfspace intersections about a point.
It runs in 2-d, 3-d, 4-d, or higher. It implements the Quickhull algorithm
for computing convex hulls. Qhull handles round-off errors from floating
point arithmetic. It can approximate a convex hull.
The program includes options for hull volume, facet area, partial hulls,
input transformations, randomization, tracing, multiple output formats, and
execution statistics. The program can be called from within your application.
You can view the results in 2-d, 3-d and 4-d with Geomview.
To download Qhull:
http://www.qhull.org/download
git@github.com:qhull/qhull.git
Download qhull-96.ps for:
Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The
Quickhull Algorithm for Convex Hulls," ACM Trans. on
Mathematical Software, 22(4):469-483, Dec. 1996.
http://www.acm.org/pubs/citations/journals/toms/1996-22-4/p469-barber/
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.405
Abstract:
The convex hull of a set of points is the smallest convex set that contains
the points. This article presents a practical convex hull algorithm that
combines the two-dimensional Quickhull Algorithm with the general dimension
Beneath-Beyond Algorithm. It is similar to the randomized, incremental
algorithms for convex hull and Delaunay triangulation. We provide empirical
evidence that the algorithm runs faster when the input contains non-extreme
points, and that it uses less memory.
Computational geometry algorithms have traditionally assumed that input sets
are well behaved. When an algorithm is implemented with floating point
arithmetic, this assumption can lead to serious errors. We briefly describe
a solution to this problem when computing the convex hull in two, three, or
four dimensions. The output is a set of "thick" facets that contain all
possible exact convex hulls of the input. A variation is effective in five
or more dimensions.

View File

@ -1,147 +0,0 @@
# This CMake file is written specifically to integrate qhull library with Slic3rPE
# (see https://github.com/prusa3d/PrusaSlicer for more information about the project)
#
# Only original libraries qhullstatic_r and qhullcpp are included.
# They are built as a single statically linked library.
#
# Created by modification of the original qhull CMakeLists.
# Lukas Matena (25.7.2018), lukasmatena@seznam.cz
# see bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925540
find_package(Qhull 7.2 QUIET)
add_library(qhull INTERFACE)
if(Qhull_FOUND)
message(STATUS "Using qhull from system.")
if(SLIC3R_STATIC)
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhullstatic_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhullstatic_r)
else()
slic3r_remap_configs("Qhull::qhullcpp;Qhull::qhull_r" RelWithDebInfo Release)
target_link_libraries(qhull INTERFACE Qhull::qhullcpp Qhull::qhull_r)
endif()
else(Qhull_FOUND)
project(qhull)
cmake_minimum_required(VERSION 2.6)
# Define qhull_VERSION in CMakeLists.txt, Makefile, qhull-exports.def, qhull_p-exports.def, qhull_r-exports.def, qhull-warn.pri
set(qhull_VERSION2 "2015.2 2016/01/18") # not used, See global.c, global_r.c, rbox.c, rbox_r.c
set(qhull_VERSION "7.2.0") # Advance every release
#include(CMakeModules/CheckLFS.cmake)
#option(WITH_LFS "Enable Large File Support" ON)
#check_lfs(WITH_LFS)
message(STATUS "qhull Version: ${qhull_VERSION} (static linking)")
set(libqhull_HEADERS
# reentrant qhull HEADERS:
src/libqhull_r/libqhull_r.h
src/libqhull_r/geom_r.h
src/libqhull_r/io_r.h
src/libqhull_r/mem_r.h
src/libqhull_r/merge_r.h
src/libqhull_r/poly_r.h
src/libqhull_r/qhull_ra.h
src/libqhull_r/qset_r.h
src/libqhull_r/random_r.h
src/libqhull_r/stat_r.h
src/libqhull_r/user_r.h
# C++ interface to reentrant Qhull HEADERS:
src/libqhullcpp/Coordinates.h
src/libqhullcpp/functionObjects.h
src/libqhullcpp/PointCoordinates.h
src/libqhullcpp/Qhull.h
src/libqhullcpp/QhullError.h
src/libqhullcpp/QhullFacet.h
src/libqhullcpp/QhullFacetList.h
src/libqhullcpp/QhullFacetSet.h
src/libqhullcpp/QhullHyperplane.h
src/libqhullcpp/QhullIterator.h
src/libqhullcpp/QhullLinkedList.h
src/libqhullcpp/QhullPoint.h
src/libqhullcpp/QhullPoints.h
src/libqhullcpp/QhullPointSet.h
src/libqhullcpp/QhullQh.h
src/libqhullcpp/QhullRidge.h
src/libqhullcpp/QhullSet.h
src/libqhullcpp/QhullSets.h
src/libqhullcpp/QhullStat.h
src/libqhullcpp/QhullVertex.h
src/libqhullcpp/QhullVertexSet.h
src/libqhullcpp/RboxPoints.h
src/libqhullcpp/RoadError.h
src/libqhullcpp/RoadLogEvent.h
src/qhulltest/RoadTest.h
)
set(libqhull_SOURCES
# reentrant qhull SOURCES:
src/libqhull_r/global_r.c
src/libqhull_r/stat_r.c
src/libqhull_r/geom2_r.c
src/libqhull_r/poly2_r.c
src/libqhull_r/merge_r.c
src/libqhull_r/libqhull_r.c
src/libqhull_r/geom_r.c
src/libqhull_r/poly_r.c
src/libqhull_r/qset_r.c
src/libqhull_r/mem_r.c
src/libqhull_r/random_r.c
src/libqhull_r/usermem_r.c
src/libqhull_r/io_r.c
src/libqhull_r/user_r.c
src/libqhull_r/rboxlib_r.c
# C++ interface to reentrant Qhull SOURCES:
src/libqhullcpp/Coordinates.cpp
src/libqhullcpp/PointCoordinates.cpp
src/libqhullcpp/Qhull.cpp
src/libqhullcpp/QhullFacet.cpp
src/libqhullcpp/QhullFacetList.cpp
src/libqhullcpp/QhullFacetSet.cpp
src/libqhullcpp/QhullHyperplane.cpp
src/libqhullcpp/QhullPoint.cpp
src/libqhullcpp/QhullPointSet.cpp
src/libqhullcpp/QhullPoints.cpp
src/libqhullcpp/QhullQh.cpp
src/libqhullcpp/QhullRidge.cpp
src/libqhullcpp/QhullSet.cpp
src/libqhullcpp/QhullStat.cpp
src/libqhullcpp/QhullVertex.cpp
src/libqhullcpp/QhullVertexSet.cpp
src/libqhullcpp/RboxPoints.cpp
src/libqhullcpp/RoadError.cpp
src/libqhullcpp/RoadLogEvent.cpp
# headers for both (libqhullr and libqhullcpp:
${libqhull_HEADERS}
)
##################################################
# combined library (reentrant qhull and qhullcpp) for Slic3r:
set(qhull_STATIC qhullstatic)
add_library(${qhull_STATIC} STATIC ${libqhull_SOURCES})
set_target_properties(${qhull_STATIC} PROPERTIES
VERSION ${qhull_VERSION})
if(UNIX)
target_link_libraries(${qhull_STATIC} m)
endif(UNIX)
##################################################
# LIBDIR is defined in the main xs CMake file:
target_include_directories(${qhull_STATIC} BEFORE PUBLIC ${LIBDIR}/qhull/src)
target_link_libraries(qhull INTERFACE ${qhull_STATIC})
endif()

View File

@ -1,38 +0,0 @@
Qhull, Copyright (c) 1993-2015
C.B. Barber
Arlington, MA
and
The National Science and Technology Research Center for
Computation and Visualization of Geometric Structures
(The Geometry Center)
University of Minnesota
email: qhull@qhull.org
This software includes Qhull from C.B. Barber and The Geometry Center.
Qhull is copyrighted as noted above. Qhull is free software and may
be obtained via http from www.qhull.org. It may be freely copied, modified,
and redistributed under the following conditions:
1. All copyright notices must remain intact in all files.
2. A copy of this text file must be distributed along with any copies
of Qhull that you redistribute; this includes copies that you have
modified, or copies of programs or other software products that
include Qhull.
3. If you modify Qhull, you must include a notice giving the
name of the person performing the modification, the date of
modification, and the reason for such modification.
4. When distributing modified versions of Qhull, or other software
products that include Qhull, you must provide notice that the original
source code may be obtained as noted above.
5. There is no warranty or other guarantee of fitness for Qhull, it is
provided solely "as is". Bug reports or fixes may be sent to
qhull_bug@qhull.org; the authors may or may not act on them as
they desire.

View File

@ -1,623 +0,0 @@
This distribution of qhull library is only meant for interfacing qhull with Slic3rPE
(https://github.com/prusa3d/PrusaSlicer).
The qhull source file was acquired from https://github.com/qhull/qhull at revision
f0bd8ceeb84b554d7cdde9bbfae7d3351270478c.
No changes to the qhull library were made, except for
- setting REALfloat=1 in user_r.h to enforce calculations in floats
- modifying CMakeLists.txt (the original was renamed to origCMakeLists.txt)
Many thanks to C. Bradford Barber and all contributors.
Lukas Matena (lukasmatena@seznam.cz)
25.7.2018
See original contents of the README file below.
======================================================================================
======================================================================================
======================================================================================
Name
qhull, rbox 2015.2 2016/01/18
Convex hull, Delaunay triangulation, Voronoi diagrams, Halfspace intersection
Documentation:
html/index.htm
<http://www.qhull.org/html>
Available from:
<http://www.qhull.org>
<http://www.qhull.org/download>
<http://github.com/qhull/qhull> (git@github.com:qhull/qhull.git)
News and a paper:
<http://www.qhull.org/news>
<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.405>
Version 1 (simplicial only):
<http://www.qhull.org/download/qhull-1.0.tar.gz>
Purpose
Qhull is a general dimension convex hull program that reads a set
of points from stdin, and outputs the smallest convex set that contains
the points to stdout. It also generates Delaunay triangulations, Voronoi
diagrams, furthest-site Voronoi diagrams, and halfspace intersections
about a point.
Rbox is a useful tool in generating input for Qhull; it generates
hypercubes, diamonds, cones, circles, simplices, spirals,
lattices, and random points.
Qhull produces graphical output for Geomview. This helps with
understanding the output. <http://www.geomview.org>
Environment requirements
Qhull and rbox should run on all 32-bit and 64-bit computers. Use
an ANSI C or C++ compiler to compile the program. The software is
self-contained. It comes with examples and test scripts.
Qhull's C++ interface uses the STL. The C++ test program uses QTestLib
from the Qt Framework. Qhull's C++ interface may change without
notice. Eventually, it will move into the qhull shared library.
Qhull is copyrighted software. Please read COPYING.txt and REGISTER.txt
before using or distributing Qhull.
To cite Qhull, please use
Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull
algorithm for convex hulls," ACM Trans. on Mathematical Software,
22(4):469-483, Dec 1996, http://www.qhull.org.
To modify Qhull, particularly the C++ interface
Qhull is on GitHub
(http://github.com/qhull/qhull, git@github.com:qhull/qhull.git)
For internal documentation, see html/qh-code.htm
To install Qhull
Qhull is precompiled for Windows 32-bit, otherwise it needs compilation.
Qhull includes Makefiles for gcc and other targets, CMakeLists.txt for CMake,
.sln/.vcproj/.vcxproj files for Microsoft Visual Studio, and .pro files
for Qt Creator. It compiles under Windows with mingw.
Install and build instructions follow.
See the end of this document for a list of distributed files.
-----------------
Installing Qhull on Windows 10, 8, 7 (32- or 64-bit), Windows XP, and Windows NT
The zip file contains rbox.exe, qhull.exe, qconvex.exe, qdelaunay.exe,
qhalf.exe, qvoronoi.exe, testqset.exe, user_eg*.exe, documentation files,
and source files. Qhull.exe and user-eg3.exe are compiled with the reentrant
library while the other executables use the non-reentrant library.
To install Qhull:
- Unzip the files into a directory (e.g., named 'qhull')
- Click on QHULL-GO or open a command window into Qhull's bin directory.
- Test with 'rbox D4 | qhull'
To uninstall Qhull
- Delete the qhull directory
To learn about Qhull:
- Execute 'qconvex' for a synopsis and examples.
- Execute 'rbox 10 | qconvex' to compute the convex hull of 10 random points.
- Execute 'rbox 10 | qconvex i TO file' to write results to 'file'.
- Browse the documentation: qhull\html\index.htm
- If an error occurs, Windows sends the error to stdout instead of stderr.
Use 'TO xxx' to send normal output to xxx
To improve the command window
- Double-click the window bar to increase the size of the window
- Right-click the window bar
- Select Properties
- Check QuickEdit Mode
Select text with right-click or Enter
Paste text with right-click
- Change Font to Lucinda Console
- Change Layout to Screen Buffer Height 999, Window Size Height 55
- Change Colors to Screen Background White, Screen Text Black
- Click OK
- Select 'Modify shortcut that started this window', then OK
If you use qhull a lot, install a bash shell such as
MSYS (www.mingw.org/wiki/msys), Road Bash (www.qhull.org/bash),
or Cygwin (www.cygwin.com).
-----------------
Installing Qhull on Unix with gcc
To build Qhull, static libraries, shared library, and C++ interface
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- make
- export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
The Makefiles may be edited for other compilers.
If 'testqset' exits with an error, qhull is broken
A simple Makefile for Qhull is in src/libqhull and src/libqhull_r.
To build the Qhull executables and libqhullstatic
- Extract Qhull from qhull...tgz or qhull...zip
- cd src/libqhull_r # cd src/libqhull
- make
-----------------
Installing Qhull with CMake 2.6 or later
See CMakeLists.txt for examples and further build instructions
To build Qhull, static libraries, shared library, and C++ interface
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- cd build
- cmake --help # List build generators
- make -G "<generator>" .. && cmake ..
- cmake ..
- make
- make install
The ".." is important. It refers to the parent directory (i.e., qhull/)
On Windows, CMake installs to C:/Program Files/qhull. 64-bit generators
have a "Win64" tag.
If creating a qhull package, please include a pkg-config file based on build/qhull*.pc.in
If cmake fails with "No CMAKE_C_COMPILER could be found"
- cmake was not able to find the build environment specified by -G "..."
-----------------
Installing Qhull with Qt
To build Qhull, including its C++ test (qhulltest)
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Load src/qhull-all.pro into QtCreator
- Build
-------------------
Working with Qhull's C++ interface
See html/qh-code.htm#cpp for calling Qhull from C++ programs
See html/qh-code.htm#reentrant for converting from Qhull-2012
Examples of using the C++ interface
user_eg3_r.cpp
qhulltest/*_test.cpp
Qhull's C++ interface is likely to change. Stay current with GitHub.
To clone Qhull's next branch from http://github.com/qhull/qhull
git init
git clone git@github.com:qhull/qhull.git
cd qhull
git checkout next
...
git pull origin next
Compile qhullcpp and libqhullstatic_r with the same compiler. Both libraries
use the C routines setjmp() and longjmp() for error handling. They must
be compiled with the same compiler.
-------------------
Calling Qhull from C programs
See html/qh-code.htm#library for calling Qhull from C programs
See html/qh-code.htm#reentrant for converting from Qhull-2012
Warning: You will need to understand Qhull's data structures and read the
code. Most users will find it easier to call Qhull as an external command.
The new, reentrant 'C' code (src/libqhull_r), passes a pointer to qhT
to most Qhull routines. This allows multiple instances of Qhull to run
at the same time. It simplifies the C++ interface.
The non-reentrant 'C' code (src/libqhull) looks unusual. It refers to
Qhull's global data structure, qhT, through a 'qh' macro (e.g., 'qh ferr').
This allows the same code to use static memory or heap memory.
If qh_QHpointer is defined, qh_qh is a pointer to an allocated qhT;
otherwise qh_qh is a global static data structure of type qhT.
------------------
Compiling Qhull with Microsoft Visual C++
To compile 32-bit Qhull with Microsoft Visual C++ 2010 and later
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Load solution build/qhull-32.sln
- Build target 'Win32'
- Project qhulltest requires Qt for DevStudio (http://www.qt.io)
Set the QTDIR environment variable to your Qt directory (e.g., c:/qt/5.2.0/5.2.0/msvc2012)
If QTDIR is incorrect, precompile will fail with 'Can not locate the file specified'
To compile 64-bit Qhull with Microsoft Visual C++ 2010 and later
- 64-bit Qhull has larger data structures due to 64-bit pointers
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Load solution build/qhull-64.sln
- Build target 'Win32'
- Project qhulltest requires Qt for DevStudio (http://www.qt.io)
Set the QTDIR environment variable to your Qt directory (e.g., c:/qt/5.2.0/5.2.0/msvc2012_64)
If QTDIR is incorrect, precompile will fail with 'Can not locate the file specified'
To compile Qhull with Microsoft Visual C++ 2005 (vcproj files)
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Load solution build/qhull.sln
- Build target 'win32' (not 'x64')
- Project qhulltest requires Qt for DevStudio (http://www.qt.io)
Set the QTDIR environment variable to your Qt directory (e.g., c:/qt/4.7.4)
If QTDIR is incorrect, precompile will fail with 'Can not locate the file specified'
-----------------
Compiling Qhull with Qt Creator
Qt (http://www.qt.io) is a C++ framework for Windows, Linux, and Macintosh
Qhull uses QTestLib to test qhull's C++ interface (see src/qhulltest/)
To compile Qhull with Qt Creator
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Download the Qt SDK
- Start Qt Creator
- Load src/qhull-all.pro
- Build
-----------------
Compiling Qhull with mingw on Windows
To compile Qhull with MINGW
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Install Road Bash (http://www.qhull.org/bash)
or install MSYS (http://www.mingw.org/wiki/msys)
- Install MINGW-w64 (http://sourceforge.net/projects/mingw-w64).
Mingw is included with Qt SDK.
- make
-----------------
Compiling Qhull with cygwin on Windows
To compile Qhull with cygwin
- Download and extract Qhull (either GitHub, .tgz file, or .zip file)
- Install cygwin (http://www.cygwin.com)
- Include packages for gcc, make, ar, and ln
- make
-----------------
Compiling from Makfile without gcc
The file, qhull-src.tgz, contains documentation and source files for
qhull and rbox.
To unpack the tgz file
- tar zxf qhull-src.tgz
- cd qhull
- Use qhull/Makefile
Simpler Makefiles are qhull/src/libqhull/Makefile and qhull/src/libqhull_r/Makefile
Compiling qhull and rbox with Makefile
- in Makefile, check the CC, CCOPTS1, PRINTMAN, and PRINTC defines
- the defaults are gcc and enscript
- CCOPTS1 should include the ANSI flag. It defines __STDC__
- in user.h, check the definitions of qh_SECticks and qh_CPUclock.
- use '#define qh_CLOCKtype 2' for timing runs longer than 1 hour
- type: make
- this builds: qhull qconvex qdelaunay qhalf qvoronoi rbox libqhull.a libqhull_r.a
- type: make doc
- this prints the man page
- See also qhull/html/index.htm
- if your compiler reports many errors, it is probably not a ANSI C compiler
- you will need to set the -ansi switch or find another compiler
- if your compiler warns about missing prototypes for fprintf() etc.
- this is ok, your compiler should have these in stdio.h
- if your compiler warns about missing prototypes for memset() etc.
- include memory.h in qhull_a.h
- if your compiler reports "global.c: storage size of 'qh_qh' isn't known"
- delete the initializer "={0}" in global.c, stat.c and mem.c
- if your compiler warns about "stat.c: improper initializer"
- this is ok, the initializer is not used
- if you have trouble building libqhull.a with 'ar'
- try 'make -f Makefile.txt qhullx'
- if the code compiles, the qhull test case will automatically execute
- if an error occurs, there's an incompatibility between machines
- If you can, try a different compiler
- You can turn off the Qhull memory manager with qh_NOmem in mem.h
- You can turn off compiler optimization (-O2 in Makefile)
- If you find the source of the problem, please let us know
- to install the programs and their man pages:
- define MANDIR and BINDIR
- type 'make install'
- if you have Geomview (www.geomview.org)
- try 'rbox 100 | qconvex G >a' and load 'a' into Geomview
- run 'q_eg' for Geomview examples of Qhull output (see qh-eg.htm)
------------------
Compiling on other machines and compilers
Qhull may compile with Borland C++ 5.0 bcc32. A Makefile is included.
Execute 'cd src/libqhull; make -f Mborland'. If you use the Borland IDE, set
the ANSI option in Options:Project:Compiler:Source:Language-compliance.
Qhull may compile with Borland C++ 4.02 for Win32 and DOS Power Pack.
Use 'cd src/libqhull; make -f Mborland -D_DPMI'. Qhull 1.0 compiles with
Borland C++ 4.02. For rbox 1.0, use "bcc32 -WX -w- -O2-e -erbox -lc rbox.c".
Use the same options for Qhull 1.0. [D. Zwick]
If you have troubles with the memory manager, you can turn it off by
defining qh_NOmem in mem.h.
-----------------
Distributed files
README.txt // Instructions for installing Qhull
REGISTER.txt // Qhull registration
COPYING.txt // Copyright notice
QHULL-GO.lnk // Windows icon for eg/qhull-go.bat
Announce.txt // Announcement
CMakeLists.txt // CMake build file (2.6 or later)
CMakeModules/CheckLFS.cmake // enables Large File Support in cmake
File_id.diz // Package descriptor
index.htm // Home page
Makefile // Makefile for gcc and other compilers
qhull*.md5sum // md5sum for all files
bin/* // Qhull executables and dll (.zip only)
build/qhull*.pc.in // pkg-config templates for qhull_r, qhull, and qhull_p
build/qhull-32.sln // 32-bit DevStudio solution and project files (2010 and later)
build/*-32.vcxproj
build/qhull-64.sln // 64-bit DevStudio solution and project files (2010 and later)
build/*-64.vcxproj
build/qhull.sln // DevStudio solution and project files (2005 and 2009)
build/*.vcproj
eg/* // Test scripts and geomview files from q_eg
html/index.htm // Manual
html/qh-faq.htm // Frequently asked questions
html/qh-get.htm // Download page
html/qhull-cpp.xml // C++ style notes as a Road FAQ (www.qhull.org/road)
src/Changes.txt // Change history for Qhull and rbox
src/qhull-all.pro // Qt project
eg/
q_eg // shell script for Geomview examples (eg.01.cube)
q_egtest // shell script for Geomview test examples
q_test // shell script to test qhull
q_test-ok.txt // output from q_test
qhulltest-ok.txt // output from qhulltest (Qt only)
make-vcproj.sh // bash shell script to create vcproj and vcxprog files
qhull-zip.sh // bash shell script for distribution files
rbox consists of (bin, html):
rbox.exe // Win32 executable (.zip only)
rbox.htm // html manual
rbox.man // Unix man page
rbox.txt
qhull consists of (bin, html):
qconvex.exe // Win32 executables and dlls (.zip download only)
qhull.exe // Built with the reentrant library (about 2% slower)
qdelaunay.exe
qhalf.exe
qvoronoi.exe
qhull_r.dll
qhull-go.bat // command window
qconvex.htm // html manual
qdelaun.htm
qdelau_f.htm
qhalf.htm
qvoronoi.htm
qvoron_f.htm
qh-eg.htm
qh-code.htm
qh-impre.htm
index.htm
qh-opt*.htm
qh-quick.htm
qh--*.gif // images for manual
normal_voronoi_knauss_oesterle.jpg
qhull.man // Unix man page
qhull.txt
bin/
msvcr80.dll // Visual C++ redistributable file (.zip download only)
src/
qhull/unix.c // Qhull and rbox applications using non-reentrant libqhullstatic.a
rbox/rbox.c
qconvex/qconvex.c
qhalf/qhalf.c
qdelaunay/qdelaunay.c
qvoronoi/qvoronoi.c
qhull/unix_r.c // Qhull and rbox applications using reentrant libqhullstatic_r.a
rbox/rbox_r.c
qconvex/qconvex_r.c // Qhull applications built with reentrant libqhull_r/Makefile
qhalf/qhalf_r.c
qdelaunay/qdelaun_r.c
qvoronoi/qvoronoi_r.c
user_eg/user_eg_r.c // example of using qhull_r.dll from a user program
user_eg2/user_eg2_r.c // example of using libqhullstatic_r.a from a user program
user_eg3/user_eg3_r.cpp // example of Qhull's C++ interface libqhullcpp with libqhullstatic_r.a
qhulltest/qhulltest.cpp // Test of Qhull's C++ interface using Qt's QTestLib
qhull-*.pri // Include files for Qt projects
testqset_r/testqset_r.c // Test of reentrant qset_r.c and mem_r.c
testqset/testqset.c // Test of non-rentrant qset.c and mem.c
src/libqhull
libqhull.pro // Qt project for non-rentrant, shared library (qhull.dll)
index.htm // design documentation for libqhull
qh-*.htm
qhull-exports.def // Export Definition file for Visual C++
Makefile // Simple gcc Makefile for qhull and libqhullstatic.a
Mborland // Makefile for Borland C++ 5.0
libqhull.h // header file for qhull
user.h // header file of user definable constants
libqhull.c // Quickhull algorithm with partitioning
user.c // user re-definable functions
usermem.c
userprintf.c
userprintf_rbox.c
qhull_a.h // include files for libqhull/*.c
geom.c // geometric routines
geom2.c
geom.h
global.c // global variables
io.c // input-output routines
io.h
mem.c // memory routines, this is stand-alone code
mem.h
merge.c // merging of non-convex facets
merge.h
poly.c // polyhedron routines
poly2.c
poly.h
qset.c // set routines, this only depends on mem.c
qset.h
random.c // utilities w/ Park & Miller's random number generator
random.h
rboxlib.c // point set generator for rbox
stat.c // statistics
stat.h
src/libqhull_r
libqhull_r.pro // Qt project for rentrant, shared library (qhull_r.dll)
index.htm // design documentation for libqhull_r
qh-*_r.htm
qhull-exports_r.def // Export Definition file for Visual C++
Makefile // Simple gcc Makefile for qhull and libqhullstatic.a
libqhull_r.h // header file for qhull
user_r.h // header file of user definable constants
libqhull_r.c // Quickhull algorithm wi_r.hpartitioning
user_r.c // user re-definable functions
usermem.c
userprintf.c
userprintf_rbox.c
qhull_ra.h // include files for libqhull/*_r.c
geom_r.c // geometric routines
geom2.c
geom_r.h
global_r.c // global variables
io_r.c // input-output routines
io_r.h
mem_r.c // memory routines, this is stand-alone code
mem.h
merge_r.c // merging of non-convex facets
merge.h
poly_r.c // polyhedron routines
poly2.c
poly_r.h
qset_r.c // set routines, this only depends on mem_r.c
qset.h
random_r.c // utilities w/ Park & Miller's random number generator
random.h
rboxlib_r.c // point set generator for rbox
stat_r.c // statistics
stat.h
src/libqhullcpp/
libqhullcpp.pro // Qt project for renentrant, static C++ library
Qhull.cpp // Calls libqhull_r.c from C++
Qhull.h
qt-qhull.cpp // Supporting methods for Qt
Coordinates.cpp // input classes
Coordinates.h
PointCoordinates.cpp
PointCoordinates.h
RboxPoints.cpp // call rboxlib.c from C++
RboxPoints.h
QhullFacet.cpp // data structure classes
QhullFacet.h
QhullHyperplane.cpp
QhullHyperplane.h
QhullPoint.cpp
QhullPoint.h
QhullQh.cpp
QhullRidge.cpp
QhullRidge.h
QhullVertex.cpp
QhullVertex.h
QhullFacetList.cpp // collection classes
QhullFacetList.h
QhullFacetSet.cpp
QhullFacetSet.h
QhullIterator.h
QhullLinkedList.h
QhullPoints.cpp
QhullPoints.h
QhullPointSet.cpp
QhullPointSet.h
QhullSet.cpp
QhullSet.h
QhullSets.h
QhullVertexSet.cpp
QhullVertexSet.h
functionObjects.h // supporting classes
QhullError.cpp
QhullError.h
QhullQh.cpp
QhullQh.h
QhullStat.cpp
QhullStat.h
RoadError.cpp // Supporting base classes
RoadError.h
RoadLogEvent.cpp
RoadLogEvent.h
usermem_r-cpp.cpp // Optional override for qh_exit() to throw an error
src/libqhullstatic/
libqhullstatic.pro // Qt project for non-reentrant, static library
src/libqhullstatic_r/
libqhullstatic_r.pro // Qt project for reentrant, static library
src/qhulltest/
qhulltest.pro // Qt project for test of C++ interface
Coordinates_test.cpp // Test of each class
PointCoordinates_test.cpp
Qhull_test.cpp
QhullFacet_test.cpp
QhullFacetList_test.cpp
QhullFacetSet_test.cpp
QhullHyperplane_test.cpp
QhullLinkedList_test.cpp
QhullPoint_test.cpp
QhullPoints_test.cpp
QhullPointSet_test.cpp
QhullRidge_test.cpp
QhullSet_test.cpp
QhullVertex_test.cpp
QhullVertexSet_test.cpp
RboxPoints_test.cpp
RoadTest.cpp // Run multiple test files with QTestLib
RoadTest.h
-----------------
Authors:
C. Bradford Barber Hannu Huhdanpaa (Version 1.0)
bradb@shore.net hannu@qhull.org
Qhull 1.0 and 2.0 were developed under NSF grants NSF/DMS-8920161
and NSF-CCR-91-15793 750-7504 at the Geometry Center and Harvard
University. If you find Qhull useful, please let us know.

View File

@ -1,32 +0,0 @@
Dear Qhull User
We would like to find out how you are using our software. Think of
Qhull as a new kind of shareware: you share your science and successes
with us, and we share our software and support with you.
If you use Qhull, please send us a note telling
us what you are doing with it.
We need to know:
(1) What you are working on - an abstract of your work would be
fine.
(2) How Qhull has helped you, for example, by increasing your
productivity or allowing you to do things you could not do
before. If Qhull had a direct bearing on your work, please
tell us about this.
We encourage you to cite Qhull in your publications.
To cite Qhull, please use
Barber, C.B., Dobkin, D.P., and Huhdanpaa, H.T., "The Quickhull
algorithm for convex hulls," ACM Trans. on Mathematical Software,
22(4):469-483, Dec 1996, http://www.qhull.org.
Please send e-mail to
bradb@shore.net
Thank you!

View File

@ -1,935 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Qhull manual</title>
<!-- Navigation links
NOTE -- verify all links by 'grep href=' 'grep name=' add # 'sort /+7'
index.htm
-->
</head>
<body>
<p><a name="TOP"><b>Up:</b></a> <a
href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b><a
href="http://www.qhull.org/news">News</a> about Qhull<br>
<b>Up:</b> <a href="http://www.qhull.org/html/qh-faq.htm">FAQ</a> about Qhull<br>
<b>To:</b> <a href="#TOC">Qhull manual: Table of Contents</a>
(please wait while loading) <br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<hr>
<!-- Main text of document -->
<h1><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/fixed.html"><img
src="qh--rand.gif" alt="[random-fixed]" align="middle"
width="100" height="100"></a> Qhull manual </h1>
<p>Qhull is a general dimension code for computing convex hulls,
Delaunay triangulations, halfspace intersections about a point, Voronoi
diagrams, furthest-site Delaunay triangulations, and
furthest-site Voronoi diagrams. These structures have
applications in science, engineering, statistics, and
mathematics. See <a
href="http://www.cs.mcgill.ca/~fukuda/soft/polyfaq/polyfaq.html">Fukuda's
introduction</a> to convex hulls, Delaunay triangulations,
Voronoi diagrams, and linear programming. For a detailed
introduction, see O'Rourke [<a href="#orou94">'94</a>], <i>Computational
Geometry in C</i>.
</p>
<p>There are six programs. Except for rbox, they use
the same code. Each program includes instructions and examples.
<blockquote>
<ul>
<li><a href="qconvex.htm">qconvex</a> -- convex hulls
<li><a href="qdelaun.htm">qdelaunay</a> -- Delaunay triangulations and
furthest-site Delaunay triangulations
<li><a href="qhalf.htm">qhalf</a> -- halfspace intersections about a point
<li><a href="qhull.htm">qhull</a> -- all structures with additional options
<li><a href="qvoronoi.htm">qvoronoi</a> -- Voronoi diagrams and
furthest-site Voronoi diagrams
<li><a href="rbox.htm">rbox</a> -- generate point distributions for qhull
</ul>
</blockquote>
<p>Qhull implements the Quickhull algorithm for computing the
convex hull. Qhull includes options
for hull volume, facet area, multiple output formats, and
graphical output. It can approximate a convex hull. </p>
<p>Qhull handles roundoff errors from floating point
arithmetic. It generates a convex hull with "thick" facets.
A facet's outer plane is clearly above all of the points;
its inner plane is clearly below the facet's vertices. Any
exact convex hull must lie between the inner and outer plane.
<p>Qhull uses merged facets, triangulated output, or joggled
input. Triangulated output triangulates non-simplicial, merged
facets. Joggled input also
guarantees simplicial output, but it
is less accurate than merged facets. For merged facets, Qhull
reports the maximum outer and inner plane.
<p><i>Brad Barber, Arlington, MA</i></p>
<p><b>Copyright &copy; 1995-2015 C.B. Barber</b></p>
<hr>
<h2><a href="#TOP">&#187;</a><a name="TOC">Qhull manual: Table of
Contents </a></h2>
<ul>
<li><a href="#when">When</a> to use Qhull
<ul>
<li><a href="http://www.qhull.org/news">News</a> for Qhull
with new features and reported bugs.
<li><a href="http://www.qhull.org">Home</a> for Qhull with additional URLs
(<a href=index.htm>local copy</a>)
<li><a href="http://www.qhull.org/html/qh-faq.htm">FAQ</a> for Qhull (<a href="qh-faq.htm">local copy</a>)
<li><a href="http://www.qhull.org/download">Download</a> Qhull (<a href=qh-get.htm>local copy</a>)
<li><a href="qh-quick.htm#programs">Quick</a> reference for Qhull and its <a href="qh-quick.htm#options">options</a>
<p>
<li><a href="../COPYING.txt">COPYING.txt</a> - copyright notice<br>
<li><a href="../REGISTER.txt">REGISTER.txt</a> - registration<br>
<li><a href="../README.txt">README.txt</a> - installation
instructions<br>
<li><a href="../src/Changes.txt">Changes.txt</a> - change history <br>
<li><a href="qhull.txt">qhull.txt</a> - Unix manual page
</ul>
<p>
<li><a href="#description">Description</a> of Qhull
<ul>
<li><a href="#definition">de</a>finition &#149; <a
href="#input">in</a>put &#149; <a href="#output">ou</a>tput
&#149; <a href="#algorithm">al</a>gorithm &#149; <a
href="#structure">da</a>ta structure </li>
<li><a href="qh-impre.htm">Imprecision</a> in Qhull</li>
<li><a href="qh-impre.htm#joggle">Merged facets</a> or joggled input
<li><a href="qh-eg.htm">Examples</a> of Qhull</li>
</ul>
<p>
<li><a href=qh-quick.htm#programs>Qhull programs</a>, with instructions and examples
<ul>
<li><a href="qconvex.htm">qconvex</a> -- convex hulls
<li><a href="qdelaun.htm">qdelaunay</a> -- Delaunay triangulations and
furthest-site Delaunay triangulations
<li><a href="qhalf.htm">qhalf</a> -- halfspace intersections about a point
<li><a href="qhull.htm">qhull</a> -- all structures with additional options
<li><a href="qvoronoi.htm">qvoronoi</a> -- Voronoi diagrams and
furthest-site Voronoi diagrams
<li><a href="rbox.htm">rbox</a> -- generate point distributions for qhull
</ul>
<p>
<li><a href="qh-quick.htm#options">Qhull options</a><ul>
<li><a href="qh-opto.htm#output">Output</a> formats</li>
<li><a href="qh-optf.htm#format">Additional</a> I/O
formats</li>
<li><a href="qh-optg.htm#geomview">Geomview</a>
output options</li>
<li><a href="qh-optp.htm#print">Print</a> options</li>
<li><a href="qh-optq.htm#qhull">Qhull</a> control
options</li>
<li><a href="qh-optc.htm#prec">Precision</a> options</li>
<li><a href="qh-optt.htm#trace">Trace</a> options</li>
</ul>
</li>
<p>
<li><a href="#geomview">Geomview</a>, Qhull's graphical viewer</li>
<ul>
<li><a href="#geomview-install">Installing Geomview</a></li>
<li><a href="#geomview-use">Using Geomview</a></li>
<li><a href="#geomview-win">Building Geomview for Windows</a></li>
</ul>
<p>
<li><a href="qh-code.htm">Qhull internals</a><ul>
<li><a href="qh-code.htm#reentrant">Reentrant</a> Qhull</li>
<li><a href="qh-code.htm#convert">How to convert</a> code to reentrant Qhull</li>
<li><a href="qh-code.htm#64bit">Qhull</a> on 64-bit computers</li>
<li><a href="qh-code.htm#cpp">Calling</a> Qhull
from C++ programs</li>
<li><a href="qh-code.htm#library">Calling</a> Qhull
from C programs</li>
<li><a href="qh-code.htm#performance">Performance</a>
of Qhull</li>
<li><a href="qh-code.htm#enhance">Enhancements</a> to
Qhull</li>
<li><a href="../src/libqhull_r/index.htm">Reentrant</a> Qhull functions, macros, and
data structures </li>
<li><a href="../src/libqhull/index.htm">Qhull</a> functions, macros, and
data structures </li>
</ul>
</li>
<p>
<li>Related URLs
<ul>
<li><a href="news:comp.graphics.algorithms">Newsgroup</a>:
comp.graphics.algorithms
<li><a
href="http://www.faqs.org/faqs/graphics/algorithms-faq/">FAQ</a> for computer graphics algorithms and
Exaflop's <a href="http://exaflop.org/docs/cgafaq/cga6.html">geometric</a> structures.
<li>Amenta's <a href="http://www.geom.uiuc.edu/software/cglist">Directory
of Computational Geometry Software </a></li>
<li>Erickson's <a
href="http://compgeom.cs.uiuc.edu/~jeffe/compgeom/code.html">Computational
Geometry Software</a> </li>
<li>Fukuda's <a
href="http://www.cs.mcgill.ca/~fukuda/soft/polyfaq/polyfaq.html">
introduction</a> to convex hulls, Delaunay triangulations,
Voronoi diagrams, and linear programming.
<li>Stony Brook's <a
href="http://www.cs.sunysb.edu/~algorith/major_section/1.6.shtml">Algorithm Repository</a> on computational geometry.
</li>
</ul>
<p>
<li><a href="#bugs">What to do</a> if something goes wrong</li>
<li><a href="#email">Email</a></li>
<li><a href="#authors">Authors</a></li>
<li><a href="#ref">References</a></li>
<li><a href="#acknowledge">Acknowledgments</a></li>
</ul>
<h2><a href="#TOC">&#187;</a><a name="when">When to use Qhull</a></h2>
<blockquote>
<p>Qhull constructs convex hulls, Delaunay triangulations,
halfspace intersections about a point, Voronoi diagrams, furthest-site Delaunay
triangulations, and furthest-site Voronoi diagrams.</p>
<p>For convex hulls and halfspace intersections, Qhull may be used
for 2-d upto 8-d. For Voronoi diagrams and Delaunay triangulations, Qhull may be
used for 2-d upto 7-d. In higher dimensions, the size of the output
grows rapidly and Qhull does not work well with virtual memory.
If <i>n</i> is the size of
the input and <i>d</i> is the dimension (d>=3), the size of the output
and execution time
grows by <i>n^(floor(d/2)</i>
[see <a href=qh-code.htm#performance>Performance</a>]. For example, do
not try to build a 16-d convex hull of 1000 points. It will
have on the order of 1,000,000,000,000,000,000,000,000 facets.
<p>On a 600 MHz Pentium 3, Qhull computes the 2-d convex hull of
300,000 cocircular points in 11 seconds. It computes the
2-d Delaunay triangulation and 3-d convex hull of 120,000 points
in 12 seconds. It computes the
3-d Delaunay triangulation and 4-d convex hull of 40,000 points
in 18 seconds. It computes the
4-d Delaunay triangulation and 5-d convex hull of 6,000 points
in 12 seconds. It computes the
5-d Delaunay triangulation and 6-d convex hull of 1,000 points
in 12 seconds. It computes the
6-d Delaunay triangulation and 7-d convex hull of 300 points
in 15 seconds. It computes the
7-d Delaunay triangulation and 8-d convex hull of 120 points
in 15 seconds. It computes the
8-d Delaunay triangulation and 9-d convex hull of 70 points
in 15 seconds. It computes the
9-d Delaunay triangulation and 10-d convex hull of 50 points
in 17 seconds. The 10-d convex hull of 50 points has about 90,000 facets.
<!-- duplicated in index.htm and html/index.htm -->
<p>Qhull does <i>not</i> support constrained Delaunay
triangulations, triangulation of non-convex surfaces, mesh
generation of non-convex objects, or medium-sized inputs in 9-D
and higher. </p>
<p>This is a big package with many options. It is one of the
fastest available. It is the only 3-d code that handles precision
problems due to floating point arithmetic. For example, it
implements the identity function for extreme points (see <a
href="qh-impre.htm">Imprecision in Qhull</a>). </p>
<p>[2016] A newly discovered, bad case for Qhull is multiple, nearly incident points within a 10^-13 ball of 3-d and higher
Delaunay triangulations (input sites in the unit cube). Nearly incident points within substantially
smaller or larger balls are OK. Error QH6271 is reported if a problem occurs. A future release of Qhull
will handle this case. For more information, see "Nearly coincident points on an edge" in <a href="../html/qh-impre.htm#limit">Limitations of merged facets</a>
<p>If you need a short code for convex hull, Delaunay
triangulation, or Voronoi volumes consider Clarkson's <a
href="http://www.netlib.org/voronoi/hull.html">hull
program</a>. If you need 2-d Delaunay triangulations consider
Shewchuk's <a href="http://www.cs.cmu.edu/~quake/triangle.html">triangle
program</a>. It is much faster than Qhull and it allows
constraints. Both programs use exact arithmetic. They are in <a
href="http://www.netlib.org/voronoi/">http://www.netlib.org/voronoi/</a>.
<p>If your input is in general position (i.e., no coplanar or colinear points),
<li><a href="https://github.com/tomilov/quickhull/blob/master/include/quickhull.hpp">Tomilov's quickhull.hpp</a> (<a href"http://habrahabr.ru/post/245221/"documentation-ru</a/>)
or Qhull <a
href="http://www.qhull.org/download">version
1.0</a> may meet your needs. Both programs detect precision problems,
but do not handle them.</p>
<p><a href=http://www.cgal.org>CGAL</a> is a library of efficient and reliable
geometric algorithms. It uses C++ templates and the Boost library to produce dimension-specific
code. This allows more efficient use of memory than Qhull's general-dimension
code. CGAL simulates arbitrary precision while Qhull handles round-off error
with thick facets. Compare the two approaches with <a href="http://doc.cgal.org/latest/Manual/devman_robustness.html">Robustness Issues in CGAL</a>,
and <a href+"qh-impre.htm">Imprecision in Qhull</a>.
<p><a href=http://www.algorithmic-solutions.com/enleda.htm>Leda</a> is a
library for writing computational
geometry programs and other combinatorial algorithms. It
includes routines for computing 3-d convex
hulls, 2-d Delaunay triangulations, and 3-d Delaunay triangulations.
It provides rational arithmetic and graphical output. It runs on most
platforms.
<p>If your problem is in high dimensions with a few,
non-simplicial facets, try Fukuda's <a
href="http://www.cs.mcgill.ca/~fukuda/soft/cdd_home/cdd.html">cdd</a>.
It is much faster than Qhull for these distributions. </p>
<p>Custom software for 2-d and 3-d convex hulls may be faster
than Qhull. Custom software should use less memory. Qhull uses
general-dimension data structures and code. The data structures
support non-simplicial facets.</p>
<p>Qhull is not suitable for mesh generation or triangulation of
arbitrary surfaces. You may use Qhull if the surface is convex or
completely visible from an interior point (e.g., a star-shaped
polyhedron). First, project each site to a sphere that is
centered at the interior point. Then, compute the convex hull of
the projected sites. The facets of the convex hull correspond to
a triangulation of the surface. For mesh generation of arbitrary
surfaces, see <a
href="http://www.robertschneiders.de/meshgeneration/meshgeneration.html">Schneiders'
Finite Element Mesh Generation</a>.</p>
<p>Qhull is not suitable for constrained Delaunay triangulations.
With a lot of work, you can write a program that uses Qhull to
add constraints by adding additional points to the triangulation.</p>
<p>Qhull is not suitable for the subdivision of arbitrary
objects. Use <tt>qdelaunay</tt> to subdivide a convex object.</p>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="description">Description of
Qhull </a></h2>
<blockquote>
<h3><a href="#TOC">&#187;</a><a name="definition">definition</a></h3>
<blockquote>
<p>The <i>convex hull</i> of a point set <i>P</i> is the smallest
convex set that contains <i>P</i>. If <i>P</i> is finite, the
convex hull defines a matrix <i>A</i> and a vector <i>b</i> such
that for all <i>x</i> in <i>P</i>, <i>Ax+b &lt;= [0,...]</i>. </p>
<p>Qhull computes the convex hull in 2-d, 3-d, 4-d, and higher
dimensions. Qhull represents a convex hull as a list of facets.
Each facet has a set of vertices, a set of neighboring facets,
and a halfspace. A halfspace is defined by a unit normal and an
offset (i.e., a row of <i>A</i> and an element of <i>b</i>). </p>
<p>Qhull accounts for round-off error. It returns
&quot;thick&quot; facets defined by two parallel hyperplanes. The
outer planes contain all input points. The inner planes exclude
all output vertices. See <a href="qh-impre.htm#imprecise">Imprecise
convex hulls</a>.</p>
<p>Qhull may be used for the Delaunay triangulation or the
Voronoi diagram of a set of points. It may be used for the
intersection of halfspaces. </p>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="input">input format</a></h3>
<blockquote>
<p>The input data on <tt>stdin</tt> consists of:</p>
<ul>
<li>first line contains the dimension</li>
<li>second line contains the number of input points</li>
<li>remaining lines contain point coordinates</li>
</ul>
<p>For example: </p>
<pre>
3 #sample 3-d input
5
0.4 -0.5 1.0
1000 -1e-5 -100
0.3 0.2 0.1
1.0 1.0 1.0
0 0 0
</pre>
<p>Input may be entered by hand. End the input with a control-D
(^D) character. </p>
<p>To input data from a file, use I/O redirection or '<a
href="qh-optt.htm#TI">TI file</a>'. The filename may not
include spaces or quotes.</p>
<p>A comment starts with a non-numeric character and continues to
the end of line. The first comment is reported in summaries and
statistics. With multiple <tt>qhull</tt> commands, use option '<a
href="qh-optf.htm#FQ">FQ</a>' to place a comment in the output.</p>
<p>The dimension and number of points can be reversed. Comments
and line breaks are ignored. Error reporting is better if there
is one point per line.</p>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="option">option format</a></h3>
<blockquote>
<p>Use options to specify the output formats and control
Qhull. The <tt>qhull</tt> program takes all options. The
other programs use a subset of the options. They disallow
experimental and inappropriate options.
<blockquote>
<ul>
<li>
qconvex == qhull
<li>
qdelaunay == qhull d Qbb
<li>
qhalf == qhull H
<li>
qvoronoi == qhull v Qbb
</ul>
</blockquote>
<p>Single letters are used for output formats and precision
constants. The other options are grouped into menus for formats
('<a href="qh-optf.htm#format">F</a>'), Geomview ('<a
href="qh-optg.htm#geomview">G </a>'), printing ('<a
href="qh-optp.htm#print">P</a>'), Qhull control ('<a
href="qh-optq.htm#qhull">Q </a>'), and tracing ('<a
href="qh-optt.htm#trace">T</a>'). The menu options may be listed
together (e.g., 'GrD3' for 'Gr' and 'GD3'). Options may be in any
order. Capitalized options take a numeric argument (except for '<a
href="qh-optp.htm#PG">PG</a>' and '<a href="qh-optf.htm#format">F</a>'
options). Use option '<a href="qh-optf.htm#FO">FO</a>' to print
the selected options.</p>
<p>Qhull uses zero-relative indexing. If there are <i>n</i>
points, the index of the first point is <i>0</i> and the index of
the last point is <i>n-1</i>.</p>
<p>The default options are:</p>
<ul>
<li>summary output ('<a href="qh-opto.htm#s">s</a>') </li>
<li>merged facets ('<a href="qh-optc.htm#C0">C-0</a>' in 2-d,
3-d, 4-d; '<a href="qh-optq.htm#Qx">Qx</a>' in 5-d and
up)</li>
</ul>
<p>Except for bounding box
('<a href="qh-optq.htm#Qbk">Qbk:n</a>', etc.), drop facets
('<a href="qh-optp.htm#Pdk">Pdk:n</a>', etc.), and
Qhull command ('<a href="qh-optf.htm#FQ">FQ</a>'), only the last
occurence of an option counts.
Bounding box and drop facets may be repeated for each dimension.
Option 'FQ' may be repeated any number of times.
<p>The Unix <tt>tcsh</tt> and <tt>ksh </tt>shells make it easy to
try out different options. In Windows 95, use a command window with <tt>doskey</tt>
and a window scroller (e.g., <tt>peruse</tt>). </p>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="output">output format</a></h3>
<blockquote>
<p>To write the results to a file, use I/O redirection or '<a
href="qh-optt.htm#TO">TO file</a>'. Windows 95 users should use
'TO file' or the console. If a filename is surrounded by single quotes,
it may include spaces.
</p>
<p>The default output option is a short summary ('<a
href="qh-opto.htm#s">s</a>') to <tt>stdout</tt>. There are many
others (see <a href="qh-opto.htm">output</a> and <a
href="qh-optf.htm">formats</a>). You can list vertex incidences,
vertices and facets, vertex coordinates, or facet normals. You
can view Qhull objects with Geomview, Mathematica, or Maple. You can
print the internal data structures. You can call Qhull from your
application (see <a href="qh-code.htm#library">Qhull library</a>).</p>
<p>For example, 'qhull <a href="qh-opto.htm#o">o</a>' lists the
vertices and facets of the convex hull. </p>
<p>Error messages and additional summaries ('<a
href="qh-opto.htm#s">s</a>') go to <tt>stderr</tt>. Unless
redirected, <tt>stderr</tt> is the console.</p>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="algorithm">algorithm</a></h3>
<blockquote>
<p>Qhull implements the Quickhull algorithm for convex hull
[Barber et al. <a href="#bar-dob96">'96</a>]. This algorithm
combines the 2-d Quickhull algorithm with the <em>n</em>-d
beneath-beyond algorithm [c.f., Preparata &amp; Shamos <a
href="#pre-sha85">'85</a>]. It is similar to the randomized
algorithms of Clarkson and others [Clarkson &amp; Shor <a
href="#cla-sho89">'89</a>; Clarkson et al. <a href="#cla-meh93">'93</a>;
Mulmuley <a href="#mulm94">'94</a>]. For a demonstration, see <a
href="qh-eg.htm#how">How Qhull adds a point</a>. The main
advantages of Quickhull are output sensitive performance (in
terms of the number of extreme points), reduced space
requirements, and floating-point error handling. </p>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="structure">data structures</a></h3>
<blockquote>
<p>Qhull produces the following data structures for dimension <i>d</i>:
</p>
<ul>
<li>A <em>coordinate</em> is a real number in floating point
format. </li>
<li>A <em>point</em> is an array of <i>d</i> coordinates.
With option '<a href="qh-optq.htm#QJn">QJ</a>', the
coordinates are joggled by a small amount. </li>
<li>A <em>vertex</em> is an input point. </li>
<li>A <em>hyperplane</em> is <i>d</i> normal coefficients and
an offset. The length of the normal is one. The
hyperplane defines a halfspace. If <i>V</i> is a normal, <i>b</i>
is an offset, and <i>x</i> is a point inside the convex
hull, then <i>Vx+b &lt;0</i>.</li>
<li>An <em>outer plane</em> is a positive
offset from a hyperplane. When Qhull is done, all points
will be below all outer planes.</li>
<li>An <em>inner plane</em> is a negative
offset from a hyperplane. When Qhull is done, all
vertices will be above the corresponding inner planes.</li>
<li>An <em>orientation</em> is either 'top' or 'bottom'. It is the
topological equivalent of a hyperplane's geometric
orientation. </li>
<li>A <em>simplicial facet</em> is a set of
<i>d</i> neighboring facets, a set of <i>d</i> vertices, a
hyperplane equation, an inner plane, an outer plane, and
an orientation. For example in 3-d, a simplicial facet is
a triangle. </li>
<li>A <em>centrum</em> is a point on a facet's hyperplane. A
centrum is the average of a facet's vertices. Neighboring
facets are <em>convex</em> if each centrum is below the
neighbor facet's hyperplane. </li>
<li>A <em>ridge</em> is a set of <i>d-1</i> vertices, two
neighboring facets, and an orientation. For example in
3-d, a ridge is a line segment. </li>
<li>A <em>non-simplicial facet</em> is a set of ridges, a
hyperplane equation, a centrum, an outer plane, and an
inner plane. The ridges determine a set of neighboring
facets, a set of vertices, and an orientation. Qhull
produces a non-simplicial facet when it merges two facets
together. For example, a cube has six non-simplicial
facets. </li>
</ul>
<p>For examples, use option '<a href="qh-opto.htm#f">f</a>'. See <a
href="../src/libqhull/qh-poly.htm">polyhedron operations</a> for further
design documentation. </p>
</blockquote>
<h3><a href="#TOC">&#187;</a>Imprecision in Qhull</h3>
<blockquote>
<p>See <a href="qh-impre.htm">Imprecision in Qhull</a> and <a href="qh-impre.htm#joggle">Merged facets or joggled input</a></p>
</blockquote>
<h3><a href="#TOC">&#187;</a>Examples of Qhull</h3>
<blockquote>
<p>See <a href="qh-eg.htm">Examples of Qhull</a>. Most of these examples require <a href="#geomview">Geomview</a>.
Some of the examples have <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/welcome.html">pictures
</a>.</p>
</blockquote>
</blockquote>
<h2><a href="#TOC">&#187;</a>Options for using Qhull </h2>
<blockquote>
<p>See <a href="qh-quick.htm#options">Options</a>.</p>
</blockquote>
<h2><a href="#TOC">&#187;</a>Qhull internals </h2>
<blockquote>
<p>See <a href="qh-code.htm">Internals</a>.</p>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="geomview">Geomview, Qhull's
graphical viewer</a></h2>
<blockquote>
<p><a href="http://www.geomview.org">Geomview</a>
is an interactive geometry viewing program.
Geomview provides a good visualization of Qhull's 2-d and 3-d results.
<p>Qhull includes <a href="qh-eg.htm">Examples of Qhull</a> that may be viewed with Geomview.
<p>Geomview can help visulalize a 3-d Delaunay triangulation or the surface of a 4-d convex hull,
Use option '<a href="qh-optq.htm#QVn">QVn</a>' to select the 3-D facets adjacent to a vertex.
<p>You may use Geomview to create movies that animate your objects (c.f., <a href="http://www.geomview.org/FAQ/answers.shtml#mpeg">How can I create a video animation?</a>).
Geomview helped create the <a href="http://www.geom.uiuc.edu/video/">mathematical videos</a> "Not Knot", "Outside In", and "The Shape of Space" from the Geometry Center.
<h3><a href="#TOC">&#187;</a><a name="geomview-install">Installing Geomview</a></h3>
<blockquote>
<p>Geomview is an <a href=http://sourceforge.net/projects/geomview>open source project</a>
under SourceForge.
<p>
For build instructions see
<a href="http://www.geomview.org/download/">Downloading Geomview</a>.
Geomview builds under Linux, Unix, Macintosh OS X, and Windows.
<p>Geomview has <a href="https://packages.debian.org/search?keywords=geomview">installable packages</a> for Debian and Ubuntu.
The OS X build needs Xcode, an X11 SDK, and Lesstif or Motif.
The Windows build uses Cygwin (see <a href="#geomview-win">Building Geomview</a> below for instructions).
<p>If using Xforms (e.g., for Geomview's <a href="http://www.geomview.org/docs/html/Modules.html">External Modules</a>), install the 'libXpm-devel' package from cygwin and move the xforms directory into your geomview directory, e.g.,<br><tt>mv xforms-1.2.4 geomview-1.9.5/xforms</tt>
<p>Geomview's <a href="http://www.geom.uiuc.edu/software/geomview/docs/NDview/manpagehelp.html">ndview<a/> provides multiple views into 4-d and higher objects.
This module is out-of-date (<a href="http://sourceforge.net/p/geomview/mailman/message/2004152/">geomview-users: 4dview</a>).
Download NDview-sgi.tar.Z at <a href="ftp://www.geom.uiuc.edu/pub/software/geomview/newpieces/sgi">newpieces</a> and 4dview at <a href="https://stuff.mit.edu/afs/sipb/project/3d/arch/sgi_62/lib/Geomview/modules/">Geomview/modules</a>.
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="geomview-use">Using Geomview</a></h3>
<blockquote>
<p>Use Geomview to view <a href="qh-eg.htm">Examples of Qhull</a>. You can spin the convex hull, fly a camera through its facets,
and see how Qhull produces thick facets in response to round-off error.
<p>Follow these instructions to view 'eg,01.cube' from Examples of Qhull
<ol>
<li>Launch an XTerm command shell
<ul>
<li>If needed, start the X terminal server, Use 'xinit' or 'startx' in /usr/X11R6/bin<br><tt>xinit -- -multiwindow -clipboard</tt><br><tt>startx</tt>
<li>Start an XTerm command shell. In Windows, click the Cygwin/bash icon on your desktop.
<li>Set the DISPLAY variable, e.g.,<br><tt>export DISPLAY=:0</tt><br><tt>export DISPLAY=:0 >>~/.bashenv</tt>
</ul>
<li>Use Qhull's <a href="qh-optg.htm">Geomview options</a> to create a geomview object
<ul>
<li><tt>rbox c D3 | qconvex G >eg.01.cube</tt>
<li>On windows, convert the output to Unix text format with 'd2u'<br><tt>rbox c D3 | qconvex G | d2u >eg.01.cube</tt><br><tt>d2u eg.*</tt>
</ul>
<li>Run Geomview
<ul>
<li>Start Geomview with your example<br><tt>./geomview eg.01.cube</tt>
<li>Follow the instructions in <a href="http://www.geomview.org/docs/html/Tutorial.html">Gemoview Tutorial</a>
<li>Geomview creates the <i>Geomview control panel</i> with Targets and External Module, the <i>Geomview toolbar</i> with buttons for controlling Geomview, and the <i>Geomview camera window</i> showing a cube.
<li>Clear the camera window by selecting your object in the Targets list and 'Edit > Delete' or 'dd'
<li>Load the <i>Geomview files panel</i>. Select 'Open' in the 'File' menu.
<li>Set 'Filter' in the files panel to your example directory followed by '/*' (e.g., '/usr/local/qhull-2015.2/eg/*')
<li>Click 'Filter' in the files panel to view your examples in the 'Files' list.
<li>Load another example into the camera window by selecting it and clicking 'OK'.
<li>Review the instructions for <a href="http://www.geomview.org/docs/html/Interaction.html">Interacting with Geomview</a>
<li>When viewing multiple objects at once, you may want to turn off normalization. In the 'Inspect > Apperance' control panel, set 'Normalize' to 'None'.
</ul>
</ol>
<p>Geomview defines GCL (a textual API for controlling Geomview) and OOGL (a textual file format for defining objects).
<ul>
<li>To control Geomview, you may use any program that reads and writes from stdin and stdout. For example, it could report Qhull's information about a vertex identified by a double-click 'pick' event.
<li><a href="http://www.geomview.org/docs/html/GCL.html">GCL</a> command language for controlling Geomview
<li><a href="http://www.geomview.org/docs/html/OOGL-File-Formats.html">OOGL</a> file format for defining objects (<a href="http://www.geomview.org/docs/oogltour.html">tutorial</a>).
<li><a href="http://www.geomview.org/docs/html/Modules.html">External Modules</a> for interacting with Geomview via GCL
<li>Interact with your objects via <a href="http://www.geomview.org/docs/html/pick.html">pick</a> commands in response to right-mouse double clicks. Enable pick events with the <a href="http://www.geomview.org/docs/html/interest.html">interest</a> command.
</ul>
</blockquote>
<h3><a href="#TOC">&#187;</a><a name="geomview-win">Building Geomview for Windows</a></h3>
<blockquote>
<p>Compile Geomview under Cygwin. For detailed instructions, see
<a href="http://www.ee.surrey.ac.uk/Personal/L.Wood/software/SaVi/building-under-Windows/"
>Building Savi and Geomview under Windows</a>. These instructions are somewhat out-of-date. Updated
instructions follow.
<p>How to compile Geomview under 32-bit Cygwin (October 2015)</p>
<ol>
<li><b>Note:</b> L. Wood has run into multiple issues with Geomview on Cygwin. He recommends Virtualbox/Ubuntu
and a one-click install of geomview via the Ubuntu package. See his Savi/Geomview link above.
<li>Install 32-bit <a href="http://cygwin.com/">Cygwin</a> as follows.
For additional guidance, see Cygwin's <a href="https://cygwin.com/install.html">Installing and Updating Cygwin Packages</a>
and <a href="http://www.qhull.org/road/road-faq/xml/cmdline.xml#setup-cygwin">Setup cygwin</a>.
<ul>
<li>Launch the cygwin installer.
<li>Select a mirror from <a href="http://cygwin.com/mirrors.html">Cygwin mirrors</a> (e.g., http://mirrors.kernel.org/sourceware/cygwin/ in California).
<li>Select the packages to install. Besides the cygwin packages listed in the Savi/Windows instructions consider adding
<ul>
<li><b>Default</b> -- libXm-devel (required for /usr/include/Xm/Xm.h)
<li><b>Devel</b> -- bashdb, gcc-core (in place of gcc), gdb
<li><b>Lib</b> -- libGL-devel, libGLU1 (required, obsolete), libGLU-devel (required, obsolete), libjpeg-devel(XForms), libXext-devel (required), libXpm-devel (Xforms)
libGL and lib
<li><b>Math</b> -- bc
<li><b>Net</b> -- autossh, inetutils, openssh
<li><b>System</b> -- chere
<li><b>Utils</b> -- dos2unix (required for qhull), keychain
<li>If installing perl, ActiveState Perl may be a better choice than cygwin's perl. Perl is not used by Geomview or Qhull.
<li><a href="https://cygwin.com/cgi-bin2/package-grep.cgi">Cygwin Package Search</a> -- Search for cygwin programs and packages
</ul>
<li>Click 'Next' to download and install the packages.
<li>If the download is incomplete, try again.
<li>If you try again after a successful install, cygwin will uninstall and reinstall all modules..
<li>Click on the 'Cywin Terminal' icon on the Desktop. It sets up a user directory in /home from /etc/skel/...
<li>Mount your disk drives<br>mount c: /c # Ignore the warning /c does not exist
</ul>
<li>Consider installing the <a href="http://www.qhull.org/bash/doc/road-bash.html">Road Bash</a> scripts (/etc/road-*) from <a href="http://www.qhull.org/road/">Road</a>.
They define aliases and functions for Unix command shells (Unix, Linux, Mac OS X, Windows),
<ul>
<li>Download Road Bash and unzip the downloaded file
<li>Copy .../bash/etc/road-* to the Cywin /etc directory (by default, C:\cygwin\etc).
<li>Using the cygwin terminal, convert the road scripts to Unix format<br>d2u /etc/road-*
<li>Try it<br>source /etc/road-home.bashrc
<li>Install it<br>cp /etc/road-home.bashrc ~/.bashrc
</ul>
<li>Launch the X terminal server from '<tt>Start > All programs > Cygwin-X > Xwin Server</tt>'. Alternatively, run 'startx'
<li>Launch an XTerm shell
<ul>
<li>Right click the Cywin icon on the system tray in the Windows taskbar.
<li>Select '<tt>System Tools > XTerm</tt>'
</ul>
<li>Download and extract Geomview -- <a href="http://www.geomview.org/download/">Downloading Geomview</a>
<li>Compile Geomview
<ul>
<li>./configure
<li>make
</ul>
<li>If './configure' fails, check 'config.log' at the failing step. Look carefully for missing libraries, etc. The <a href="http://www.geomview.org/FAQ/answers.shtml">Geomview FAQ</a> contains suggestions (e.g., "configure claims it can't find OpenGl").
<li>If 'make' fails, read the output carefully for error messages. Usually it is a missing include file or package. Locate and install the missing cygwin packages
(<a href="https://cygwin.com/cgi-bin2/package-grep.cgi">Cygwin Package Search</a>).
</ol>
</blockquote>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="bugs">What to do if something
goes wrong</a></h2>
<blockquote>
<p>Please report bugs to <a href=mailto:qhull_bug@qhull.org>qhull_bug@qhull.org</a>
</a>. Please report if Qhull crashes. Please report if Qhull
generates an &quot;internal error&quot;. Please report if Qhull
produces a poor approximate hull in 2-d, 3-d or 4-d. Please
report documentation errors. Please report missing or incorrect
links.</p>
<p>If you do not understand something, try a small example. The <a
href="rbox.htm">rbox</a> program is an easy way to generate
test cases. The <a href="#geomview">Geomview</a> program helps to
visualize the output from Qhull.</p>
<p>If Qhull does not compile, it is due to an incompatibility
between your system and ours. The first thing to check is that
your compiler is ANSI standard. Qhull produces a compiler error
if __STDC__ is not defined. You may need to set a flag (e.g.,
'-A' or '-ansi').</p>
<p>If Qhull compiles but crashes on the test case (rbox D4),
there's still incompatibility between your system and ours.
Sometimes it is due to memory management. This can be turned off
with qh_NOmem in mem.h. Please let us know if you figure out how
to fix these problems. </p>
<p>If you doubt the output from Qhull, add option '<a
href="qh-optt.htm#Tv">Tv</a>'. It checks that every point is
inside the outer planes of the convex hull. It checks that every
facet is convex with its neighbors. It checks the topology of the
convex hull.</p>
<p>Qhull should work on all inputs. It may report precision
errors if you turn off merged facets with option '<a
href="qh-optq.htm#Q0">Q0</a>'. This can get as bad as facets with
flipped orientation or two facets with the same vertices. You'll
get a long help message if you run into such a case. They are
easy to generate with <tt>rbox</tt>.</p>
<p>If you do find a problem, try to simplify it before reporting
the error. Try different size inputs to locate the smallest one
that causes an error. You're welcome to hunt through the code
using the execution trace ('<a href="qh-optt.htm#Tn">T4</a>') as
a guide. This is especially true if you're incorporating Qhull
into your own program. </p>
<p>When you report an error, please attach a data set to the end
of your message. Include the options that you used with Qhull,
the results of option '<a href="qh-optf.htm#FO">FO</a>', and any
messages generated by Qhull. This allows me to see the error for
myself. Qhull is maintained part-time. </p>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="email">Email</a></h2>
<blockquote>
<p>Please send correspondence to Brad Barber at <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
and report bugs to <a href=mailto:qhull_bug@qhull.org>qhull_bug@qhull.org</a>
</a>. Let me know how you use Qhull. If you mention it in a
paper, please send a reference and abstract.</p>
<p>If you would like to get Qhull announcements (e.g., a new
version) and news (any bugs that get fixed, etc.), let us know
and we will add you to our mailing list. For Internet news about geometric algorithms
and convex hulls, look at comp.graphics.algorithms and
sci.math.num-analysis. For Qhull news look at <a
href="http://www.qhull.org/news">qhull-news.html</a>.</p>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="authors">Authors</a></h2>
<blockquote>
<pre>
C. Bradford Barber Hannu Huhdanpaa
bradb@shore.net hannu@qhull.org
</pre>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="acknowledge">Acknowledgments</a></h2>
<blockquote>
<p>A special thanks to David Dobkin for his guidance. A special
thanks to Albert Marden, Victor Milenkovic, the Geometry Center,
and Harvard University for supporting this work.</p>
<p>A special thanks to Mark Phillips, Robert Miner, and Stuart Levy for running the Geometry
Center web site long after the Geometry Center closed.
Stuart moved the web site to the University of Illinois at Champaign-Urbana.
Mark and Robert are founders of <a href=http://www.geomtech.com>Geometry Technologies</a>.
Mark, Stuart, and Tamara Munzner are the original authors of <a href=http://www.geomview.org>Geomview</a>.
<p>A special thanks to <a href="http://www.endocardial.com/">Endocardial
Solutions, Inc.</a> of St. Paul, Minnesota for their support of the
internal documentation (<a href=../src/libqhull/index.htm>src/libqhull/index.htm</a>). They use Qhull to build 3-d models of
heart chambers.</p>
<p>Qhull 1.0 and 2.0 were developed under National Science Foundation
grants NSF/DMS-8920161 and NSF-CCR-91-15793 750-7504. If you find
it useful, please let us know.</p>
<p>The Geometry Center was supported by grant DMS-8920161 from the
National Science Foundation, by grant DOE/DE-FG02-92ER25137 from
the Department of Energy, by the University of Minnesota, and by
Minnesota Technology, Inc.</p>
</blockquote>
<h2><a href="#TOC">&#187;</a><a name="ref">References</a></h2>
<blockquote>
<p><a name="aure91">Aurenhammer</a>, F., &quot;Voronoi diagrams
-- A survey of a fundamental geometric data structure,&quot; <i>ACM
Computing Surveys</i>, 1991, 23:345-405. </p>
<p><a name="bar-dob96">Barber</a>, C. B., D.P. Dobkin, and H.T.
Huhdanpaa, &quot;The Quickhull Algorithm for Convex Hulls,&quot; <i>ACM
Transactions on Mathematical Software</i>, 22(4):469-483, Dec 1996, www.qhull.org
[<a
href="http://portal.acm.org/citation.cfm?doid=235815.235821">http://portal.acm.org</a>;
<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.117.405">http://citeseerx.ist.psu.edu</a>].
</p>
<p><a name="cla-sho89">Clarkson</a>, K.L. and P.W. Shor,
&quot;Applications of random sampling in computational geometry,
II&quot;, <i>Discrete Computational Geometry</i>, 4:387-421, 1989</p>
<p><a name="cla-meh93">Clarkson</a>, K.L., K. Mehlhorn, and R.
Seidel, &quot;Four results on randomized incremental
construction,&quot; <em>Computational Geometry: Theory and
Applications</em>, vol. 3, p. 185-211, 1993.</p>
<p><a name="devi01">Devillers</a>, et. al.,
"Walking in a triangulation," <i>ACM Symposium on
Computational Geometry</i>, June 3-5,2001, Medford MA.
<p><a name="dob-kir90">Dobkin</a>, D.P. and D.G. Kirkpatrick,
&quot;Determining the separation of preprocessed polyhedra--a
unified approach,&quot; in <i>Proc. 17th Inter. Colloq. Automata
Lang. Program.</i>, in <i>Lecture Notes in Computer Science</i>,
Springer-Verlag, 443:400-413, 1990. </p>
<p><a name="edel01">Edelsbrunner</a>, H, <i>Geometry and Topology for Mesh Generation</i>,
Cambridge University Press, 2001.
<p><a name=gart99>Gartner, B.</a>, "Fast and robust smallest enclosing balls", <i>Algorithms - ESA '99</i>, LNCS 1643.
<p><a name=golub83>Golub, G.H. and van Loan, C.F.</a>, <i>Matric Computations</i>, Baltimore, Maryland, USA: John Hopkins Press, 1983
<p><a name="fort93">Fortune, S.</a>, &quot;Computational
geometry,&quot; in R. Martin, editor, <i>Directions in Geometric
Computation</i>, Information Geometers, 47 Stockers Avenue,
Winchester, SO22 5LB, UK, ISBN 1-874728-02-X, 1993.</p>
<p><a name="mile93">Milenkovic, V.</a>, &quot;Robust polygon
modeling,&quot; Computer-Aided Design, vol. 25, p. 546-566,
September 1993. </p>
<p><a name="muck96">Mucke</a>, E.P., I. Saias, B. Zhu, <i>Fast
randomized point location without preprocessing in Two- and
Three-dimensional Delaunay Triangulations</i>, ACM Symposium on
Computational Geometry, p. 274-283, 1996 [<a
href="http://www.geom.uiuc.edu/software/cglist/GeomDir/">GeomDir</a>].
</p>
<p><a name="mulm94">Mulmuley</a>, K., <i>Computational Geometry,
An Introduction Through Randomized Algorithms</i>, Prentice-Hall,
NJ, 1994.</p>
<p><a name="orou94">O'Rourke</a>, J., <i>Computational Geometry
in C</i>, Cambridge University Press, 1994.</p>
<p><a name="pre-sha85">Preparata</a>, F. and M. Shamos, <i>Computational
Geometry</i>, Springer-Verlag, New York, 1985.</p>
</blockquote>
<!-- Navigation links -->
<hr>
<p><b>Up:</b> <a
href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b><a
href="http://www.qhull.org/news">News</a> about Qhull<br>
<b>Up:</b> <a href="http://www.qhull.org/html/qh-faq.htm">FAQ</a> about Qhull<br>
<b>To:</b> <a href="#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>Dn:</b> <a href="qh-impre.htm">Imprecision in Qhull</a><br>
<b>Dn:</b> <a href="qh-eg.htm">Description of Qhull examples</a><br>
<b>Dn:</b> <a href="qh-code.htm">Qhull internals</a><br>
<b>Dn:</b> <a href="../src/libqhull/index.htm">Qhull functions, macros, and data
structures</a>
<!-- GC common information -->
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img src="qh--geom.gif"
align="middle" width="40" height="40"></a><i>The Geometry Center
Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,630 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>qconvex -- convex hull</title>
</head>
<body>
<!-- Navigation links -->
<a name="TOP"><b>Up</b></a><b>:</b>
<a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a> -- Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<hr>
<!-- Main text of document -->
<h1><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/cone.html"><img
src="qh--cone.gif" alt="[cone]" align="middle" width="100"
height="100"></a>qconvex -- convex hull</h1>
<p>The convex hull of a set of points is the smallest convex set
containing the points. See the detailed introduction by O'Rourke
[<a href="index.htm#orou94">'94</a>]. See <a
href="index.htm#description">Description of Qhull</a> and <a
href="qh-eg.htm#how">How Qhull adds a point</a>.</p>
<blockquote>
<dl>
<dt><b>Example:</b> rbox 10 D3 | qconvex <a
href="qh-opto.htm#s">s</a> <a href="qh-opto.htm#o">o</a> <a
href="qh-optt.htm#TO">TO result</a></dt>
<dd>Compute the 3-d convex hull of 10 random points. Write a
summary to the console and the points and facets to
'result'.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox c | qconvex <a
href="qh-opto.htm#n">n</a></dt>
<dd>Print the normals for each facet of a cube.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox c | qconvex <a
href="qh-opto.htm#i">i</a> <a href="qh-optq.htm#Qt">Qt</a></dt>
<dd>Print the triangulated facets of a cube.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox y 500 W0 | qconvex</dt>
<dd>Compute the convex hull of a simplex with 500
points on its surface.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox x W1e-12 1000 | qconvex
<a href="qh-optq.htm#QR">QR0</a></dt>
<dd>Compute the convex hull of 1000 points near the
surface of a randomly rotated simplex. Report
the maximum thickness of a facet.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox 1000 s | qconvex <a
href="qh-opto.htm#s">s</a> <a
href="qh-optf.htm#FA">FA</a> </dt>
<dd>Compute the convex hull of 1000 cospherical
points. Verify the results and print a summary
with the total area and volume.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox d D12 | qconvex <a
href="qh-optq.htm#QRn">QR0</a> <a
href="qh-optf.htm#FA">FA</a></dt>
<dd>Compute the convex hull of a 12-d diamond.
Randomly rotate the input. Note the large number
of facets and the small volume.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox c D7 | qconvex <a
href="qh-optf.htm#FA">FA</a> <a
href="qh-optt.htm#TFn">TF1000</a></dt>
<dd>Compute the convex hull of the 7-d hypercube.
Report on progress every 1000 facets. Computing
the convex hull of the 9-d hypercube takes too
much time and space. </dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox c d D2 | qconvex <a
href="qh-optq.htm#Qc">Qc</a> <a
href="qh-opto.htm#s">s</a> <a
href="qh-opto.htm#f">f</a> <a
href="qh-optf.htm#Fx">Fx</a> | more</dt>
<dd>Dump all fields of all facets for a square and a
diamond. Also print a summary and a list of
vertices. Note the coplanar points.</dd>
<dt>&nbsp;</dt>
</dl>
</blockquote>
<p>Except for rbox, all of the qhull programs compute a convex hull.
<p>By default, Qhull merges coplanar facets. For example, the convex
hull of a cube's vertices has six facets.
<p>If you use '<a href="qh-optq.htm#Qt">Qt</a>' (triangulated output),
all facets will be simplicial (e.g., triangles in 2-d). For the cube
example, it will have 12 facets. Some facets may be
degenerate and have zero area.
<p>If you use '<a href="qh-optq.htm#QJn">QJ</a>' (joggled input),
all facets will be simplicial. The corresponding vertices will be
slightly perturbed and identical points will be joggled apart.
Joggled input is less accurate that triangulated
output.See <a
href="qh-impre.htm#joggle">Merged facets or joggled input</a>. </p>
<p>The output for 4-d convex hulls may be confusing if the convex
hull contains non-simplicial facets (e.g., a hypercube). See
<a href=qh-faq.htm#extra>Why
are there extra points in a 4-d or higher convex hull?</a><br>
</p>
</p>
<p>The 'qconvex' program is equivalent to
'<a href=qhull.htm#outputs>qhull</a>' in 2-d to 4-d, and
'<a href=qhull.htm#outputs>qhull</a> <a href=qh-optq.htm#Qx>Qx</a>'
in 5-d and higher. It disables the following Qhull
<a href=qh-quick.htm#options>options</a>: <i>d v H Qbb Qf Qg Qm
Qr Qu Qv Qx Qz TR E V Fp Gt Q0,etc</i>.
<p><b>Copyright &copy; 1995-2015 C.B. Barber</b></p>
<hr>
<h3><a href="#TOP">&#187;</a><a name="synopsis">qconvex synopsis</a></h3>
<pre>
qconvex- compute the convex hull.
input (stdin): dimension, number of points, point coordinates
comments start with a non-numeric character
options (qconvex.htm):
Qt - triangulated output
QJ - joggle input instead of merging facets
Tv - verify result: structure, convexity, and point inclusion
. - concise list of all options
- - one-line description of all options
output options (subset):
s - summary of results (default)
i - vertices incident to each facet
n - normals with offsets
p - vertex coordinates (includes coplanar points if 'Qc')
Fx - extreme points (convex hull vertices)
FA - compute total area and volume
o - OFF format (dim, n, points, facets)
G - Geomview output (2-d, 3-d, and 4-d)
m - Mathematica output (2-d and 3-d)
QVn - print facets that include point n, -n if not
TO file- output results to file, may be enclosed in single quotes
examples:
rbox c D2 | qconvex s n rbox c D2 | qconvex i
rbox c D2 | qconvex o rbox 1000 s | qconvex s Tv FA
rbox c d D2 | qconvex s Qc Fx rbox y 1000 W0 | qconvex s n
rbox y 1000 W0 | qconvex s QJ rbox d G1 D12 | qconvex QR0 FA Pp
rbox c D7 | qconvex FA TF1000
</pre>
<h3><a href="#TOP">&#187;</a><a name="input">qconvex
input</a></h3>
<blockquote>
<p>The input data on <tt>stdin</tt> consists of:</p>
<ul>
<li>dimension
<li>number of points</li>
<li>point coordinates</li>
</ul>
<p>Use I/O redirection (e.g., qconvex &lt; data.txt), a pipe (e.g., rbox 10 | qconvex),
or the '<a href=qh-optt.htm#TI>TI</a>' option (e.g., qconvex TI data.txt).
<p>Comments start with a non-numeric character. Error reporting is
simpler if there is one point per line. Dimension
and number of points may be reversed.
<p>Here is the input for computing the convex
hull of the unit cube. The output is the normals, one
per facet.</p>
<blockquote>
<p>rbox c &gt; data </p>
<pre>
3 RBOX c
8
-0.5 -0.5 -0.5
-0.5 -0.5 0.5
-0.5 0.5 -0.5
-0.5 0.5 0.5
0.5 -0.5 -0.5
0.5 -0.5 0.5
0.5 0.5 -0.5
0.5 0.5 0.5
</pre>
<p>qconvex s n &lt; data</p>
<pre>
Convex hull of 8 points in 3-d:
Number of vertices: 8
Number of facets: 6
Number of non-simplicial facets: 6
Statistics for: RBOX c | QCONVEX s n
Number of points processed: 8
Number of hyperplanes created: 11
Number of distance tests for qhull: 35
Number of merged facets: 6
Number of distance tests for merging: 84
CPU seconds to compute hull (after input): 0.081
4
6
0 0 -1 -0.5
0 -1 0 -0.5
1 0 0 -0.5
-1 0 0 -0.5
0 1 0 -0.5
0 0 1 -0.5
</pre>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="outputs">qconvex outputs</a></h3>
<blockquote>
<p>These options control the output of qconvex. They may be used
individually or together.</p>
<blockquote>
<dl compact>
<dt>&nbsp;</dt>
<dd><b>Vertices</b></dd>
<dt><a href="qh-optf.htm#Fx">Fx</a></dt>
<dd>list extreme points (i.e., vertices). The first line is the number of
extreme points. Each point is listed, one per line. The cube example
has eight vertices.</dd>
<dt><a href="qh-optf.htm#Fv">Fv</a></dt>
<dd>list vertices for each facet. The first line is the number of facets.
Each remaining line starts with the number of vertices. For the cube example,
each facet has four vertices.</dd>
<dt><a href="qh-opto.htm#i">i</a></dt>
<dd>list vertices for each facet. The first line is the number of facets. The
remaining lines list the vertices for each facet. In 4-d and
higher, triangulate non-simplicial facets by adding an extra point.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Coordinates</b></dd>
<dt><a href="qh-opto.htm#o">o</a></dt>
<dd>print vertices and facets of the convex hull in OFF format. The
first line is the dimension. The second line is the number of
vertices, facets, and ridges. The vertex
coordinates are next, followed by the facets. Each facet starts with
the number of vertices. The cube example has four vertices per facet.</dd>
<dt><a href="qh-optf.htm#Ft">Ft</a></dt>
<dd>print a triangulation of the convex hull in OFF format. The first line
is the dimension. The second line is the number of vertices and added points,
followed by the number of facets and the number of ridges.
The vertex coordinates are next, followed by the centrum coordinates. There is
one centrum for each non-simplicial facet.
The cube example has six centrums, one per square.
Each facet starts with the number of vertices or centrums.
In the cube example, each facet uses two vertices and one centrum.</dd>
<dt><a href="qh-opto.htm#p">p</a></dt>
<dd>print vertex coordinates. The first line is the dimension and the second
line is the number of vertices. The following lines are the coordinates of each
vertex. The cube example has eight vertices.</dd>
<dt><a href="qh-optq.htm#Qc">Qc</a> <a href="qh-opto.htm#p">p</a></dt>
<dd>print coordinates of vertices and coplanar points. The first line is the dimension.
The second line is the number of vertices and coplanar points. The coordinates
are next, one line per point. Use '<a href="qh-optq.htm#Qc">Qc</a> <a href="qh-optq.htm#Qi">Qi</a> p'
to print the coordinates of all points.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Facets</b></dd>
<dt><a href="qh-optf.htm#Fn">Fn</a></dt>
<dd>list neighboring facets for each facet. The first line is the
number of facets. Each remaining line starts with the number of
neighboring facets. The cube example has four neighbors per facet.</dd>
<dt><a href="qh-optf.htm#FN">FN</a></dt>
<dd>list neighboring facets for each point. The first line is the
total number of points. Each remaining line starts with the number of
neighboring facets. Each vertex of the cube example has three neighboring
facets. Use '<a href="qh-optq.htm#Qc">Qc</a> <a href="qh-optq.htm#Qi">Qi</a> FN'
to include coplanar and interior points. </dd>
<dt><a href="qh-optf.htm#Fa">Fa</a></dt>
<dd>print area for each facet. The first line is the number of facets.
Facet area follows, one line per facet. For the cube example, each facet has area one.</dd>
<dt><a href="qh-optf.htm#FI">FI</a></dt>
<dd>list facet IDs. The first line is the number of
facets. The IDs follow, one per line.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Coplanar and interior points</b></dd>
<dt><a href="qh-optf.htm#Fc">Fc</a></dt>
<dd>list coplanar points for each facet. The first line is the number
of facets. The remaining lines start with the number of coplanar points.
A coplanar point is assigned to one facet.</dd>
<dt><a href="qh-optq.htm#Qi">Qi</a> <a href="qh-optf.htm#Fc">Fc</a></dt>
<dd>list interior points for each facet. The first line is the number
of facets. The remaining lines start with the number of interior points.
A coplanar point is assigned to one facet.</dd>
<dt><a href="qh-optf.htm#FP">FP</a></dt>
<dd>print distance to nearest vertex for coplanar points. The first line is the
number of coplanar points. Each remaining line starts with the point ID of
a vertex, followed by the point ID of a coplanar point, its facet, and distance.
Use '<a href="qh-optq.htm#Qc">Qc</a> <a href="qh-optq.htm#Qi">Qi</a>
<a href="qh-optf.htm#FP">FP</a>' for coplanar and interior points.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Hyperplanes</b></dd>
<dt><a href="qh-opto.htm#n">n</a></dt>
<dd>print hyperplane for each facet. The first line is the dimension. The
second line is the number of facets. Each remaining line is the hyperplane's
coefficients followed by its offset.</dd>
<dt><a href="qh-optf.htm#Fo">Fo</a></dt>
<dd>print outer plane for each facet. The output plane is above all points.
The first line is the dimension. The
second line is the number of facets. Each remaining line is the outer plane's
coefficients followed by its offset.</dd>
<dt><a href="qh-optf.htm#Fi">Fi</a></dt>
<dd>print inner plane for each facet. The inner plane of a facet is
below its vertices.
The first line is the dimension. The
second line is the number of facets. Each remaining line is the inner plane's
coefficients followed by its offset.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>General</b></dd>
<dt><a href="qh-opto.htm#s">s</a></dt>
<dd>print summary for the convex hull. Use '<a
href="qh-optf.htm#Fs">Fs</a>' and '<a
href="qh-optf.htm#FS">FS</a>' if you need numeric data.</dd>
<dt><a href="qh-optf.htm#FA">FA</a></dt>
<dd>compute total area and volume for '<a
href="qh-opto.htm#s">s</a>' and '<a href="qh-optf.htm#FS">FS</a>'</dd>
<dt><a href="qh-opto.htm#m">m</a></dt>
<dd>Mathematica output for the convex hull in 2-d or 3-d.</dd>
<dt><a href="qh-optf.htm#FM">FM</a></dt>
<dd>Maple output for the convex hull in 2-d or 3-d.</dd>
<dt><a href="qh-optg.htm#G">G</a></dt>
<dd>Geomview output for the convex hull in 2-d, 3-d, or 4-d.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Scaling and rotation</b></dd>
<dt><a href="qh-optq.htm#Qbk">Qbk:n</a></dt>
<dd>scale k'th coordinate to lower bound.</dd>
<dt><a href="qh-optq.htm#QBk">QBk:n</a></dt>
<dd>scale k'th coordinate to upper bound.</dd>
<dt><a href="qh-optq.htm#QbB">QbB</a></dt>
<dd>scale input to unit cube centered at the origin.</dd>
<dt><a href="qh-optq.htm#QRn">QRn</a></dt>
<dd>randomly rotate the input with a random seed of n. If n=0, the
seed is the time. If n=-1, use time for the random seed, but do
not rotate the input.</dd>
<dt><a href="qh-optq.htm#Qb0">Qbk:0Bk:0</a></dt>
<dd>remove k'th coordinate from input. This computes the
convex hull in one lower dimension.</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="controls">qconvex controls</a></h3>
<blockquote>
<p>These options provide additional control:</p>
<blockquote>
<dl compact>
<dt><a href="qh-optq.htm#Qt">Qt</a></dt>
<dd>triangulated output. Qhull triangulates non-simplicial facets. It may produce
degenerate facets of zero area.</dd>
<dt><a href="qh-optq.htm#QJn">QJ</a></dt>
<dd>joggle the input instead of merging facets. This guarantees simplicial facets
(e.g., triangles in 3-d). It is less accurate than triangulated output ('Qt').</dd>
<dt><a href="qh-optq.htm#Qc">Qc</a></dt>
<dd>keep coplanar points</dd>
<dt><a href="qh-optq.htm#Qi">Qi</a></dt>
<dd>keep interior points</dd>
<dt><a href="qh-opto.htm#f">f </a></dt>
<dd>facet dump. Print the data structure for each facet.</dd>
<dt><a href="qh-optq.htm#QVn">QVn</a></dt>
<dd>select facets containing point <em>n</em> as a vertex,</dd>
<dt><a href="qh-optq.htm#QGn">QGn</a></dt>
<dd>select facets that are visible from point <em>n</em>
(marked 'good'). Use <em>-n</em> for the remainder.</dd>
<dt><a href="qh-optp.htm#PDk">PDk:0</a></dt>
<dd>select facets with a negative coordinate for dimension <i>k</i></dd>
<dt><a href="qh-optt.htm#TFn">TFn</a></dt>
<dd>report progress after constructing <em>n</em> facets</dd>
<dt><a href="qh-optt.htm#Tv">Tv</a></dt>
<dd>verify result</dd>
<dt><a href="qh-optt.htm#TO">TI file</a></dt>
<dd>input data from file. The filename may not use spaces or quotes.</dd>
<dt><a href="qh-optt.htm#TO">TO file</a></dt>
<dd>output results to file. Use single quotes if the filename
contains spaces (e.g., <tt>TO 'file with spaces.txt'</tt></dd>
<dt><a href="qh-optq.htm#Qs">Qs</a></dt>
<dd>search all points for the initial simplex. If Qhull can
not construct an initial simplex, it reports a
descriptive message. Usually, the point set is degenerate and one
or more dimensions should be removed ('<a href="qh-optq.htm#Qb0">Qbk:0Bk:0</a>').
If not, use option 'Qs'. It performs an exhaustive search for the
best initial simplex. This is expensive is high dimensions.</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="graphics">qconvex graphics</a></h3>
<blockquote>
<p>Display 2-d, 3-d, and 4-d convex hulls with Geomview ('<a
href="qh-optg.htm#G">G</a>').</p>
<p>Display 2-d and 3-d convex hulls with Mathematica ('<a
href="qh-opto.htm#m">m</a>').</p>
<p>To view 4-d convex hulls in 3-d, use '<a
href="qh-optp.htm#Pdk">Pd0d1d2d3</a>' to select the positive
octant and '<a href="qh-optg.htm#GDn">GrD2</a>' to drop dimension
2. </p>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="notes">qconvex notes</a></h3>
<blockquote>
<p>Qhull always computes a convex hull. The
convex hull may be used for other geometric structures. The
general technique is to transform the structure into an
equivalent convex hull problem. For example, the Delaunay
triangulation is equivalent to the convex hull of the input sites
after lifting the points to a paraboloid.</p>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="conventions">qconvex
conventions</a></h3>
<blockquote>
<p>The following terminology is used for convex hulls in Qhull.
See <a href="index.htm#structure">Qhull's data structures</a>.</p>
<ul>
<li><em>point</em> - <em>d</em> coordinates</li>
<li><em>vertex</em> - extreme point of the input set</li>
<li><em>ridge</em> - <i>d-1</i> vertices between two
neighboring facets</li>
<li><em>hyperplane</em> - halfspace defined by a unit normal
and offset</li>
<li><em>coplanar point</em> - a nearly incident point to a
hyperplane</li>
<li><em>centrum</em> - a point on the hyperplane for testing
convexity</li>
<li><em>facet</em> - a facet with vertices, ridges, coplanar
points, neighboring facets, and hyperplane</li>
<li><em>simplicial facet</em> - a facet with <em>d</em>
vertices, <em>d</em> ridges, and <em>d</em> neighbors</li>
<li><em>non-simplicial facet</em> - a facet with more than <em>d</em>
vertices</li>
<li><em>good facet</em> - a facet selected by '<a
href="qh-optq.htm#QVn">QVn</a>', etc.</li>
</ul>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="options">qconvex options</a></h3>
<pre>
qconvex- compute the convex hull
http://www.qhull.org
input (stdin):
first lines: dimension and number of points (or vice-versa).
other lines: point coordinates, best if one point per line
comments: start with a non-numeric character
options:
Qt - triangulated output
QJ - joggle input instead of merging facets
Qc - keep coplanar points with nearest facet
Qi - keep interior points with nearest facet
Qhull control options:
Qbk:n - scale coord k so that low bound is n
QBk:n - scale coord k so that upper bound is n (QBk is 0.5)
QbB - scale input to unit cube centered at the origin
Qbk:0Bk:0 - remove k-th coordinate from input
QJn - randomly joggle input in range [-n,n]
QRn - random rotation (n=seed, n=0 time, n=-1 time/no rotate)
Qs - search all points for the initial simplex
QGn - good facet if visible from point n, -n for not visible
QVn - good facet if it includes point n, -n if not
Trace options:
T4 - trace at level n, 4=all, 5=mem/gauss, -1= events
Tc - check frequently during execution
Ts - print statistics
Tv - verify result: structure, convexity, and point inclusion
Tz - send all output to stdout
TFn - report summary when n or more facets created
TI file - input data from file, no spaces or single quotes
TO file - output results to file, may be enclosed in single quotes
TPn - turn on tracing when point n added to hull
TMn - turn on tracing at merge n
TWn - trace merge facets when width > n
TVn - stop qhull after adding point n, -n for before (see TCn)
TCn - stop qhull after building cone for point n (see TVn)
Precision options:
Cn - radius of centrum (roundoff added). Merge facets if non-convex
An - cosine of maximum angle. Merge facets if cosine > n or non-convex
C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge
Rn - randomly perturb computations by a factor of [1-n,1+n]
Un - max distance below plane for a new, coplanar point
Wn - min facet width for outside point (before roundoff)
Output formats (may be combined; if none, produces a summary to stdout):
f - facet dump
G - Geomview output (see below)
i - vertices incident to each facet
m - Mathematica output (2-d and 3-d)
n - normals with offsets
o - OFF file format (dim, points and facets; Voronoi regions)
p - point coordinates
s - summary (stderr)
More formats:
Fa - area for each facet
FA - compute total area and volume for option 's'
Fc - count plus coplanar points for each facet
use 'Qc' (default) for coplanar and 'Qi' for interior
FC - centrum for each facet
Fd - use cdd format for input (homogeneous with offset first)
FD - use cdd format for numeric output (offset first)
FF - facet dump without ridges
Fi - inner plane for each facet
FI - ID for each facet
Fm - merge count for each facet (511 max)
FM - Maple output (2-d and 3-d)
Fn - count plus neighboring facets for each facet
FN - count plus neighboring facets for each point
Fo - outer plane (or max_outside) for each facet
FO - options and precision constants
FP - nearest vertex for each coplanar point
FQ - command used for qconvex
Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,
for output: #vertices, #facets,
#coplanar points, #non-simplicial facets
#real (2), max outer plane, min vertex
FS - sizes: #int (0)
#real(2) tot area, tot volume
Ft - triangulation with centrums for non-simplicial facets (OFF format)
Fv - count plus vertices for each facet
FV - average of vertices (a feasible point for 'H')
Fx - extreme points (in order for 2-d)
Geomview output (2-d, 3-d, and 4-d)
Ga - all points as dots
Gp - coplanar points and vertices as radii
Gv - vertices as spheres
Gi - inner planes only
Gn - no planes
Go - outer planes only
Gc - centrums
Gh - hyperplane intersections
Gr - ridges
GDn - drop dimension n in 3-d and 4-d output
Print options:
PAn - keep n largest facets by area
Pdk:n - drop facet if normal[k] &lt;= n (default 0.0)
PDk:n - drop facet if normal[k] >= n
Pg - print good facets (needs 'QGn' or 'QVn')
PFn - keep facets whose area is at least n
PG - print neighbors of good facets
PMn - keep n facets with most merges
Po - force output. If error, output neighborhood of facet
Pp - do not report precision problems
. - list of all options
- - one line descriptions of all options
</pre>
<!-- Navigation links -->
<hr>
<p><b>Up:</b> <a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149;<a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<!-- GC common information -->
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img src="qh--geom.gif"
align="middle" width="40" height="40"></a><i>The Geometry Center
Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>

View File

@ -1,416 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>qdelaunay Qu -- furthest-site Delaunay triangulation</title>
</head>
<body>
<!-- Navigation links -->
<a name="TOP"><b>Up</b></a><b>:</b>
<a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<hr>
<!-- Main text of document -->
<h1><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/delaunay.html"><img
src="qh--dt.gif" alt="[delaunay]" align="middle" width="100"
height="100"></a>qdelaunay Qu -- furthest-site Delaunay triangulation</h1>
<p>The furthest-site Delaunay triangulation corresponds to the upper facets of the <a href="qdelaun.htm">Delaunay construction</a>.
Its vertices are the
extreme points of the input sites.
It is the dual of the <a
href="qvoron_f.htm">furthest-site Voronoi diagram</a>.
<blockquote>
<dl>
<dt><b>Example:</b> rbox 10 D2 | qdelaunay <a
href="qh-optq.htm#Qu">Qu</a> <a
href="qh-optq.htm#Qt">Qt</a> <a href="qh-opto.htm#s">s</a>
<a href="qh-opto.htm#i">i</a> <a href="qh-optt.htm#TO">TO
result</a></dt>
<dd>Compute the 2-d, furthest-site Delaunay triangulation of 10 random
points. Triangulate the output.
Write a summary to the console and the regions to
'result'.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox 10 D2 | qdelaunay <a
href="qh-optq.htm#Qu">Qu</a> <a
href="qh-optq.htm#QJn">QJ</a> <a href="qh-opto.htm#s">s</a>
<a href="qh-opto.htm#i">i</a> <a href="qh-optt.htm#TO">TO
result</a></dt>
<dd>Compute the 2-d, furthest-site Delaunay triangulation of 10 random
points. Joggle the input to guarantee triangular output.
Write a summary to the console and the regions to
'result'.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox r y c G1 D2 | qdelaunay <a
href="qh-optq.htm#Qu">Qu</a> <a href="qh-opto.htm#s">s</a>
<a href="qh-optf.htm#Fv">Fv</a> <a href="qh-optt.htm#TO">TO
result</a></dt>
<dd>Compute the 2-d, furthest-site Delaunay triangulation of a triangle inside
a square.
Write a summary to the console and unoriented regions to 'result'.
Merge regions for cocircular input sites (e.g., the square).
The square is the only furthest-site
Delaunay region.</dd>
</dl>
</blockquote>
<p>As with the Delaunay triangulation, Qhull computes the
furthest-site Delaunay triangulation by lifting the input sites to a
paraboloid. The lower facets correspond to the Delaunay
triangulation while the upper facets correspond to the
furthest-site triangulation. Neither triangulation includes
&quot;vertical&quot; facets (i.e., facets whose last hyperplane
coefficient is nearly zero). Vertical facets correspond to input
sites that are coplanar to the convex hull of the input. An
example is points on the boundary of a lattice.</p>
<p>By default, qdelaunay merges cocircular and cospherical regions.
For example, the furthest-site Delaunay triangulation of a square inside a diamond
('rbox D2 c d G4 | qdelaunay Qu') consists of one region (the diamond).
<p>If you use '<a href="qh-optq.htm#Qt">Qt</a>' (triangulated output),
all furthest-site Delaunay regions will be simplicial (e.g., triangles in 2-d).
Some regions may be
degenerate and have zero area.
<p>If you use '<a href="qh-optq.htm#QJn">QJ</a>' (joggled input), all furthest-site
Delaunay regions
will be simplicial (e.g., triangles in 2-d). Joggled input
is less accurate than triangulated output ('Qt'). See <a
href="qh-impre.htm#joggle">Merged facets or joggled input</a>. </p>
<p>The output for 3-d, furthest-site Delaunay triangulations may be confusing if the
input contains cospherical data. See the FAQ item
<a href=qh-faq.htm#extra>Why
are there extra points in a 4-d or higher convex hull?</a>
Avoid these problems with triangulated output ('<a href="qh-optq.htm#Qt">Qt</a>') or
joggled input ('<a href="qh-optq.htm#QJn">QJ</a>').
</p>
<p>The 'qdelaunay' program is equivalent to
'<a href=qhull.htm#outputs>qhull d</a> <a href=qh-optq.htm#Qbb>Qbb</a>' in 2-d to 3-d, and
'<a href=qhull.htm#outputs>qhull d</a> <a href=qh-optq.htm#Qbb>Qbb</a> <a href=qh-optq.htm#Qx>Qx</a>'
in 4-d and higher. It disables the following Qhull
<a href=qh-quick.htm#options>options</a>: <i>d n v H U Qb QB Qc Qf Qg Qi
Qm Qr QR Qv Qx TR E V FC Fi Fo Fp FV Q0,etc</i>.
<p><b>Copyright &copy; 1995-2015 C.B. Barber</b></p>
<hr>
<h3><a href="#TOP">&#187;</a><a name="synopsis">furthest-site qdelaunay synopsis</a></h3>
<blockquote>
See <a href="qdelaun.htm#synopsis">qdelaunay synopsis</a>. The same
program is used for both constructions. Use option '<a href="qh-optq.htm#Qu">Qu</a>'
for furthest-site Delaunay triangulations.
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="input">furthest-site qdelaunay
input</a></h3>
<blockquote>
<p>The input data on <tt>stdin</tt> consists of:</p>
<ul>
<li>dimension
<li>number of points</li>
<li>point coordinates</li>
</ul>
<p>Use I/O redirection (e.g., qdelaunay Qu &lt; data.txt), a pipe (e.g., rbox 10 | qdelaunay Qu),
or the '<a href=qh-optt.htm#TI>TI</a>' option (e.g., qdelaunay Qu TI data.txt).
<p>For example, this is a square containing four random points.
Its furthest-site Delaunay
triangulation contains one square.
<p>
<blockquote>
<tt>rbox c 4 D2 &gt; data</tt>
<blockquote><pre>
2 RBOX c 4 D2
8
-0.4999921736307369 -0.3684622117955817
0.2556053225468894 -0.0413498678629751
0.0327672376602583 -0.2810408135699488
-0.452955383763607 0.17886471718444
-0.5 -0.5
-0.5 0.5
0.5 -0.5
0.5 0.5
</pre></blockquote>
<p><tt>qdelaunay Qu i &lt; data</tt>
<blockquote><pre>
Furthest-site Delaunay triangulation by the convex hull of 8 points in 3-d:
Number of input sites: 8
Number of Delaunay regions: 1
Number of non-simplicial Delaunay regions: 1
Statistics for: RBOX c 4 D2 | QDELAUNAY s Qu i
Number of points processed: 8
Number of hyperplanes created: 20
Number of facets in hull: 11
Number of distance tests for qhull: 34
Number of merged facets: 1
Number of distance tests for merging: 107
CPU seconds to compute hull (after input): 0.02
1
7 6 4 5
</pre></blockquote>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="outputs">furthest-site qdelaunay
outputs</a></h3>
<blockquote>
<p>These options control the output of furthest-site Delaunay triangulations:</p>
<blockquote>
<dl compact>
<dd><b>furthest-site Delaunay regions</b></dd>
<dt><a href="qh-opto.htm#i">i</a></dt>
<dd>list input sites for each furthest-site Delaunay region. The first line is the number of regions. The
remaining lines list the input sites for each region. The regions are
oriented. In 3-d and
higher, report cospherical sites by adding extra points. For the points-in-square example,
the square is the only furthest-site Delaunay region.</dd>
<dt><a href="qh-optf.htm#Fv">Fv</a></dt>
<dd>list input sites for each furthest-site Delaunay region. The first line is the number of regions.
Each remaining line starts with the number of input sites. The regions
are unoriented. For the points-in-square example,
the square is the only furthest-site Delaunay region.</dd>
<dt><a href="qh-optf.htm#Ft">Ft</a></dt>
<dd>print a triangulation of the furthest-site Delaunay regions in OFF format. The first line
is the dimension. The second line is the number of input sites and added points,
followed by the number of simplices and the number of ridges.
The input coordinates are next, followed by the centrum coordinates. There is
one centrum for each non-simplicial furthest-site Delaunay region. Each remaining line starts
with dimension+1. The
simplices are oriented.
For the points-in-square example, the square has a centrum at the
origin. It splits the square into four triangular regions.</dd>
<dt><a href="qh-optf.htm#Fn">Fn</a></dt>
<dd>list neighboring regions for each furthest-site Delaunay region. The first line is the
number of regions. Each remaining line starts with the number of
neighboring regions. Negative indices (e.g., <em>-1</em>) indicate regions
outside of the furthest-site Delaunay triangulation.
For the points-in-square example, the four neighboring regions
are outside of the triangulation. They belong to the regular
Delaunay triangulation.</dd>
<dt><a href="qh-optf.htm#FN">FN</a></dt>
<dd>list the furthest-site Delaunay regions for each input site. The first line is the
total number of input sites. Each remaining line starts with the number of
furthest-site Delaunay regions. Negative indices (e.g., <em>-1</em>) indicate regions
outside of the furthest-site Delaunay triangulation.
For the points-in-square example, the four random points belong to no region
while the square's vertices belong to region <em>0</em> and three
regions outside of the furthest-site Delaunay triangulation.</dd>
<dt><a href="qh-optf.htm#Fa">Fa</a></dt>
<dd>print area for each furthest-site Delaunay region. The first line is the number of regions.
The areas follow, one line per region. For the points-in-square example, the
square has unit area. </dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Input sites</b></dd>
<dt><a href="qh-optf.htm#Fx">Fx</a></dt>
<dd>list extreme points of the input sites. These points are vertices of the furthest-point
Delaunay triangulation. They are on the
boundary of the convex hull. The first line is the number of
extreme points. Each point is listed, one per line. The points-in-square example
has four extreme points.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>General</b></dd>
<dt><a href="qh-optf.htm#FA">FA</a></dt>
<dd>compute total area for '<a href="qh-opto.htm#s">s</a>'
and '<a href="qh-optf.htm#FS">FS</a>'. This is the
same as the area of the convex hull.</dd>
<dt><a href="qh-opto.htm#o">o</a></dt>
<dd>print upper facets of the corresponding convex hull (a
paraboloid)</dd>
<dt><a href="qh-opto.htm#m">m</a></dt>
<dd>Mathematica output for the upper facets of the paraboloid (2-d triangulations).</dd>
<dt><a href="qh-optf.htm#FM">FM</a></dt>
<dd>Maple output for the upper facets of the paraboloid (2-d triangulations).</dd>
<dt><a href="qh-optg.htm#G">G</a></dt>
<dd>Geomview output for the paraboloid (2-d or 3-d triangulations).</dd>
<dt><a href="qh-opto.htm#s">s</a></dt>
<dd>print summary for the furthest-site Delaunay triangulation. Use '<a
href="qh-optf.htm#Fs">Fs</a>' and '<a
href="qh-optf.htm#FS">FS</a>' for numeric data.</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="controls">furthest-site qdelaunay
controls</a></h3>
<blockquote>
<p>These options provide additional control:</p>
<blockquote>
<dl compact>
<dt><a href="qh-optq.htm#Qu">Qu</a></dt>
<dd>must be used for furthest-site Delaunay triangulation.</dd>
<dt><a href="qh-optq.htm#Qt">Qt</a></dt>
<dd>triangulated output. Qhull triangulates non-simplicial facets. It may produce
degenerate facets of zero area.</dd>
<dt><a href="qh-optq.htm#QJn">QJ</a></dt>
<dd>joggle the input to avoid cospherical and coincident
sites. It is less accurate than triangulated output ('Qt').</dd>
<dt><a href="qh-optq.htm#QVn">QVn</a></dt>
<dd>select facets adjacent to input site <em>n</em> (marked
'good').</dd>
<dt><a href="qh-optt.htm#Tv">Tv</a></dt>
<dd>verify result.</dd>
<dt><a href="qh-optt.htm#TO">TI file</a></dt>
<dd>input data from file. The filename may not use spaces or quotes.</dd>
<dt><a href="qh-optt.htm#TO">TO file</a></dt>
<dd>output results to file. Use single quotes if the filename
contains spaces (e.g., <tt>TO 'file with spaces.txt'</tt></dd>
<dt><a href="qh-optt.htm#TFn">TFn</a></dt>
<dd>report progress after constructing <em>n</em> facets</dd>
<dt><a href="qh-optp.htm#PDk">PDk:1</a></dt>
<dd>include upper and lower facets in the output. Set <em>k</em>
to the last dimension (e.g., 'PD2:1' for 2-d inputs). </dd>
<dt><a href="qh-opto.htm#f">f</a></dt>
<dd>facet dump. Print the data structure for each facet (i.e., furthest-site Delaunay region).</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="graphics">furthest-site qdelaunay
graphics</a></h3>
<blockquote>
See <a href="qdelaun.htm#graphics">Delaunay graphics</a>.
They are the same except for Mathematica and Maple output.
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="notes">furthest-site
qdelaunay notes</a></h3>
<blockquote>
<p>The furthest-site Delaunay triangulation does not
record coincident input sites. Use <tt>qdelaunay</tt> instead.
<p><tt>qdelaunay Qu</tt> does not work for purely cocircular
or cospherical points (e.g., rbox c | qdelaunay Qu). Instead,
use <tt>qdelaunay Qz</tt> -- when all points are vertices of the convex
hull of the input sites, the Delaunay triangulation is the same
as the furthest-site Delaunay triangulation.
<p>A non-simplicial, furthest-site Delaunay region indicates nearly cocircular or
cospherical input sites. To avoid non-simplicial regions triangulate
the output ('<a href="qh-optq.htm#Qt">Qt</a>') or joggle
the input ('<a href="qh-optq.htm#QJn">QJ</a>'). Joggled input
is less accurate than triangulated output.
You may also triangulate
non-simplicial regions with option '<a
href="qh-optf.htm#Ft">Ft</a>'. It adds
the centrum to non-simplicial regions. Alternatively, use an <a
href="qh-impre.htm#exact">exact arithmetic code</a>.</p>
<p>Furthest-site Delaunay triangulations do not include facets that are
coplanar with the convex hull of the input sites. A facet is
coplanar if the last coefficient of its normal is
nearly zero (see <a href="../src/libqhull/user.h#ZEROdelaunay">qh_ZEROdelaunay</a>).
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="conventions">furthest-site qdelaunay conventions</a></h3>
<blockquote>
<p>The following terminology is used for furthest-site Delaunay
triangulations in Qhull. The underlying structure is the upper
facets of a convex hull in one higher dimension. See <a
href="qconvex.htm#conventions">convex hull conventions</a>, <a
href="qdelaun.htm#conventions">Delaunay conventions</a>,
and <a href="index.htm#structure">Qhull's data structures</a></p>
<blockquote>
<ul>
<li><em>input site</em> - a point in the input (one dimension
lower than a point on the convex hull)</li>
<li><em>point</em> - <i>d+1</i> coordinates. The last
coordinate is the sum of the squares of the input site's
coordinates</li>
<li><em>vertex</em> - a point on the paraboloid. It
corresponds to a unique input site. </li>
<li><em>furthest-site Delaunay facet</em> - an upper facet of the
paraboloid. The last coefficient of its normal is
clearly positive.</li>
<li><em>furthest-site Delaunay region</em> - a furthest-site Delaunay
facet projected to the input sites</li>
<li><em>non-simplicial facet</em> - more than <em>d</em>
points are cocircular or cospherical</li>
<li><em>good facet</em> - a furthest-site Delaunay facet with optional
restrictions by '<a href="qh-optq.htm#QVn">QVn</a>', etc.</li>
</ul>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="options">furthest-site qdelaunay options</a></h3>
<blockquote>
See <a href="qdelaun.htm#options">qdelaunay options</a>. The same
program is used for both constructions. Use option '<a href="qh-optq.htm#Qu">Qu</a>'
for furthest-site Delaunay triangulations.
</blockquote>
<!-- Navigation links -->
<hr>
<p><b>Up:</b> <a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<!-- GC common information -->
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img src="qh--geom.gif"
align="middle" width="40" height="40"></a><i>The Geometry Center
Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>

View File

@ -1,628 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>qdelaunay -- Delaunay triangulation</title>
</head>
<body>
<!-- Navigation links -->
<a name="TOP"><b>Up</b></a><b>:</b>
<a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<hr>
<!-- Main text of document -->
<h1><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/delaunay.html"><img
src="qh--dt.gif" alt="[delaunay]" align="middle" width="100"
height="100"></a>qdelaunay -- Delaunay triangulation</h1>
<p>The Delaunay triangulation is the triangulation with empty
circumspheres. It has many useful properties and applications.
See the survey article by Aurenhammer [<a
href="index.htm#aure91">'91</a>] and the detailed introduction
by O'Rourke [<a href="index.htm#orou94">'94</a>]. </p>
<blockquote>
<dl>
<dt><b>Example:</b> rbox r y c G0.1 D2 | qdelaunay <a href="qh-opto.htm#s">s</a>
<a href="qh-optf.htm#Fv">Fv</a> <a href="qh-optt.htm#TO">TO
result</a></dt>
<dd>Compute the 2-d Delaunay triangulation of a triangle and
a small square.
Write a summary to the console and unoriented regions to 'result'.
Merge regions for cocircular input sites (i.e., the
square).</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox r y c G0.1 D2 | qdelaunay <a href="qh-opto.htm#s">s</a>
<a href="qh-optf.htm#Fv">Fv</a> <a href="qh-optq.htm#Qt">Qt</a></dt>
<dd>Compute the 2-d Delaunay triangulation of a triangle and
a small square. Write a summary and unoriented
regions to the console. Produce triangulated output.</dd>
<dt>&nbsp;</dt>
<dt><b>Example:</b> rbox 10 D2 | qdelaunay <a
href="qh-optq.htm#QJn">QJ</a> <a href="qh-opto.htm#s">s</a>
<a href="qh-opto.htm#i">i</a> <a href="qh-optt.htm#TO">TO
result</a></dt>
<dd>Compute the 2-d Delaunay triangulation of 10 random
points. Joggle the input to guarantee triangular output.
Write a summary to the console and the regions to
'result'.</dd>
</dl>
</blockquote>
<p>Qhull computes the Delaunay triangulation by computing a
convex hull. It lifts the input sites to a paraboloid by adding
the sum of the squares of the coordinates. It scales the height
of the paraboloid to improve numeric precision ('<a href=qh-optq.htm#Qbb>Qbb</a>').
It computes the convex
hull of the lifted sites, and projects the lower convex hull to
the input.
<p>Each region of the Delaunay triangulation
corresponds to a facet of the lower half of the convex hull.
Facets of the upper half of the convex hull correspond to the <a
href="qdelau_f.htm">furthest-site Delaunay triangulation</a>.
See the examples, <a href="qh-eg.htm#delaunay">Delaunay and
Voronoi diagrams</a>.</p>
<p>See <a href="http://www.qhull.org/html/qh-faq.htm#TOC">Qhull FAQ</a> - Delaunay and
Voronoi diagram questions.</p>
<p>By default, qdelaunay merges cocircular and cospherical regions.
For example, the Delaunay triangulation of a square inside a diamond
('rbox D2 c d G4 | qdelaunay') contains one region for the square.
<p>Use option '<a href="qh-optq.htm#Qz">Qz</a>' if the input is circular, cospherical, or
nearly so. It improves precision by adding a point "at infinity," above the corresponding paraboloid.
<p>If you use '<a href="qh-optq.htm#Qt">Qt</a>' (triangulated output),
all Delaunay regions will be simplicial (e.g., triangles in 2-d).
Some regions may be
degenerate and have zero area. Triangulated output identifies coincident
points.
<p>If you use '<a href="qh-optq.htm#QJn">QJ</a>' (joggled input), all Delaunay regions
will be simplicial (e.g., triangles in 2-d). Coincident points will
create small regions since the points are joggled apart. Joggled input
is less accurate than triangulated output ('Qt'). See <a
href="qh-impre.htm#joggle">Merged facets or joggled input</a>. </p>
<p>The output for 3-d Delaunay triangulations may be confusing if the
input contains cospherical data. See the FAQ item
<a href=qh-faq.htm#extra>Why
are there extra points in a 4-d or higher convex hull?</a>
Avoid these problems with triangulated output ('<a href="qh-optq.htm#Qt">Qt</a>') or
joggled input ('<a href="qh-optq.htm#QJn">QJ</a>').
</p>
<p>The 'qdelaunay' program is equivalent to
'<a href=qhull.htm#outputs>qhull d</a> <a href=qh-optq.htm#Qbb>Qbb</a>' in 2-d to 3-d, and
'<a href=qhull.htm#outputs>qhull d</a> <a href=qh-optq.htm#Qbb>Qbb</a> <a href=qh-optq.htm#Qx>Qx</a>'
in 4-d and higher. It disables the following Qhull
<a href=qh-quick.htm#options>options</a>: <i>d n v H U Qb QB Qc Qf Qg Qi
Qm Qr QR Qv Qx TR E V FC Fi Fo Fp Ft FV Q0,etc</i>.
<p><b>Copyright &copy; 1995-2015 C.B. Barber</b></p>
<hr>
<h3><a href="#TOP">&#187;</a><a name="synopsis">qdelaunay synopsis</a></h3>
<pre>
qdelaunay- compute the Delaunay triangulation.
input (stdin): dimension, number of points, point coordinates
comments start with a non-numeric character
options (qdelaun.htm):
Qt - triangulated output
QJ - joggle input instead of merging facets
Qu - furthest-site Delaunay triangulation
Tv - verify result: structure, convexity, and in-circle test
. - concise list of all options
- - one-line description of all options
output options (subset):
s - summary of results (default)
i - vertices incident to each Delaunay region
Fx - extreme points (vertices of the convex hull)
o - OFF format (shows the points lifted to a paraboloid)
G - Geomview output (2-d and 3-d points lifted to a paraboloid)
m - Mathematica output (2-d inputs lifted to a paraboloid)
QVn - print Delaunay regions that include point n, -n if not
TO file- output results to file, may be enclosed in single quotes
examples:
rbox c P0 D2 | qdelaunay s o rbox c P0 D2 | qdelaunay i
rbox c P0 D3 | qdelaunay Fv Qt rbox c P0 D2 | qdelaunay s Qu Fv
rbox c G1 d D2 | qdelaunay s i rbox c G1 d D2 | qdelaunay s i Qt
rbox M3,4 z 100 D2 | qdelaunay s rbox M3,4 z 100 D2 | qdelaunay s Qt
</pre>
<h3><a href="#TOP">&#187;</a><a name="input">qdelaunay
input</a></h3>
<blockquote>
<p>The input data on <tt>stdin</tt> consists of:</p>
<ul>
<li>dimension
<li>number of points</li>
<li>point coordinates</li>
</ul>
<p>Use I/O redirection (e.g., qdelaunay &lt; data.txt), a pipe (e.g., rbox 10 | qdelaunay),
or the '<a href=qh-optt.htm#TI>TI</a>' option (e.g., qdelaunay TI data.txt).
<p>For example, this is four cocircular points inside a square. Its Delaunay
triangulation contains 8 triangles and one four-sided
figure.
<p>
<blockquote>
<tt>rbox s 4 W0 c G1 D2 &gt; data</tt>
<blockquote><pre>
2 RBOX s 4 W0 c D2
8
-0.4941988586954018 -0.07594397977563715
-0.06448037284989526 0.4958248496365813
0.4911154367094632 0.09383830681375946
-0.348353580869097 -0.3586778257652367
-1 -1
-1 1
1 -1
1 1
</pre></blockquote>
<p><tt>qdelaunay s i &lt; data</tt>
<blockquote><pre>
Delaunay triangulation by the convex hull of 8 points in 3-d
Number of input sites: 8
Number of Delaunay regions: 9
Number of non-simplicial Delaunay regions: 1
Statistics for: RBOX s 4 W0 c D2 | QDELAUNAY s i
Number of points processed: 8
Number of hyperplanes created: 18
Number of facets in hull: 10
Number of distance tests for qhull: 33
Number of merged facets: 2
Number of distance tests for merging: 102
CPU seconds to compute hull (after input): 0.028
9
1 7 5
6 3 4
2 3 6
7 2 6
2 7 1
0 5 4
3 0 4
0 1 5
1 0 3 2
</pre></blockquote>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="outputs">qdelaunay
outputs</a></h3>
<blockquote>
<p>These options control the output of Delaunay triangulations:</p>
<blockquote>
<dl compact>
<dd><b>Delaunay regions</b></dd>
<dt><a href="qh-opto.htm#i">i</a></dt>
<dd>list input sites for each Delaunay region. The first line is the number of regions. The
remaining lines list the input sites for each region. The regions are
oriented. In 3-d and
higher, report cospherical sites by adding extra points. Use triangulated
output ('<a href="qh-optq.htm#Qt">Qt</a>') to avoid non-simpicial regions. For the circle-in-square example,
eight Delaunay regions are triangular and the ninth has four input sites.</dd>
<dt><a href="qh-optf.htm#Fv">Fv</a></dt>
<dd>list input sites for each Delaunay region. The first line is the number of regions.
Each remaining line starts with the number of input sites. The regions
are unoriented. For the circle-in-square example,
eight Delaunay regions are triangular and the ninth has four input sites.</dd>
<dt><a href="qh-optf.htm#Fn">Fn</a></dt>
<dd>list neighboring regions for each Delaunay region. The first line is the
number of regions. Each remaining line starts with the number of
neighboring regions. Negative indices (e.g., <em>-1</em>) indicate regions
outside of the Delaunay triangulation.
For the circle-in-square example, the four regions on the square are neighbors to
the region-at-infinity.</dd>
<dt><a href="qh-optf.htm#FN">FN</a></dt>
<dd>list the Delaunay regions for each input site. The first line is the
total number of input sites. Each remaining line starts with the number of
Delaunay regions. Negative indices (e.g., <em>-1</em>) indicate regions
outside of the Delaunay triangulation.
For the circle-in-square example, each point on the circle belongs to four
Delaunay regions. Use '<a href="qh-optq.htm#Qc">Qc</a> FN'
to include coincident input sites and deleted vertices. </dd>
<dt><a href="qh-optf.htm#Fa">Fa</a></dt>
<dd>print area for each Delaunay region. The first line is the number of regions.
The areas follow, one line per region. For the circle-in-square example, the
cocircular region has area 0.4. </dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>Input sites</b></dd>
<dt><a href="qh-optf.htm#Fc">Fc</a></dt>
<dd>list coincident input sites for each Delaunay region.
The first line is the number of regions. The remaining lines start with
the number of coincident sites and deleted vertices. Deleted vertices
indicate highly degenerate input (see'<a href="qh-optf.htm#Fs">Fs</a>').
A coincident site is assigned to one Delaunay
region. Do not use '<a href="qh-optq.htm#QJn">QJ</a>' with 'Fc'; the joggle will separate
coincident sites.</dd>
<dt><a href="qh-optf.htm#FP">FP</a></dt>
<dd>print coincident input sites with distance to
nearest site (i.e., vertex). The first line is the
number of coincident sites. Each remaining line starts with the point ID of
an input site, followed by the point ID of a coincident point, its region, and distance.
Includes deleted vertices which
indicate highly degenerate input (see'<a href="qh-optf.htm#Fs">Fs</a>').
Do not use '<a href="qh-optq.htm#QJn">QJ</a>' with 'FP'; the joggle will separate
coincident sites.</dd>
<dt><a href="qh-optf.htm#Fx">Fx</a></dt>
<dd>list extreme points of the input sites. These points are on the
boundary of the convex hull. The first line is the number of
extreme points. Each point is listed, one per line. The circle-in-square example
has four extreme points.</dd>
<dt>&nbsp;</dt>
<dt>&nbsp;</dt>
<dd><b>General</b></dd>
<dt><a href="qh-optf.htm#FA">FA</a></dt>
<dd>compute total area for '<a href="qh-opto.htm#s">s</a>'
and '<a href="qh-optf.htm#FS">FS</a>'</dd>
<dt><a href="qh-opto.htm#o">o</a></dt>
<dd>print lower facets of the corresponding convex hull (a
paraboloid)</dd>
<dt><a href="qh-opto.htm#m">m</a></dt>
<dd>Mathematica output for the lower facets of the paraboloid (2-d triangulations).</dd>
<dt><a href="qh-optf.htm#FM">FM</a></dt>
<dd>Maple output for the lower facets of the paraboloid (2-d triangulations).</dd>
<dt><a href="qh-optg.htm#G">G</a></dt>
<dd>Geomview output for the paraboloid (2-d or 3-d triangulations).</dd>
<dt><a href="qh-opto.htm#s">s</a></dt>
<dd>print summary for the Delaunay triangulation. Use '<a
href="qh-optf.htm#Fs">Fs</a>' and '<a
href="qh-optf.htm#FS">FS</a>' for numeric data.</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="controls">qdelaunay
controls</a></h3>
<blockquote>
<p>These options provide additional control:</p>
<blockquote>
<dl compact>
<dt><a href="qh-optq.htm#Qt">Qt</a></dt>
<dd>triangulated output. Qhull triangulates non-simplicial facets. It may produce
degenerate facets of zero area.</dd>
<dt><a href="qh-optq.htm#QJn">QJ</a></dt>
<dd>joggle the input to avoid cospherical and coincident
sites. It is less accurate than triangulated output ('Qt').</dd>
<dt><a href="qh-optq.htm#Qu">Qu</a></dt>
<dd>compute the <a href="qdelau_f.htm">furthest-site Delaunay triangulation</a>.</dd>
<dt><a href="qh-optq.htm#Qz">Qz</a></dt>
<dd>add a point above the paraboloid to reduce precision
errors. Use it for nearly cocircular/cospherical input
(e.g., 'rbox c | qdelaunay Qz'). The point is printed for
options '<a href="qh-optf.htm#Ft">Ft</a>' and '<a
href="qh-opto.htm#o">o</a>'.</dd>
<dt><a href="qh-optq.htm#QVn">QVn</a></dt>
<dd>select facets adjacent to input site <em>n</em> (marked
'good').</dd>
<dt><a href="qh-optt.htm#Tv">Tv</a></dt>
<dd>verify result.</dd>
<dt><a href="qh-optt.htm#TO">TI file</a></dt>
<dd>input data from file. The filename may not use spaces or quotes.</dd>
<dt><a href="qh-optt.htm#TO">TO file</a></dt>
<dd>output results to file. Use single quotes if the filename
contains spaces (e.g., <tt>TO 'file with spaces.txt'</tt></dd>
<dt><a href="qh-optt.htm#TFn">TFn</a></dt>
<dd>report progress after constructing <em>n</em> facets</dd>
<dt><a href="qh-optp.htm#PDk">PDk:1</a></dt>
<dd>include upper and lower facets in the output. Set <em>k</em>
to the last dimension (e.g., 'PD2:1' for 2-d inputs). </dd>
<dt><a href="qh-opto.htm#f">f</a></dt>
<dd>facet dump. Print the data structure for each facet (i.e., Delaunay region).</dd>
</dl>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="graphics">qdelaunay
graphics</a></h3>
<blockquote>
<p>For 2-d and 3-d Delaunay triangulations, Geomview ('qdelaunay <a
href="qh-optg.htm#G">G</a>') displays the corresponding convex
hull (a paraboloid). </p>
<p>To view a 2-d Delaunay triangulation, use 'qdelaunay <a
href="qh-optg.htm#GDn">GrD2</a>' to drop the last dimension. This
is the same as viewing the hull without perspective (see
Geomview's 'cameras' menu). </p>
<p>To view a 3-d Delaunay triangulation, use 'qdelaunay <a
href="qh-optg.htm#GDn">GrD3</a>' to drop the last dimension. You
may see extra edges. These are interior edges that Geomview moves
towards the viewer (see 'lines closer' in Geomview's camera
options). Use option '<a href="qh-optg.htm#Gt">Gt</a>' to make
the outer ridges transparent in 3-d. See <a
href="qh-eg.htm#delaunay">Delaunay and Voronoi examples</a>.</p>
<p>For 2-d Delaunay triangulations, Mathematica ('<a
href="qh-opto.htm#m">m</a>') and Maple ('<a
href="qh-optf.htm#FM">FM</a>') output displays the lower facets of the corresponding convex
hull (a paraboloid). </p>
<p>For 2-d, furthest-site Delaunay triangulations, Maple and Mathematica output ('<a
href="qh-optq.htm#Qu">Qu</a> <a
href="qh-opto.htm#m">m</a>') displays the upper facets of the corresponding convex
hull (a paraboloid). </p>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="notes">qdelaunay
notes</a></h3>
<blockquote>
<p>You can simplify the Delaunay triangulation by enclosing the input
sites in a large square or cube. This is particularly recommended
for cocircular or cospherical input data.
<p>A non-simplicial Delaunay region indicates nearly cocircular or
cospherical input sites. To avoid non-simplicial regions either triangulate
the output ('<a href="qh-optq.htm#Qt">Qt</a>') or joggle
the input ('<a href="qh-optq.htm#QJn">QJ</a>'). Triangulated output
is more accurate than joggled input. Alternatively, use an <a
href="qh-impre.htm#exact">exact arithmetic code</a>.</p>
<p>Delaunay triangulations do not include facets that are
coplanar with the convex hull of the input sites. A facet is
coplanar if the last coefficient of its normal is
nearly zero (see <a href="../src/libqhull/user.h#ZEROdelaunay">qh_ZEROdelaunay</a>).
<p>See <a href=qh-impre.htm#delaunay>Imprecision issues :: Delaunay triangulations</a>
for a discussion of precision issues. Deleted vertices indicate
highly degenerate input. They are listed in the summary output and
option '<a href="qh-optf.htm#Fs">Fs</a>'.</p>
<p>To compute the Delaunay triangulation of points on a sphere,
compute their convex hull. If the sphere is the unit sphere at
the origin, the facet normals are the Voronoi vertices of the
input. The points may be restricted to a hemisphere. [S. Fortune]
</p>
<p>The 3-d Delaunay triangulation of regular points on a half
spiral (e.g., 'rbox 100 l | qdelaunay') has quadratic size, while the Delaunay triangulation
of random 3-d points is
approximately linear for reasonably sized point sets.
<p>With the <a href="qh-code.htm#library">Qhull library</a>, you
can use <tt>qh_findbestfacet</tt> in <tt>poly2.c</tt> to locate the facet
that contains a point. You should first lift the point to the
paraboloid (i.e., the last coordinate is the sum of the squares
of the point's coordinates -- <tt>qh_setdelaunay</tt>). Do not use options
'<a href="qh-optq.htm#Qbb">Qbb</a>', '<a href="qh-optq.htm#QbB">QbB</a>',
'<a href="qh-optq.htm#Qbk">Qbk:n</a>', or '<a
href="qh-optq.htm#QBk">QBk:n</a>' since these scale the last
coordinate. </p>
<p>If a point is interior to the convex hull of the input set, it
is interior to the adjacent vertices of the Delaunay
triangulation. This is demonstrated by the following pipe for
point 0:
<pre>
qdelaunay &lt;data s FQ QV0 p | qconvex s Qb3:0B3:0 p
</pre>
<p>The first call to qdelaunay returns the neighboring points of
point 0 in the Delaunay triangulation. The second call to qconvex
returns the vertices of the convex hull of these points (after
dropping the lifted coordinate). If point 0 is interior to the
original point set, it is interior to the reduced point set. </p>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="conventions">qdelaunay conventions</a></h3>
<blockquote>
<p>The following terminology is used for Delaunay triangulations
in Qhull for dimension <i>d</i>. The underlying structure is the
lower facets of a convex hull in dimension <i>d+1</i>. For
further information, see <a href="index.htm#structure">data
structures</a> and <a href="qconvex.htm#conventions">convex hull
conventions</a>.</p>
<blockquote>
<ul>
<li><em>input site</em> - a point in the input (one dimension
lower than a point on the convex hull)</li>
<li><em>point</em> - a point has <i>d+1</i> coordinates. The
last coordinate is the sum of the squares of the input
site's coordinates</li>
<li><em>coplanar point</em> - a <em>coincident</em>
input site or a deleted vertex. Deleted vertices
indicate highly degenerate input.</li>
<li><em>vertex</em> - a point on the paraboloid. It
corresponds to a unique input site. </li>
<li><em>point-at-infinity</em> - a point added above the
paraboloid by option '<a href="qh-optq.htm#Qz">Qz</a>'</li>
<li><em>lower facet</em> - a facet corresponding to a
Delaunay region. The last coefficient of its normal is
clearly negative.</li>
<li><em>upper facet</em> - a facet corresponding to a
furthest-site Delaunay region. The last coefficient of
its normal is clearly positive. </li>
<li><em>Delaunay region</em> - a
lower facet projected to the input sites</li>
<li><em>upper Delaunay region</em> - an upper facet projected
to the input sites</li>
<li><em>non-simplicial facet</em> - more than <em>d</em>
input sites are cocircular or cospherical</li>
<li><em>good facet</em> - a Delaunay region with optional
restrictions by '<a href="qh-optq.htm#QVn">QVn</a>', etc.</li>
</ul>
</blockquote>
</blockquote>
<h3><a href="#TOP">&#187;</a><a name="options">qdelaunay options</a></h3>
<pre>
qdelaunay- compute the Delaunay triangulation
http://www.qhull.org
input (stdin):
first lines: dimension and number of points (or vice-versa).
other lines: point coordinates, best if one point per line
comments: start with a non-numeric character
options:
Qt - triangulated output
QJ - joggle input instead of merging facets
Qu - compute furthest-site Delaunay triangulation
Qhull control options:
QJn - randomly joggle input in range [-n,n]
Qs - search all points for the initial simplex
Qz - add point-at-infinity to Delaunay triangulation
QGn - print Delaunay region if visible from point n, -n if not
QVn - print Delaunay regions that include point n, -n if not
Trace options:
T4 - trace at level n, 4=all, 5=mem/gauss, -1= events
Tc - check frequently during execution
Ts - print statistics
Tv - verify result: structure, convexity, and in-circle test
Tz - send all output to stdout
TFn - report summary when n or more facets created
TI file - input data from file, no spaces or single quotes
TO file - output results to file, may be enclosed in single quotes
TPn - turn on tracing when point n added to hull
TMn - turn on tracing at merge n
TWn - trace merge facets when width > n
TVn - stop qhull after adding point n, -n for before (see TCn)
TCn - stop qhull after building cone for point n (see TVn)
Precision options:
Cn - radius of centrum (roundoff added). Merge facets if non-convex
An - cosine of maximum angle. Merge facets if cosine > n or non-convex
C-0 roundoff, A-0.99/C-0.01 pre-merge, A0.99/C0.01 post-merge
Rn - randomly perturb computations by a factor of [1-n,1+n]
Wn - min facet width for outside point (before roundoff)
Output formats (may be combined; if none, produces a summary to stdout):
f - facet dump
G - Geomview output (see below)
i - vertices incident to each Delaunay region
m - Mathematica output (2-d only, lifted to a paraboloid)
o - OFF format (dim, points, and facets as a paraboloid)
p - point coordinates (lifted to a paraboloid)
s - summary (stderr)
More formats:
Fa - area for each Delaunay region
FA - compute total area for option 's'
Fc - count plus coincident points for each Delaunay region
Fd - use cdd format for input (homogeneous with offset first)
FD - use cdd format for numeric output (offset first)
FF - facet dump without ridges
FI - ID of each Delaunay region
Fm - merge count for each Delaunay region (511 max)
FM - Maple output (2-d only, lifted to a paraboloid)
Fn - count plus neighboring region for each Delaunay region
FN - count plus neighboring region for each point
FO - options and precision constants
FP - nearest point and distance for each coincident point
FQ - command used for qdelaunay
Fs - summary: #int (8), dimension, #points, tot vertices, tot facets,
for output: #vertices, #Delaunay regions,
#coincident points, #non-simplicial regions
#real (2), max outer plane, min vertex
FS - sizes: #int (0)
#real (2), tot area, 0
Fv - count plus vertices for each Delaunay region
Fx - extreme points of Delaunay triangulation (on convex hull)
Geomview options (2-d and 3-d)
Ga - all points as dots
Gp - coplanar points and vertices as radii
Gv - vertices as spheres
Gi - inner planes only
Gn - no planes
Go - outer planes only
Gc - centrums
Gh - hyperplane intersections
Gr - ridges
GDn - drop dimension n in 3-d and 4-d output
Gt - transparent outer ridges to view 3-d Delaunay
Print options:
PAn - keep n largest Delaunay regions by area
Pdk:n - drop facet if normal[k] &lt;= n (default 0.0)
PDk:n - drop facet if normal[k] >= n
Pg - print good Delaunay regions (needs 'QGn' or 'QVn')
PFn - keep Delaunay regions whose area is at least n
PG - print neighbors of good regions (needs 'QGn' or 'QVn')
PMn - keep n Delaunay regions with most merges
Po - force output. If error, output neighborhood of facet
Pp - do not report precision problems
. - list of all options
- - one line descriptions of all options
</pre>
<!-- Navigation links -->
<hr>
<p><b>Up:</b> <a href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To:</b> <a href="#synopsis">sy</a>nopsis
&#149; <a href="#input">in</a>put &#149; <a href="#outputs">ou</a>tputs
&#149; <a href="#controls">co</a>ntrols &#149; <a href="#graphics">gr</a>aphics
&#149; <a href="#notes">no</a>tes &#149; <a href="#conventions">co</a>nventions
&#149; <a href="#options">op</a>tions
<!-- GC common information -->
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img src="qh--geom.gif"
align="middle" width="40" height="40"></a><i>The Geometry Center
Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,693 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Examples of Qhull</title>
</head>
<body>
<!-- Navigation links -->
<p><a name="TOP"><b>Up:</b></a> <a href="http://www.qhull.org">Home
page</a> for Qhull <br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual</a>: Table of Contents<br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To: </b><a href="#TOC">Qhull examples: Table of Contents</a> (please wait
while loading)<br>
<hr>
<!-- Main text of document -->
<h1><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/half.html"><img
src="qh--half.gif" alt="[halfspace]" align="middle" width="100"
height="100"></a> Examples of Qhull</h1>
<p>This section of the Qhull manual will introduce you to Qhull
and its options. Each example is a file for viewing with <a
href="index.htm#geomview">Geomview</a>. You will need to
use a Unix computer with a copy of Geomview.
<p>
If you are not running Unix, you can view <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/welcome.html">pictures</a>
for some of the examples. To understand Qhull without Geomview, try the
examples in <a href="qh-quick.htm#programs">Programs</a> and
<a href="qh-quick.htm#programs">Programs/input</a>. You can also try small
examples that you compute by hand. Use <a href="rbox.htm">rbox</a>
to generate examples.
<p>
To generate the Geomview examples, execute the shell script <tt>eg/q_eg</tt>.
It uses <tt>rbox</tt>. The shell script <tt>eg/q_egtest</tt> generates
test examples, and <tt>eg/q_test</tt> exercises the code. If you
find yourself viewing the inside of a 3-d example, use Geomview's
normalization option on the 'obscure' menu.</p>
<p><b>Copyright &copy; 1995-2015 C.B. Barber</b></p>
<hr>
<h2><a href="#TOP">&#187;</a><a name="TOC">Qhull examples: Table of
Contents </a></h2>
<ul>
<li><a href="#2d">2-d and 3-d examples</a></li>
<li><a href="#how">How Qhull adds a point</a></li>
<li><a href="#joggle">Triangulated output or joggled input</a></li>
<li><a href="#delaunay">Delaunay and Voronoi diagrams</a></li>
<li><a href="#merge">Facet merging for imprecision</a></li>
<li><a href="#4d">4-d objects</a></li>
<li><a href="#half">Halfspace intersections</a></li>
</ul>
<hr>
<ul>
<li><a href="#TOC">&#187;</a><a name="2d">2-d and 3-d examples</a><ul>
<li><a href="#01">eg.01.cube</a></li>
<li><a href="#02">eg.02.diamond.cube</a></li>
<li><a href="#03">eg.03.sphere</a></li>
<li><a href="#04">eg.04.circle</a></li>
<li><a href="#05">eg.05.spiral</a></li>
<li><a href="#06">eg.06.merge.square</a></li>
<li><a href="#07">eg.07.box</a></li>
<li><a href="#08a">eg.08a.cube.sphere</a></li>
<li><a href="#08b">eg.08b.diamond.sphere</a></li>
<li><a href="#09">eg.09.lens</a></li>
</ul>
</li>
<li><a href="#TOC">&#187;</a><a name="how">How Qhull adds a point</a><ul>
<li><a href="#10a">eg.10a.sphere.visible</a></li>
<li><a href="#10b">eg.10b.sphere.beyond</a></li>
<li><a href="#10c">eg.10c.sphere.horizon</a></li>
<li><a href="#10d">eg.10d.sphere.cone</a></li>
<li><a href="#10e">eg.10e.sphere.new</a></li>
<li><a href="#14">eg.14.sphere.corner</a></li>
</ul>
</li>
<li><a href="#TOC">&#187;</a> <a name="joggle">Triangulated output or joggled input</a>
<ul>
<li><a href="#15a">eg.15a.surface</a></li>
<li><a href="#15b">eg.15b.triangle</a></li>
<li><a href="#15c">eg.15c.joggle</a></li>
</ul>
<li><a href="#TOC">&#187;</a><a name="delaunay"> Delaunay and
Voronoi diagrams</a><ul>
<li><a href="#17a">eg.17a.delaunay.2</a></li>
<li><a href="#17b">eg.17b.delaunay.2i</a></li>
<li><a href="#17c">eg.17c.delaunay.2-3</a></li>
<li><a href="#17d">eg.17d.voronoi.2</a></li>
<li><a href="#17e">eg.17e.voronoi.2i</a></li>
<li><a href="#17f">eg.17f.delaunay.3</a></li>
<li><a href="#18a">eg.18a.furthest.2-3</a></li>
<li><a href="#18b">eg.18b.furthest-up.2-3</a></li>
<li><a href="#18c">eg.18c.furthest.2</a></li>
<li><a href="#19">eg.19.voronoi.region.3</a></li>
</ul>
</li>
<li><a href="#TOC">&#187;</a><a name="merge">Facet merging for
imprecision </a><ul>
<li><a href="#20">eg.20.cone</a></li>
<li><a href="#21a">eg.21a.roundoff.errors</a></li>
<li><a href="#21b">eg.21b.roundoff.fixed</a></li>
<li><a href="#22a">eg.22a.merge.sphere.01</a></li>
<li><a href="#22b">eg.22b.merge.sphere.-01</a></li>
<li><a href="#22c">eg.22c.merge.sphere.05</a></li>
<li><a href="#22d">eg.22d.merge.sphere.-05</a></li>
<li><a href="#23">eg.23.merge.cube</a></li>
</ul>
</li>
<li><a href="#TOC">&#187;</a><a name="4d">4-d objects</a><ul>
<li><a href="#24">eg.24.merge.cube.4d-in-3d</a></li>
<li><a href="#30">eg.30.4d.merge.cube</a></li>
<li><a href="#31">eg.31.4d.delaunay</a></li>
<li><a href="#32">eg.32.4d.octant</a></li>
</ul>
</li>
<li><a href="#TOC">&#187;</a><a name="half">Halfspace
intersections</a><ul>
<li><a href="#33a">eg.33a.cone</a></li>
<li><a href="#33b">eg.33b.cone.dual</a></li>
<li><a href="#33c">eg.33c.cone.halfspace</a></li>
</ul>
</li>
</ul>
<hr>
<h2><a href="#TOC">&#187;</a>2-d and 3-d examples</h2>
<h3><a href="#2d">&#187;</a><a name="01">rbox c D3 | qconvex G
&gt;eg.01.cube </a></h3>
<p>The first example is a cube in 3-d. The color of each facet
indicates its normal. For example, normal [0,0,1] along the Z
axis is (r=0.5, g=0.5, b=1.0). With the 'Dn' option in <tt>rbox</tt>,
you can generate hypercubes in any dimension. Above 7-d the
number of intermediate facets grows rapidly. Use '<a
href="qh-optt.htm#TFn">TFn</a>' to track qconvex's progress. Note
that each facet is a square that qconvex merged from coplanar
triangles.</p>
<h3><a href="#2d">&#187;</a><a name="02">rbox c d G3.0 | qconvex G
&gt;eg.02.diamond.cube </a></h3>
<p>The second example is a cube plus a diamond ('d') scaled by <tt>rbox</tt>'s
'G' option. In higher dimensions, diamonds are much simpler than
hypercubes. </p>
<h3><a href="#2d">&#187;</a><a name="03">rbox s 100 D3 | qconvex G
&gt;eg.03.sphere </a></h3>
<p>The <tt>rbox s</tt> option generates random points and
projects them to the d-sphere. All points should be on the convex
hull. Notice that random points look more clustered than you
might expect. You can get a smoother distribution by merging
facets and printing the vertices, e.g.,<i> rbox 1000 s | qconvex
A-0.95 p | qconvex G &gt;eg.99</i>.</p>
<h3><a href="#2d">&#187;</a><a name="04">rbox s 100 D2 | qconvex G
&gt;eg.04.circle </a></h3>
<p>In 2-d, there are many ways to generate a convex hull. One of
the earliest algorithms, and one of the fastest, is the 2-d
Quickhull algorithm [c.f., Preparata &amp; Shamos <a
href="index.htm#pre-sha85">'85</a>]. It was the model for
Qhull.</p>
<h3><a href="#2d">&#187;</a><a name="05">rbox 10 l | qconvex G
&gt;eg.05.spiral </a></h3>
<p>One rotation of a spiral.</p>
<h3><a href="#2d">&#187;</a><a name="06">rbox 1000 D2 | qconvex C-0.03
Qc Gapcv &gt;eg.06.merge.square</a></h3>
<p>This demonstrates how Qhull handles precision errors. Option '<a
href="qh-optc.htm#Cn">C-0.03</a>' requires a clearly convex angle
between adjacent facets. Otherwise, Qhull merges the facets. </p>
<p>This is the convex hull of random points in a square. The
facets have thickness because they must be outside all points and
must include their vertices. The colored lines represent the
original points and the spheres represent the vertices. Floating
in the middle of each facet is the centrum. Each centrum is at
least 0.03 below the planes of its neighbors. This guarantees
that the facets are convex.</p>
<h3><a href="#2d">&#187;</a><a name="07">rbox 1000 D3 | qconvex G
&gt;eg.07.box </a></h3>
<p>Here's the same distribution but in 3-d with Qhull handling
machine roundoff errors. Note the large number of facets. </p>
<h3><a href="#2d">&#187;</a><a name="08a">rbox c G0.4 s 500 | qconvex G
&gt;eg.08a.cube.sphere </a></h3>
<p>The sphere is just barely poking out of the cube. Try the same
distribution with randomization turned on ('<a
href="qh-optq.htm#Qr">Qr</a>'). This turns Qhull into a
randomized incremental algorithm. To compare Qhull and
randomization, look at the number of hyperplanes created and the
number of points partitioned. Don't compare CPU times since Qhull's
implementation of randomization is inefficient. The number of
hyperplanes and partitionings indicate the dominant costs for
Qhull. With randomization, you'll notice that the number of
facets created is larger than before. This is especially true as
you increase the number of points. It is because the randomized
algorithm builds most of the sphere before it adds the cube's
vertices.</p>
<h3><a href="#2d">&#187;</a><a name="08b">rbox d G0.6 s 500 | qconvex G
&gt;eg.08b.diamond.sphere </a></h3>
<p>This is a combination of the diamond distribution and the
sphere.</p>
<h3><a href="#2d">&#187;</a><a name="09">rbox 100 L3 G0.5 s | qconvex
G &gt;eg.09.lens </a></h3>
<p>Each half of the lens distribution lies on a sphere of radius
three. A directed search for the furthest facet below a point
(e.g., qh_findbest in <tt>geom.c</tt>) may fail if started from
an arbitrary facet. For example, if the first facet is on the
opposite side of the lens, a directed search will report that the
point is inside the convex hull even though it is outside. This
problem occurs whenever the curvature of the convex hull is less
than a sphere centered at the test point. </p>
<p>To prevent this problem, Qhull does not use directed search
all the time. When Qhull processes a point on the edge of the
lens, it partitions the remaining points with an exhaustive
search instead of a directed search (see qh_findbestnew in <tt>geom2.c</tt>).
</p>
<h2><a href="#TOC">&#187;</a>How Qhull adds a point</h2>
<h3><a href="#how">&#187;</a><a name="10a">rbox 100 s P0.5,0.5,0.5 |
qconvex Ga QG0 &gt;eg.10a.sphere.visible</a></h3>
<p>The next 4 examples show how Qhull adds a point. The point
[0.5,0.5,0.5] is at one corner of the bounding box. Qhull adds a
point using the beneath-beyond algorithm. First Qhull finds all
of the facets that are visible from the point. Qhull will replace
these facets with new facets.</p>
<h3><a href="#how">&#187;</a><a name="10b">rbox 100 s
P0.5,0.5,0.5|qconvex Ga QG-0 &gt;eg.10b.sphere.beyond </a></h3>
<p>These are the facets that are not visible from the point.
Qhull will keep these facets.</p>
<h3><a href="#how">&#187;</a><a name="10c">rbox 100 s P0.5,0.5,0.5 |
qconvex PG Ga QG0 &gt;eg.10c.sphere.horizon </a></h3>
<p>These facets are the horizon facets; they border the visible
facets. The inside edges are the horizon ridges. Each horizon
ridge will form the base for a new facet.</p>
<h3><a href="#how">&#187;</a><a name="10d">rbox 100 s P0.5,0.5,0.5 |
qconvex Ga QV0 PgG &gt;eg.10d.sphere.cone </a></h3>
<p>This is the cone of points from the new point to the horizon
facets. Try combining this image with <tt>eg.10c.sphere.horizon</tt>
and <tt>eg.10a.sphere.visible</tt>.
</p>
<h3><a href="#how">&#187;</a><a name="10e">rbox 100 s P0.5,0.5,0.5 |
qconvex Ga &gt;eg.10e.sphere.new</a></h3>
<p>This is the convex hull after [0.5,0.5,0.5] has been added.
Note that in actual practice, the above sequence would never
happen. Unlike the randomized algorithms, Qhull always processes
a point that is furthest in an outside set. A point like
[0.5,0.5,0.5] would be one of the first points processed.</p>
<h3><a href="#how">&#187;</a><a name="14">rbox 100 s P0.5,0.5,0.5 |
qhull Ga QV0g Q0 &gt;eg.14.sphere.corner</a></h3>
<p>The '<a href="qh-optq.htm#QVn">QVn</a>', '<a
href="qh-optq.htm#QGn">QGn </a>' and '<a href="qh-optp.htm#Pdk">Pdk</a>'
options define good facets for Qhull. In this case '<a
href="qh-optq.htm#QVn">QV0</a>' defines the 0'th point
[0.5,0.5,0.5] as the good vertex, and '<a href="qh-optq.htm#Qg">Qg</a>'
tells Qhull to only build facets that might be part of a good
facet. This technique reduces output size in low dimensions. It
does not work with facet merging.</p>
<h2><a href="#TOC">&#187;</a>Triangulated output or joggled input</h2>
<h3><a href="#joggle">&#187;</a><a name="15a">rbox 500 W0 | qconvex QR0 Qc Gvp &gt;eg.15a.surface</a></h3>
<p>This is the convex hull of 500 points on the surface of
a cube. Note the large, non-simplicial facet for each face.
Qhull merges non-convex facets.
<p>If the facets were not merged, Qhull
would report precision problems. For example, turn off facet merging
with option '<a href="qh-optq.htm#Q0">Q0</a>'. Qhull may report concave
facets, flipped facets, or other precision errors:
<blockquote>
rbox 500 W0 | qhull QR0 Q0
</blockquote>
<p>
<h3><a href="#joggle">&#187;</a><a name="15b">rbox 500 W0 | qconvex QR0 Qt Qc Gvp &gt;eg.15b.triangle</a></h3>
<p>Like the previous examples, this is the convex hull of 500 points on the
surface of a cube. Option '<a href="qh-optq.htm#Qt">Qt</a>' triangulates the
non-simplicial facets. Triangulated output is
particularly helpful for Delaunay triangulations.
<p>
<h3><a href="#joggle">&#187;</a><a name="15c">rbox 500 W0 | qconvex QR0 QJ5e-2 Qc Gvp &gt;eg.15c.joggle</a></h3>
<p>This is the convex hull of 500 joggled points on the surface of
a cube. The option '<a href="qh-optq.htm#QJn">QJ5e-2</a>'
sets a very large joggle to make the effect visible. Notice
that all of the facets are triangles. If you rotate the cube,
you'll see red-yellow lines for coplanar points.
<p>
With option '<a href="qh-optq.htm#QJn">QJ</a>', Qhull joggles the
input to avoid precision problems. It adds a small random number
to each input coordinate. If a precision
error occurs, it increases the joggle and tries again. It repeats
this process until no precision problems occur.
<p>
Joggled input is a simple solution to precision problems in
computational geometry. Qhull can also merge facets to handle
precision problems. See <a href="qh-impre.htm#joggle">Merged facets or joggled input</a>.
<h2><a href="#TOC">&#187;</a>Delaunay and Voronoi diagrams</h2>
<h3><a href="#delaunay">&#187;</a><a name="17a">qdelaunay Qt
&lt;eg.data.17 GnraD2 &gt;eg.17a.delaunay.2</a></h3>
<p>
The input file, <tt>eg.data.17</tt>, consists of a square, 15 random
points within the outside half of the square, and 6 co-circular
points centered on the square.
<p>The Delaunay triangulation is the triangulation with empty
circumcircles. The input for this example is unusual because it
includes six co-circular points. Every triangular subset of these
points has the same circumcircle. Option '<a href="qh-optq.htm#Qt">Qt</a>'
triangulates the co-circular facet.</p>
<h3><a href="#delaunay">&#187;</a><a name="17b">qdelaunay &lt;eg.data.17
GnraD2 &gt;eg.17b.delaunay.2i</a></h3>
<p>This is the same example without triangulated output ('<a href="qh-optq.htm#Qt">Qt</a>'). qdelaunay
merges the non-unique Delaunay triangles into a hexagon.</p>
<h3><a href="#delaunay">&#187;</a><a name="17c">qdelaunay &lt;eg.data.17
Ga &gt;eg.17c.delaunay.2-3 </a></h3>
<p>This is how Qhull generated both diagrams. Use Geomview's
'obscure' menu to turn off normalization, and Geomview's
'cameras' menu to turn off perspective. Then load this <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/delaunay.html">object</a>
with one of the previous diagrams.</p>
<p>The points are lifted to a paraboloid by summing the squares
of each coordinate. These are the light blue points. Then the
convex hull is taken. That's what you see here. If you look up
the Z-axis, you'll see that points and edges coincide.</p>
<h3><a href="#delaunay">&#187;</a><a name="17d">qvoronoi QJ
&lt;eg.data.17 Gna &gt;eg.17d.voronoi.2</a></h3>
<p>The Voronoi diagram is the dual of the Delaunay triangulation.
Here you see the original sites and the Voronoi vertices.
Notice the each
vertex is equidistant from three sites. The edges indicate the
Voronoi region for a site. Qhull does not draw the unbounded
edges. Instead, it draws extra edges to close the unbounded
Voronoi regions. You may find it helpful to enclose the input
points in a square. You can compute the unbounded
rays from option '<a href="qh-optf.htm#Fo2">Fo</a>'.
</p>
<p>Instead
of triangulated output ('<a href="qh-optq.htm#Qt">Qt</a>'), this
example uses joggled input ('<a href="qh-optq.htm#QJn">QJ</a>').
Normally, you should use neither 'QJ' nor 'Qt' for Voronoi diagrams.
<h3><a href="#delaunay">&#187;</a><a name="17e">qvoronoi &lt;eg.data.17
Gna &gt;eg.17e.voronoi.2i </a></h3>
<p>This looks the same as the previous diagrams, but take a look
at the data. Run 'qvoronoi p &lt;eg/eg.data.17'. This prints
the Voronoi vertices.
<p>With 'QJ', there are four nearly identical Voronoi vertices
within 10^-11 of the origin. Option 'QJ' joggled the input. After the joggle,
the cocircular
input sites are no longer cocircular. The corresponding Voronoi vertices are
similar but not identical.
<p>This example does not use options 'Qt' or 'QJ'. The cocircular
input sites define one Voronoi vertex near the origin. </p>
<p>Option 'Qt' would triangulate the corresponding Delaunay region into
four triangles. Each triangle is assigned the same Voronoi vertex.</p>
<h3><a href="#delaunay">&#187;</a><a name="17f"> rbox c G0.1 d |
qdelaunay Gt Qz &lt;eg.17f.delaunay.3 </a></h3>
<p>This is the 3-d Delaunay triangulation of a small cube inside
a prism. Since the outside ridges are transparent, it shows the
interior of the outermost facets. If you slice open the
triangulation with Geomview's ginsu, you will see that the innermost
facet is a cube. Note the use of '<a href="qh-optq.htm#Qz">Qz</a>'
to add a point &quot;at infinity&quot;. This avoids a degenerate
input due to cospherical points.</p>
<h3><a href="#delaunay">&#187;</a><a name="18a">rbox 10 D2 d | qdelaunay
Qu G &gt;eg.18a.furthest.2-3 </a></h3>
<p>The furthest-site Voronoi diagram contains Voronoi regions for
points that are <i>furthest </i>from an input site. It is the
dual of the furthest-site Delaunay triangulation. You can
determine the furthest-site Delaunay triangulation from the
convex hull of the lifted points (<a href="#17c">eg.17c.delaunay.2-3</a>).
The upper convex hull (blue) generates the furthest-site Delaunay
triangulation. </p>
<h3><a href="#delaunay">&#187;</a><a name="18b">rbox 10 D2 d | qdelaunay
Qu Pd2 G &gt;eg.18b.furthest-up.2-3</a></h3>
<p>This is the upper convex hull of the preceding example. The
furthest-site Delaunay triangulation is the projection of the
upper convex hull back to the input points. The furthest-site
Voronoi vertices are the circumcenters of the furthest-site
Delaunay triangles. </p>
<h3><a href="#delaunay">&#187;</a><a name="18c">rbox 10 D2 d | qvoronoi
Qu Gv &gt;eg.18c.furthest.2</a></h3>
<p>This shows an incomplete furthest-site Voronoi diagram. It
only shows regions with more than two vertices. The regions are
artificially truncated. The actual regions are unbounded. You can
print the regions' vertices with 'qvoronoi Qu <a
href="qh-opto.htm#o">o</a>'. </p>
<p>Use Geomview's 'obscure' menu to turn off normalization, and
Geomview's 'cameras' menu to turn off perspective. Then load this
with the upper convex hull.</p>
<h3><a href="#delaunay">&#187;</a><a name="19">rbox 10 D3 | qvoronoi QV5
p | qconvex G &gt;eg.19.voronoi.region.3 </a></h3>
<p>This shows the Voronoi region for input site 5 of a 3-d
Voronoi diagram.</p>
<h2><a href="#TOC">&#187;</a>Facet merging for imprecision</h2>
<h3><a href="#merge">&#187;</a><a name="20">rbox r s 20 Z1 G0.2 |
qconvex G &gt;eg.20.cone </a></h3>
<p>There are two things unusual about this <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/cone.html">cone</a>.
One is the large flat disk at one end and the other is the
rectangles about the middle. That's how the points were
generated, and if those points were exact, this is the correct
hull. But <tt>rbox</tt> used floating point arithmetic to
generate the data. So the precise convex hull should have been
triangles instead of rectangles. By requiring convexity, Qhull
has recovered the original design.</p>
<h3><a href="#merge">&#187;</a><a name="21a">rbox 200 s | qhull Q0
R0.01 Gav Po &gt;eg.21a.roundoff.errors </a></h3>
<p>This is the convex hull of 200 cospherical points with
precision errors ignored ('<a href="qh-optq.htm#Q0">Q0</a>'). To
demonstrate the effect of roundoff error, we've added a random
perturbation ('<a href="qh-optc.htm#Rn">R0.01</a>') to every
distance and hyperplane calculation. Qhull, like all other convex
hull algorithms with floating point arithmetic, makes
inconsistent decisions and generates wildly wrong results. In
this case, one or more facets are flipped over. These facets have
the wrong color. You can also turn on 'normals' in Geomview's
appearances menu and turn off 'facing normals'. There should be
some white lines pointing in the wrong direction. These
correspond to flipped facets. </p>
<p>Different machines may not produce this picture. If your
machine generated a long error message, decrease the number of
points or the random perturbation ('<a href="qh-optc.htm#Rn">R0.01</a>').
If it did not report flipped facets, increase the number of
points or perturbation.</p>
<h3><a href="#merge">&#187;</a><a name="21b">rbox 200 s | qconvex Qc
R0.01 Gpav &gt;eg.21b.roundoff.fixed </a></h3>
<p>Qhull handles the random perturbations and returns an
imprecise <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/fixed.html">sphere</a>.
In this case, the output is a weak approximation to the points.
This is because a random perturbation of '<a
href="qh-optc.htm#Rn">R0.01 </a>' is equivalent to losing all but
1.8 digits of precision. The outer planes float above the points
because Qhull needs to allow for the maximum roundoff error. </p>
<p>
If you start with a smaller random perturbation, you
can use joggle ('<a href="qh-optq.htm#QJn">QJn</a>') to avoid
precision problems. You need to set <i>n</i> significantly
larger than the random perturbation. For example, try
'rbox 200 s | qconvex Qc R1e-4 QJ1e-1'.
<h3><a href="#merge">&#187;</a><a name="22a">rbox 1000 s| qconvex C0.01
Qc Gcrp &gt;eg.22a.merge.sphere.01</a></h3>
<h3><a href="#merge">&#187;</a><a name="22b">rbox 1000 s| qconvex
C-0.01 Qc Gcrp &gt;eg.22b.merge.sphere.-01</a></h3>
<h3><a href="#merge">&#187;</a><a name="22c">rbox 1000 s| qconvex C0.05
Qc Gcrpv &gt;eg.22c.merge.sphere.05</a></h3>
<h3><a href="#merge">&#187;</a><a name="22d">rbox 1000 s| qconvex
C-0.05 Qc Gcrpv &gt;eg.22d.merge.sphere.-05</a></h3>
<p>The next four examples compare post-merging and pre-merging ('<a
href="qh-optc.htm#Cn2">Cn</a>' vs. '<a href="qh-optc.htm#Cn">C-n</a>').
Qhull uses '-' as a flag to indicate pre-merging.</p>
<p>Post-merging happens after the convex hull is built. During
post-merging, Qhull repeatedly merges an independent set of
non-convex facets. For a given set of parameters, the result is
about as good as one can hope for.</p>
<p>Pre-merging does the same thing as post-merging, except that
it happens after adding each point to the convex hull. With
pre-merging, Qhull guarantees a convex hull, but the facets are
wider than those from post-merging. If a pre-merge option is not
specified, Qhull handles machine round-off errors.</p>
<p>You may see coplanar points appearing slightly outside
the facets of the last example. This is becomes Geomview moves
line segments forward toward the viewer. You can avoid the
effect by setting 'lines closer' to '0' in Geomview's camera menu.
<h3><a href="#merge">&#187;</a><a name="23">rbox 1000 | qconvex s
Gcprvah C0.1 Qc &gt;eg.23.merge.cube</a></h3>
<p>Here's the 3-d imprecise cube with all of the Geomview
options. There's spheres for the vertices, radii for the coplanar
points, dots for the interior points, hyperplane intersections,
centrums, and inner and outer planes. The radii are shorter than
the spheres because this uses post-merging ('<a href="qh-optc.htm#Cn2">C0.1</a>')
instead of pre-merging.
<h2><a href="#TOC">&#187;</a>4-d objects</h2>
<p>With Qhull and Geomview you can develop an intuitive sense of
4-d surfaces. When you get into trouble, think of viewing the
surface of a 3-d sphere in a 2-d plane.</p>
<h3><a href="#4d">&#187;</a><a name="24">rbox 5000 D4 | qconvex s GD0v
Pd0:0.5 C-0.02 C0.1 &gt;eg.24.merge.cube.4d-in-3d</a></h3>
<p>Here's one facet of the imprecise cube in 4-d. It's projected
into 3-d (the '<a href="qh-optg.htm#GDn">GDn</a>' option drops
dimension n). Each ridge consists of two triangles between this
facet and the neighboring facet. In this case, Geomview displays
the topological ridges, i.e., as triangles between three
vertices. That is why the cube looks lopsided.</p>
<h3><a href="#4d">&#187;</a><a name="30">rbox 5000 D4 | qconvex s
C-0.02 C0.1 Gh &gt;eg.30.4d.merge.cube </a></h3>
<p><a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/4dcube.html">Here</a>
is the equivalent in 4-d of the imprecise <a href="#06">square</a>
and imprecise <a href="#23">cube</a>. It's the imprecise convex
hull of 5000 random points in a hypercube. It's a full 4-d object
so Geomview's <tt>ginsu </tt>does not work. If you view it in
Geomview, you'll be inside the hypercube. To view 4-d objects
directly, either load the <tt>4dview</tt> module or the <tt>ndview
</tt>module. For <tt>4dview</tt>, you must have started Geomview
in the same directory as the object. For <tt>ndview</tt>,
initialize a set of windows with the prefab menu, and load the
object through Geomview. The <tt>4dview</tt> module includes an
option for slicing along any hyperplane. If you do this in the x,
y, or z plane, you'll see the inside of a hypercube.</p>
<p>The '<a href="qh-optg.htm#Gh">Gh</a>' option prints the
geometric intersections between adjacent facets. Note the strong
convexity constraint for post-merging ('<a href="qh-optc.htm#Cn2">C0.1</a>').
It deletes the small facets.</p>
<h3><a href="#4d">&#187;</a><a name="31">rbox 20 D3 | qdelaunay G
&gt;eg.31.4d.delaunay </a></h3>
<p>The Delaunay triangulation of 3-d sites corresponds to a 4-d
convex hull. You can't see 4-d directly but each facet is a 3-d
object that you can project to 3-d. This is exactly the same as
projecting a 2-d facet of a soccer ball onto a plane.</p>
<p>Here we see all of the facets together. You can use Geomview's
<tt>ndview</tt> to look at the object from several directions.
Try turning on edges in the appearance menu. You'll notice that
some edges seem to disappear. That's because the object is
actually two sets of overlapping facets.</p>
<p>You can slice the object apart using Geomview's <tt>4dview</tt>.
With <tt>4dview</tt>, try slicing along the w axis to get a
single set of facets and then slice along the x axis to look
inside. Another interesting picture is to slice away the equator
in the w dimension.</p>
<h3><a href="#4d">&#187;</a><a name="32">rbox 30 s D4 | qconvex s G
Pd0d1d2D3</a></h3>
<p>This is the positive octant of the convex hull of 30 4-d
points. When looking at 4-d, it's easier to look at just a few
facets at once. If you picked a facet that was directly above
you, then that facet looks exactly the same in 3-d as it looks in
4-d. If you pick several facets, then you need to imagine that
the space of a facet is rotated relative to its neighbors. Try
Geomview's <tt>ndview</tt> on this example.</p>
<h2><a href="#TOC">&#187;</a>Halfspace intersections</h2>
<h3><a href="#half">&#187;</a><a name="33a">rbox 10 r s Z1 G0.3 |
qconvex G &gt;eg.33a.cone </a></h3>
<h3><a href="#half">&#187;</a><a name="33b">rbox 10 r s Z1 G0.3 |
qconvex FV n | qhalf G &gt;eg.33b.cone.dual</a></h3>
<h3><a href="#half">&#187;</a><a name="33c">rbox 10 r s Z1 G0.3 |
qconvex FV n | qhalf Fp | qconvex G &gt;eg.33c.cone.halfspace</a></h3>
<p>These examples illustrate halfspace intersection. The first
picture is the convex hull of two 20-gons plus an apex. The
second picture is the dual of the first. Try loading <a
href="http://www.geom.uiuc.edu/graphics/pix/Special_Topics/Computational_Geometry/half.html">both</a>
at once. Each vertex of the second picture corresponds to a facet
or halfspace of the first. The vertices with four edges
correspond to a facet with four neighbors. Similarly the facets
correspond to vertices. A facet's normal coefficients divided by
its negative offset is the vertice's coordinates. The coordinates
are the intersection of the original halfspaces. </p>
<p>The third picture shows how Qhull can go back and forth
between equivalent representations. It starts with a cone,
generates the halfspaces that define each facet of the cone, and
then intersects these halfspaces. Except for roundoff error, the
third picture is a duplicate of the first. </p>
<!-- Navigation links -->
<hr>
<p><b>Up:</b> <a href="http://www.qhull.org">Home
page for Qhull</a> <br>
<b>Up:</b> <a href="index.htm#TOC">Qhull manual: Table of Contents</a><br>
<b>To:</b> <a href="qh-quick.htm#programs">Programs</a>
&#149; <a href="qh-quick.htm#options">Options</a>
&#149; <a href="qh-opto.htm#output">Output</a>
&#149; <a href="qh-optf.htm#format">Formats</a>
&#149; <a href="qh-optg.htm#geomview">Geomview</a>
&#149; <a href="qh-optp.htm#print">Print</a>
&#149; <a href="qh-optq.htm#qhull">Qhull</a>
&#149; <a href="qh-optc.htm#prec">Precision</a>
&#149; <a href="qh-optt.htm#trace">Trace</a>
&#149; <a href="../src/libqhull_r/index.htm">Functions</a><br>
<b>To: </b><a href="#TOC">Qhull examples: Table of Contents</a> (please wait
while loading)<br>
<!-- GC common information -->
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img src="qh--geom.gif"
align="middle" width="40" height="40"></a><i>The Geometry Center
Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: Sept. 25, 1995 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More