Skip to content
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

Double precision #895

Merged
merged 32 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8a7ca7f
added configuration summary
pca006132 Jul 30, 2024
a5de6a5
use custom math type
pca006132 Jul 30, 2024
bee9570
use std function if possible
pca006132 Jul 30, 2024
38077f0
build success
pca006132 Aug 11, 2024
1511564
fix js binding
pca006132 Aug 11, 2024
39bcd2a
Merge remote-tracking branch 'upstream/master' into double-precision
pca006132 Aug 11, 2024
4014641
format
pca006132 Aug 11, 2024
6083019
use better primitives
pca006132 Aug 11, 2024
4d48102
use old precision for polygon tests
pca006132 Aug 12, 2024
36f9ef9
merging master
elalish Aug 13, 2024
35967ea
merging master, cleanup hull
elalish Aug 20, 2024
85c1bf7
fix polygon CCW check
elalish Aug 21, 2024
aab9606
temp-fix tests
elalish Aug 22, 2024
0939e30
add simpler failing test case
elalish Aug 22, 2024
f014e1d
refactored CutKeyhole
elalish Aug 23, 2024
900bd85
fixed tests
elalish Aug 23, 2024
fb4a81f
more keyholing fixes
elalish Aug 24, 2024
25aabc3
truncate long debug output
elalish Aug 24, 2024
fbec45c
shrink SDF blobs test
elalish Aug 24, 2024
2bf9405
fixed WASM and disabled zebra
elalish Aug 24, 2024
cf26a37
merging master
elalish Aug 27, 2024
dc6de0f
fix hull
elalish Aug 29, 2024
e0c8048
cleanup a bit
pca006132 Sep 1, 2024
9301363
merging master
elalish Sep 1, 2024
db46659
Merge branch 'double-precision' of github.com:pca006132/manifold into…
elalish Sep 1, 2024
460a267
fix wasm
elalish Sep 1, 2024
d18d71d
CI cleanuo
elalish Sep 1, 2024
536cfea
reenable zebra
elalish Sep 2, 2024
9dcf037
upped precision and fixed tests
elalish Sep 2, 2024
3ffc865
fix format
elalish Sep 2, 2024
d2b55ba
merging master
elalish Sep 3, 2024
6fbd851
disable zebra test on windows
elalish Sep 3, 2024
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
2 changes: 1 addition & 1 deletion test/hull_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool isMeshConvex(manifold::Manifold hullManifold, double epsilon = 0.0000001) {
TEST(Hull, Tictac) {
const double tictacRad = 100;
const double tictacHeight = 500;
const int tictacSeg = 1000;
const int tictacSeg = 500;
Copy link
Owner

Choose a reason for hiding this comment

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

This didn't help the flaky missing one vertex issue - very weird.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I expected that this would work. I'll try to see if I can recreate it and find out why (also I do remember experimenting with this earlier as well at the start of the GSoC project, when I pointed out that the values were off by 1 or 2, we had discussed that it could be caused due to the precision errors, and it's possible that the algorithm itself isn't leading to the failure. Even then I was able to cause a missing vertex or two in both cases increasing and reducing the tictacSegs) opencax/GSoC#89 (comment)

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks - it'd be interesting first just to know which vertex is missing - I wonder if it's lined up with an axis or something? Once you know it's index, hopefully it won't be too hard to see where the algorithm is losing it.

const double tictacMid = tictacHeight - 2 * tictacRad;
const auto sphere = Manifold::Sphere(tictacRad, tictacSeg);
const std::vector<Manifold> spheres{sphere,
Expand Down
8 changes: 0 additions & 8 deletions test/polygon_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ Polygons Duplicate(Polygons polys) {
void TestPoly(const Polygons &polys, int expectedNumTri,
double precision = -1.0) {
PolygonParams().verbose = options.params.verbose;
if (precision < 0.0) {
// FIXME: we override the precision to match the old precision value
Rect r;
for (const auto &poly : polys)
for (const auto &pt : poly)
r.Union(pt);
precision = r.Scale() * 1e-5;
}

std::vector<ivec3> triangles;
EXPECT_NO_THROW(triangles = Triangulate(polys, precision));
Expand Down
2 changes: 1 addition & 1 deletion test/polygons/sponge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ TEST(Polygon, Sponge3a) {
TestPoly(polys, 454);
}

TEST(Polygon, BigSponge) {
TEST(Polygon, DISABLED_BigSponge) {
Copy link
Owner

Choose a reason for hiding this comment

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

I just disabled this for now since it's an existing triangulator issue - I also added a more compact repro of it in Polygon.SquareHoles2.

Polygons polys;
polys.push_back({
{0.5, 0.5}, //
Expand Down