8000 Misc changes by pca006132 · Pull Request #1162 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Misc changes #1162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
url: https://pypi.org/p/manifold3d
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
if: ${{ github.event_name == 'release' }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to add instructions to our release checklist?

steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
1. Make a new branch called the version, e.g. v2.3.0.
1. Use VSCode to search and replace the old version with the new - so far in test-cmake.sh, flake.nix, pyproject.toml, and package.json.
1. Also update CMakeLists.txt version by searching for "set(MANIFOLD_VERSION_".
1. Commit, push, open a PR, verify tests pass, merge.
1. Commit, push, open a PR, verify tests pass, manually trigger PyPI CI, merge.
1. On Github, draft a new release, make a new tag with the version number, add release notes, and publish.
1. Check the Actions and verify that both PyPI and npm publishing actions ran successfully.
1. Verify the npm [package](https://www.npmjs.com/package/manifold-3d?activeTab=code) looks good - unpacked size should be close to 1MB.
Expand Down
9 changes: 4 additions & 5 deletions cmake/manifoldDeps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ if(MANIFOLD_CROSS_SECTION)
FetchContent_Declare(
Clipper2
GIT_REPOSITORY https://github.com/AngusJohnson/Clipper2.git
# Nov 22, 2024
GIT_TAG a8269cafe92cdbf92572bceda5e9fdacc4684b51
# Jan 27, 2025
GIT_TAG Clipper2_1.5.2
GIT_PROGRESS TRUE
SOURCE_SUBDIR CPP
EXCLUDE_FROM_ALL
Expand All @@ -131,7 +131,7 @@ if(TRACY_ENABLE)
FetchContent_Declare(
tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG v0.10
GIT_TAG v0.11.1
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
EXCLUDE_FROM_ALL
Expand Down Expand Up @@ -180,8 +180,7 @@ if(MANIFOLD_PYBIND)
FetchContent_Declare(
nanobind
GIT_REPOSITORY https://github.com/wjakob/nanobind.git
GIT_TAG
784efa2a0358a4dc5432c74f5685ee026e20f2b6 # v2.2.0
GIT_TAG v2.5.0
GIT_PROGRESS TRUE
EXCLUDE_FROM_ALL
)
Expand Down
1 change: 1 addition & 0 deletions src/polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void CheckGeometry(const std::vector<ivec3> &triangles,
}

void Dump(const PolygonsIdx &polys, double epsilon) {
std::cout << std::setprecision(16);
std::cout << "Polygon 0 " << epsilon << " " << polys.size() << std::endl;
for (auto poly : polys) {
std::cout << poly.size() << std::endl;
Expand Down
2 changes: 0 additions & 2 deletions test/boolean_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,10 @@ TEST(Boolean, Precision2) {

TEST(Boolean, DISABLED_SimpleCubeRegression) {
ManifoldParams().intermediateChecks = true;
ManifoldParams().processOverlaps = false;
Manifold result =
Manifold::Cube().Rotate(-0.10000000000000001, 0.10000000000000001, -1.) +
Manifold::Cube() -
Manifold::Cube().Rotate(-0.10000000000000001, -0.10000000000066571, -1.);
EXPECT_EQ(result.Status(), Manifold::Error::NoError);
ManifoldParams().intermediateChecks = false;
ManifoldParams().processOverlaps = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the trouble with this test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It produces self-intersecting results (more than epsilon):

image

}
6 changes: 5 additions & 1 deletion test/samples_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,17 @@ TEST(Samples, Sponge4) {
#endif
#endif

TEST(Samples, DISABLED_CondensedMatter16) {
TEST(Samples, CondensedMatter16) {
// FIXME: Triangulation can be invalid
bool old = PolygonParams().processOverlaps;
PolygonParams().processOverlaps = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for the bad triangulation - did you output that poly with full precision? It says they exactly share a vertex position, but I'm guessing they actually overlap slightly? Because otherwise I think the triangulator should work. When you find polys like this and they turn out to actually be epsilon-valid, go ahead and add them to our polygon test corpus.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated, but it is indeed sharing the exact same vertex position:

Polygon 0 2.306422737411849e-11 2
18
3.493267459305203 8.14635
3.188192877073223 7.673607122926777
3.287098975966871 7.673607122926777
3.287098975966871 7.673607122926777
3.304015665365264 7.686855769635112
3.493267459305203 8.14635
3.188192877073223 7.673607122926777
3.493267459305203 8.14635
3.493267459305203 8.14635
3.493267459305203 8.14635
3.493267459305203 8.14635
3.493267459305203 8.14635
3.493267459305203 8.14635
3.5889649365369 7.673607122926777
3.493267459305203 8.14635
3.47348551191873 7.693480092989279
3.49005883764325 7.673607122926777
3.5889649365369 7.673607122926777
5
3.401099121578296 7.730144750127856
3.419703476450267 7.724547521102497
3.493267459305203 8.14635
3.380015762439546 7.724547521102497
3.401099121578296 7.730144750127856
# ... 
show(array([
  [3.493267459305203, 8.14635],
  [3.188192877073223, 7.673607122926777],
  [3.287098975966871, 7.673607122926777],
  [3.287098975966871, 7.673607122926777],
  [3.304015665365264, 7.686855769635112],
  [3.493267459305203, 8.14635],
  [3.188192877073223, 7.673607122926777],
  [3.493267459305203, 8.14635],
  [3.493267459305203, 8.14635],
  [3.493267459305203, 8.14635],
  [3.493267459305203, 8.14635],
  [3.493267459305203, 8.14635],
  [3.493267459305203, 8.14635],
  [3.5889649365369, 7.673607122926777],
  [3.493267459305203, 8.14635],
  [3.47348551191873, 7.693480092989279],
  [3.49005883764325, 7.673607122926777],
  [3.5889649365369, 7.673607122926777],
]))
show(array([
  [3.401099121578296, 7.730144750127856],
  [3.419703476450267, 7.724547521102497],
  [3.493267459305203, 8.14635],
  [3.380015762439546, 7.724547521102497],
  [3.401099121578296, 7.730144750127856],
]))

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like a good test for the corpus. I need to come back and debug that one.

Manifold cm = CondensedMatter(16);
CheckGL(cm);
#ifdef MANIFOLD_EXPORT
if (options.exportModels)
ExportMesh("condensedMatter16.glb", cm.GetMeshGL(), {});
#endif
PolygonParams().processOverlaps = old;
}

TEST(Samples, CondensedMatter64) {
Expand Down
Loading
0