-
Notifications
You must be signed in to change notification settings - Fork 197
Home
Qhull is a C program with many options.
Qhull includes a C++ interface for limited access to Qhull and its Rbox input generator.
- user_eg3_r.cpp C++ demonstration of rbox and qhull.
- qtest-ok.txt (line 723, "user_eg3") Test output from user_eg3 and other Qhull programs.
- Calling Qhull from C++ programs.
- libqhullcpp Links to C++ source files.
- Missing C++ interface documentation by Doxygen or another Javadoc-style processor. You will need to read the code. The implementation is non-standard. You may need new methods to access Qhull functionality. See #145.
Please consider documenting, improving or rewriting the C++ interface. Many users will thank you.
Developer links
- README -- Programs -- Options -- Changes
- Known problems -- Fixed bugs
- Qhull on 64-bit computers.
- Qhull build systems
- How to debug Qhull
Other source files
- unix_r.c the Qhull program.
- user_eg_r.c Demonstrate rbox and qhull with qh_new_qhull()
- user_eg2_r.c Demonstrate rbox and qhull with C.
- libqhull_r.h User-level .h file with data structures.
- user_r.h User definable settings.
- user_r.c Customize Qhull error message output.
- usermem_r.c Customize Qhull memory management.
- userprintf_r.c Customize Qhull output.
- userprintf_rbox_r.c Customize rbox output.
Testing is postponed to the next release of Qhull (2024.1 or 2025.1).
Reviewed and wrote comments for open issues and pull requests from #144.
Build changes to v8.0.2 (Qhull 2020.2.r) should not adversely affect v8.0.2 code.
- Replaced tag 8.1-alpha4 with 8.1.alpha4 [T. Kloczek #106]
- CMakeLists.txt: properly express dependency of qhullcpp to qhullstatic_r [SpaceIm, M. Valgur #128]
- qhull-exports.def,*.def: Add DATA after qh_version and qh_version2 [B. Sanders #139]
- other symbols in *.def are CODE symbols exported to Windows
Documentation changed to Q17 (was Q15). qh_initflags already sets the option as Q17. Help prompts and 'hidden_options' were updated.
- libqhull_r.h,global_r,merge_r.c: Change Q15-check-duplicates to 'Q17' as coded [djerius #140]
- qconvex_r,qdelaun_r,qhalf_r,unix_r,qvoronoi_r.c::hidden_options: Change Q15 to Q17
- qconvex,qhalf.htm: OFF format 'o' is points instead of vertices [B. Guang #134]
These changes to v8.0.2 (Qhull 2020.2.r) should not adversely affect v8.0.2 code.
- user_r.h, user.h -- Fix header comment for REALmax, REALmin and REALepsilon
- global_r.c, global.c -- Update qh_version2 and new date for qh_version
- CMakeLists.txt -- Update qhull_VERSION
- README.txt -- CMakeCache.txt is in the build/ directory
These changes to v8.0.2 (Qhull 2020.2.r) should not adversely affect v8.0.2 code.
- QhullUser.cpp -- Redefine snprintf as sprintf_s for VS2010 and earlier [cmF3 #103]
- QhullLinkeList.h, QhullSet.h -- Remove unused type parameters from inside a class template [E. Lorenz, J. Nimmer #122, P. Jia]
- qhull_r-exports.def -- Add new symbols from accessors_r.h [J. Heiskala #105]
CMakeLists.txt
- Define 'uninstall' target if not previously defined [F. Ramano #111]
- Add QHULL_ENABLE_TESTING to disable testing if needed [F. Ramano #112]
- Replace 'install' directory with INCLUDE_INSTALL_DIR [R. Wittmaack #113, O. Poplawski #123]
- Move 'cmake_minimum_required' to the first instruction [spacelm #120]
- Use ${LIB_INSTALL_DIR} for the CMake and PkgConfig install directories [O. Poplawski #123]
- Add BUILD_APPLICATIONS to disable build of Qhull executables [M. Kuhn #124]
Makefile
- Add '-lm' for libqhull_r.so as done elsewhere [G. Zhang #114]
- Use 'sed' to allow "8.1-alpha1" as qhull_VERSION in CMakeLists.txt [G. Zhang #115]
Tag Qhull #head for the github additions to Qhull [S.J. Johnson #97]
Testing is postponed to the next release of Qhull.
These changes to v8.0.2 (Qhull 2020.2.r) should not adversely affect v8.0.2 code.
- global_r.c, global.c -- Update qh_version2 and new date for qh_version
Additions
- accessors_r.h/.c -- Accessor functions for qhull integration [S. Johnson, B. Legat #89]
- qhull_r-exports.def -- Add some missing symbols: qh_memcheck and qh_setendpointer [F. Facioni #93]
CMakeLists.txt
- Update qhull_VERSION and qhull_SOVERSION
- Change MSVC to WIN32 for dllimport attribute [B. Nath #80]
- Add BUNDLE DESTINATION to install(QhullTargets) for iOS [#90]
- Define CMAKE_INSTALL_NAME_DIR enabling default set_target_properties [B. Boeckel #94]
- Define CMAKE_INSTALL_RPATH, CMAKE_INSTALL_RPATH_USE_LINK_PATH. CMAKE_BUILD_WITH_INSTALL_RPATH [#94]
Documentation changes
- user_r.c,user_eg2_r.c -- Replace -REALmin with -REALmax in two error messages [S. Hutter #87]
- Fixed various spelling errors in code comments and Changes.txt [luzpaz #84]
Qhull 2020.2 2020/08/31 (8.0.2) is available on github and www.qhull.org
- http://www.qhull.org/download
- git clone [email protected]:qhull/qhull.git
- git checkout 2020.2 # git checkout v8.0.2
- Known problems -- Fixed bugs -- Changes.txt
- Qhull build systems
- Calling Qhull from C++ programs
- How to debug Qhull
- Qhull on 64-bit computers
- How to convert code to reentrant Qhull
Qhull 2020.2 2020/08/31 (8.0.2) updates Qhull's builds and Qhull's C++ interface.
Qhull's builds produce a shared library, libqhull_r.so (qhull_r.dll), several static libraries, and several applications using these libraries. They do not produce deprecated libraries: libqhull.so, qhull.dll, libqhull_p.so, and qhull_p.dll. Users of these libraries should convert their code to reentrant Qhull (libqhull_r.so) or link to libqhullstatic.a.
Qhull's Java-style iterators use a copy constructor to avoid subtle errors due to memory management. Its C++ interface is compatible with C++98.
Many thanks to G. Romualdi, S. Grein, Spacelm, M. Konecny, and T. Roehling for their suggestions and push requests. Qhull 8.0.1 removed an unnecessary dependency by the C++ interface on C++11. Without these changes to user_eg3.cpp, the old "gotchas" of Qhull's Java-style iterators would have remained in Qhull indefinitely.
Please report issues and suggestions for Qhull 2020.2.
All builds
- Install of Qhull builds produce nearly the same results -- see Qhull build systems
- Qhull builds do not produce deprecated libraries (libqhull.so, qhull.dll, libqhull_p.so, and qhull_p.dll). These targets and project files remain available (build/README-build.txt)
- Install the documentation tree (index.htm, README.txt, Changes.txt, html/*, etc.)
- Do not install function documentation. Instead use www.qhull.org/src/libqhull_r/. It includes html links to source files.
CMake builds
- Use the same target name for Debug and non-Debug builds [Spacelm #76]
- Add parameters BUILD_STATIC_LIBS, BUILD_SHARED_LIBS, and LINK_APPS_SHARED [S. Bruens #69]
- If "MSYS Makefiles", change the default CMAKE_INSTALL_PREFIX to "/usr/local"
- Add 'uninstall' to delete the files listed in install_manifest.txt
- Moved qhull.pc.in into the build/ directory [T. Roehling #63]
- Moved CMakeModules into the build/ directory
C++ interface
- QhullUser.h, user_eg3_r.cpp -- Removed C++11 dependencies [G. Romualdi, S. Grein, Spacelm #66,#67,#68]
- Coordinates, PointCoordinates -- Removed the Java-style iterators due to an expensive copy constructor for std::vector.
- QhullLinkedListIterator, QhullHyperplaneIterator, QhullPointIterator, QhullPointsIterator -- These Java-style iterators copy the container instead of pointing to the container. This avoids subtle memory errors if passed a temporary value.
- libqhullcpp/QhullSet.h -- For Qt, declare 'QList toQList() const' to avoid a prototype error
Testing and example programs
- user_eg3_r.cpp: Replaced C++11's range-based-for-loops with Qhull's Qt/Java-style iterators.
Documentation
-
Add Qhull build systems to the GitHub wiki
-
Update the qhullcpp code example in qh-code.html [M. Konecny #71]
-
Various changes to README.txt
-
See Changes.txt for updates to documentation and other changes.
-
For programmers using qh_findbestfacet to locate a Delaunay triangle:
qh_findbestfacet may return an adjacent triangle [F. Drielsma]
Qhull 2020.1 enhanced the C++ interface (QhullUser.cpp with additional support for Voronoi diagrams). See user_eg3 for C++ examples. The build systems provide support for pkg-config, SONAME, DESTDIR (staged installs), PREFIX, QhullExport, and CMAKE_CURRENT_SOURCE_DIR.
Qhull 2019.1 contained numerous bug fixes and improvements to logging, error reporting, and merging. These changes were motivated by new test cases. Most of the troublesome inputs consist of many points approximately 1.0e-13 (scaled to the unit cube) from either nearby points or hyperplanes. Such inputs lead to many merges that eventually fail. These inputs are unlikely to occur in practice. Points substantially closer or further apart are OK. A future version of Qhull will include per-vertex joggle (like option 'QJ').
Qhull 2015.2 fixed memory leaks reported by Marcos Sandim; the CMake build reported by Niclas Rosenvik; and the DevStudio 2012 build. It fixes the return type of QhullLinkedList::last() and back() and includes 'iterator' as requested by Ben Boeckel.
Qhull 2015.1 was the first release of Qhull's reentrant library, libqhull_r. If you call Qhull from a program, you should use libqhull_r instead of libqhull or libqhull_p. The C++ interface uses libqhull_r.
libqhull_r does not use global variables. Instead, a qhT pointer is the first argument to each procedure. This approach was pioneered by Pete Klosterman in 2010.
Qhull 2015.1 fixed error QH6228 "all neighbors ... are flipped or upper Delaunay". This error occurred rarely with nine reports. J. Metz provided input that triggered this error.
Qhull 2015.1 includes rbox option 'Cn,r,m' to generate nearly coincident points. This is a newly understood, bad case for Qhull. It will be fixed in a later version of Qhull by merging facets before adding a new point. A bounding box for Delaunay triangulations and Voronoi diagrams may alleviate the problem. For more information, see "Nearly coincident points on an edge" in Nearly coincident points on an edge.
Version 2015.0.7 cleans up Qhull's collection classes and iterators, with thanks to Filip Jares for reporting these problems.
Version 2015.0.6 makes it easier to remove references to exit(), stderr, and stdout from libqhull, libqhull_r, and libqhullcpp. By redefining usermem_r.c, all references are removed except for two instances of stderr (to initialize a null FILE* parameter) [D. Sterratt].
Version 2015.0.1 increased the maximum vertex ID and ridge ID from 16M to 4G [H. Strandenes, C. Cantwell]
Comments, errors, suggestions are welcome.
--Brad Barber