Skip to content

Commit af2304d

Browse files
Removing QuickHull dependency (#881)
* Removed QuickHull Dependency * Replaced Vector3 with glm::vec3 and VertexDataSource (and formatting) * Revert nanobind * Removing Templates (since using glm::vec3 so only need float) * Formatting * Converted glm::vec3 to glm::vec3d and float to double * Fixed Formatting and Removed third_party * Made requested Changes (m_,comments,removing unnecessary code) * Resolving Conflict * Fixed std::move warning (Shouldn't affect performance, ideally) * Reverted third_party directory in bindings * Reverting std::move * Corrected std::move and added glm::dot to calculate distance squared * Reverted m_epsilon due to epsilon and m_epsilon * Fixed some Names * Formatting * Removed all unecessary m_ * Fixed manifold.yaml * Added headers and pragma once * Modified License * Formatting * Activated the two failing tests and added the fix for the algorithm * Modified gitmodules to remove third_party * Removed nanobind
1 parent 75c340f commit af2304d

File tree

10 files changed

+1426
-25
lines changed

10 files changed

+1426
-25
lines changed

.github/workflows/manifold.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
cd ../
6666
lcov --capture --gcov-tool gcov-${{ matrix.gcc }} --ignore-errors mismatch --directory . --output-file ./code_coverage_test.info
6767
lcov --add-tracefile ./code_coverage_init.info --add-tracefile ./code_coverage_test.info --output-file ./code_coverage_total.info
68-
lcov --remove ./code_coverage_total.info '/usr/*' '*/third_party/*' '*/test/*' '*/extras/*' '*/bindings/*' --output-file ./code_coverage.info
68+
lcov --remove ./code_coverage_total.info '/usr/*' '*/test/*' '*/extras/*' '*/bindings/*' --output-file ./code_coverage.info
6969
cd ../
7070
- uses: codecov/codecov-action@v4
7171
if: matrix.parallel_backend == 'NONE'

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "src/third_party/quickhull"]
2-
path = src/third_party/quickhull
3-
url = https://github.com/akuukka/quickhull

src/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# do not add third_party installations
16-
add_subdirectory(third_party EXCLUDE_FROM_ALL)
1715
add_subdirectory(utilities)
1816
add_subdirectory(collider)
1917
add_subdirectory(cross_section)

src/manifold/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
2222
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
2323
target_link_libraries(${PROJECT_NAME}
2424
PUBLIC utilities
25-
PRIVATE $<BUILD_INTERFACE:collider> polygon ${MANIFOLD_INCLUDE} quickhull
25+
PRIVATE $<BUILD_INTERFACE:collider> polygon ${MANIFOLD_INCLUDE}
2626
)
2727

2828
target_compile_options(${PROJECT_NAME} PRIVATE ${MANIFOLD_FLAGS})

src/manifold/src/manifold.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#include <map>
1717
#include <numeric>
1818

19-
#include "QuickHull.hpp"
2019
#include "boolean3.h"
2120
#include "csg_tree.h"
2221
#include "impl.h"
2322
#include "par.h"
23+
#include "quickhull.h"
2424

2525
namespace {
2626
using namespace manifold;
@@ -919,12 +919,12 @@ Manifold Manifold::Hull(const std::vector<glm::vec3>& pts) {
919919
const int numVert = pts.size();
920920
if (numVert < 4) return Manifold();
921921

922-
std::vector<quickhull::Vector3<double>> vertices(numVert);
922+
std::vector<glm::dvec3> vertices(numVert);
923923
for (int i = 0; i < numVert; i++) {
924924
vertices[i] = {pts[i].x, pts[i].y, pts[i].z};
925925
}
926926

927-
quickhull::QuickHull<double> qh;
927+
QuickHull qh;
928928
// bools: correct triangle winding, and use original indices
929929
auto hull = qh.getConvexHull(vertices, false, true);
930930
const auto& triangles = hull.getIndexBuffer();

0 commit comments

Comments
 (0)