Skip to content

Commit

Permalink
merging master
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish committed Oct 15, 2024
2 parents 3c08ad3 + bd52d30 commit f56764f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manifold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libglm-dev libgtest-dev libassimp-dev git libtbb-dev libthrust-dev pkg-config libpython3-dev lcov
sudo apt-get install libglm-dev libgtest-dev libassimp-dev git libtbb-dev pkg-config libpython3-dev lcov
python -m pip install -U trimesh pytest
- uses: actions/checkout@v4
- uses: jwlawson/actions-setup-cmake@v2
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ if(MANIFOLD_PAR)
endif()
if(NOT TBB_FOUND)
logmissingdep("TBB" , "Parallel mode")
# TODO - this isn't recommended by the TBB upstream - should we be
# doing it?
message(STATUS "TBB not found, downloading from source")
set(TBB_TEST OFF CACHE INTERNAL "" FORCE)
set(TBB_STRICT OFF CACHE INTERNAL "" FORCE)
Expand Down Expand Up @@ -343,6 +341,7 @@ endif()
message(STATUS "BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
message(STATUS " ")
message(STATUS "MANIFOLD_PAR: ${MANIFOLD_PAR}")
message(STATUS "MANIFOLD_CROSS_SECTION: ${MANIFOLD_CROSS_SECTION}")
message(STATUS "MANIFOLD_FLAGS: ${MANIFOLD_FLAGS}")
message(STATUS "MANIFOLD_EXPORT: ${MANIFOLD_EXPORT}")
message(STATUS "MANIFOLD_TEST: ${MANIFOLD_TEST}")
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,22 @@ test/manifold_test
```

CMake flags (usage e.g. `-DMANIFOLD_DEBUG=ON`):
- `MANIFOLD_JSBIND=[OFF, <ON>]`: Build js binding when using emscripten.
- `MANIFOLD_JSBIND=[OFF, <ON>]`: Build js binding (when using the emscripten toolchain).
- `MANIFOLD_CBIND=[<OFF>, ON]`: Build C FFI binding.
- `MANIFOLD_PYBIND=[OFF, <ON>]`: Build python binding.
- `MANIFOLD_PAR=[<OFF>, ON]`: Provides multi-thread parallelization, requires `libtbb-dev` enabled.
- `MANIFOLD_CROSS_SECTION=[OFF, <ON>]`: Build CrossSection for 2D support (needed by language bindings).
- `MANIFOLD_PAR=[<OFF>, ON]`: Provides multi-thread parallelization, requires `libtbb-dev` if enabled.
- `MANIFOLD_CROSS_SECTION=[OFF, <ON>]`: Build CrossSection for 2D support (needed by language bindings), requires `Clipper2` if enabled.
- `MANIFOLD_EXPORT=[<OFF>, ON]`: Enables GLB export of 3D models from the tests, requires `libassimp-dev`.
- `MANIFOLD_DEBUG=[<OFF>, ON]`: Enables internal assertions and exceptions.
- `MANIFOLD_DEBUG=[<OFF>, ON]`: Enables internal assertions and exceptions. This incurs around 20% runtime overhead.
- `MANIFOLD_TEST=[OFF, <ON>]`: Build unittests.
- `TRACY_ENABLE=[<OFF>, ON]`: Enable integration with tracy profiler.
See profiling section below.
- `BUILD_TEST_CGAL=[<OFF>, ON]`: Builds a CGAL-based performance [comparison](https://github.com/elalish/manifold/tree/master/extras), requires `libcgal-dev`.
- `BUILD_TEST_CGAL=[<OFF>, ON]`: Builds a CGAL-based performance [comparison](https://github.com/elalish/manifold/tree/master/extras), requires `libcgal-dev` if enabled.

Offline building:
Offline building (with missing dependencies):
- `MANIFOLD_DOWNLOADS=[OFF, <ON>]`: Automatically download missing dependencies.
Need to set `FETCHCONTENT_SOURCE_DIR_*` if the dependency `*` is missing.
- `FETCHCONTENT_SOURCE_DIR_TBB`: path to tbb source (if `MANIFOLD_PAR` is enabled).
- `FETCHCONTENT_SOURCE_DIR_GOOGLETEST`: path to googletest source.

The build instructions used by our CI are in [manifold.yml](https://github.com/elalish/manifold/blob/master/.github/workflows/manifold.yml), which is a good source to check if something goes wrong and for instructions specific to other platforms, like Windows.
Expand Down
5 changes: 2 additions & 3 deletions bindings/python/manifold3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ NB_MODULE(manifold3d, m) {
nb::arg("radius"), get_circular_segments__radius);

m.def("triangulate", &Triangulate, nb::arg("polygons"),
nb::arg("precision") = -1, // TODO document
triangulate__polygons__precision);
nb::arg("precision") = -1, triangulate__polygons__precision);

nb::class_<Manifold>(m, "Manifold")
.def(nb::init<>(), manifold__manifold)
Expand Down Expand Up @@ -401,7 +400,7 @@ NB_MODULE(manifold3d, m) {
},
nb::arg("mesh"), nb::arg("sharpened_edges") = nb::list(),
nb::arg("edge_smoothness") = nb::list(),
// todo params slightly diff
// TODO: params slightly diff
manifold__smooth__mesh_gl__sharpened_edges)
.def_static("batch_boolean", &Manifold::BatchBoolean,
nb::arg("manifolds"), nb::arg("op"),
Expand Down
3 changes: 1 addition & 2 deletions include/manifold/manifold.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ using MeshGL64 = MeshGLP<double, size_t>;
/**
* This library's internal representation of an oriented, 2-manifold, triangle
* mesh - a simple boundary-representation of a solid object. Use this class to
* store and operate on solids, and use MeshGL for input and output, or
* potentially Mesh if only basic geometry is required.
* store and operate on solids, and use MeshGL for input and output.
*
* In addition to storing geometric data, a Manifold can also store an arbitrary
* number of vertex properties. These could be anything, e.g. normals, UV
Expand Down
7 changes: 0 additions & 7 deletions src/sort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,6 @@ void Manifold::Impl::Finish() {
logicErr,
"faceNormal size = " + std::to_string(faceNormal_.size()) +
", NumTri = " + std::to_string(NumTri()));
// TODO: figure out why this has a flaky failure and then enable reading
// vertNormals from a Mesh.
// DEBUG_ASSERT(vertNormal_.size() == NumVert() || vertNormal_.size() == 0,
// logicErr,
// "vertNormal size = " + std::to_string(vertNormal_.size()) +
// ", NumVert = " + std::to_string(NumVert()));

CalculateNormals();
collider_ = Collider(faceBox, faceMorton);

Expand Down
1 change: 0 additions & 1 deletion test/manifold_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ TEST(Manifold, Merge) {
}

TEST(Manifold, PinchedVert) {
// TODO
MeshGL shape;
shape.numProp = 3;
shape.vertProperties = {0, 0, 0, //
Expand Down
4 changes: 0 additions & 4 deletions test/samples_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,9 @@ TEST(Samples, Sponge4) {
TEST(Samples, CondensedMatter16) {
Manifold cm = CondensedMatter(16);
CheckGL(cm);
// FIXME: normals should be correct
// CheckNormals(cm);
}

TEST(Samples, CondensedMatter64) {
Manifold cm = CondensedMatter(64);
CheckGL(cm);
// FIXME: normals should be correct
// CheckNormals(cm);
}

0 comments on commit f56764f

Please sign in to comment.