Skip to content

Commit

Permalink
Minor cleanup (#988)
Browse files Browse the repository at this point in the history
* documentation update

* remove some todo

* format
  • Loading branch information
pca006132 authored Oct 15, 2024
1 parent 370375e commit bd52d30
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 24 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,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 @@ -362,6 +360,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
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,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:
- `FETCHCONTENT_SOURCE_DIR_GLM`: path to glm source.
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
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 @@ -557,7 +557,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 bd52d30

Please sign in to comment.