-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add a manifold test case for custom "revolve". #1093
base: master
Are you sure you want to change the base?
Conversation
This might be as expected since it's not a crash and may or may not be manifold (probably non-manifold). |
c423dd2
to
4aa91fd
Compare
@pca006132 is it expected that about half our CI jobs (the ones with green checkmarks) just build but don't actually run any tests? |
@fire - so it's working except that we're getting 16 triangles instead of your expected 48. Can you show the difference in renders so we can get an idea of what's wrong with the shape? |
Do you know if I can export GLTF2 from here? I can't preview the mesh in Godot Engine because the condition is that the manifold is manifold. We could do empty mesh for (merge and intersection) and identity for subtraction. |
Yeah, you can add this in like a bunch of our other tests have:
|
Then just run |
Hmmm, weird. Will check. |
Here's the complex glb. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1093 +/- ##
==========================================
+ Coverage 91.87% 91.90% +0.03%
==========================================
Files 30 30
Lines 5883 5883
==========================================
+ Hits 5405 5407 +2
+ Misses 478 476 -2 ☔ View full report in Codecov by Sentry. |
@fire I don't see a failure - can you highlight the difference? Also, your test passes, so.... And don't get me started on USDZ! Here you can drag and drop GLBs into my web viewer here: https://modelviewer.dev/editor/ |
With this change, I cannot export. % ./test/./manifold_test --gtest_filter=Manifold.MeshWithCustomProps -e
Note: Google Test filter = Manifold.MeshWithCustomProps
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Manifold
[ RUN ] Manifold.MeshWithCustomProps
manifold_test(58041,0x202c23840) malloc: Incorrect checksum for freed object 0x1537044b8: probably modified after being freed.
Corrupt value: 0x1000101000100
manifold_test(58041,0x202c23840) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort ./test/./manifold_test --gtest_filter=Manifold.MeshWithCustomProps -e |
Um, I disagree? Your test is checking manifoldness and it passes. I trust my manifold checker better than anyone else's, but I especially don't trust file importers and exporters. Particularly since every mesh you've shown me doesn't even have shared verts, I have the feeling manifoldness is getting lost somewhere in Godot. |
Remember - you cannot have a manifold without shared verts. |
Wonder if we can do an export-import round-trip in this case. If not, maybe the exporter is to blame here? |
To export, you'd also need to compile Manifold with |
The CSGPolygon3D is relatively untested with Also, these are failure cases, so I am a bit frustrated, but the MeshGL dumping tool has been a great way to communicate the failures and gives me hope. This test should pass. |
0568fc8
to
128a747
Compare
I did some sleuthing, I tried printing after the mesh.Merge() operation and it gives this test result. |
! If you force add a MeshExport64 it fails even with Merge(); |
ef37f7b
to
8060e57
Compare
|
Try a larger tolerance value, this is probably because the tolerance value becomes too small when using MeshGL64. |
Thanks for the hint, I expect the test to pass. |
Btw, do note that if you need the merge operation to make the custom revolve operation produce a manifold mesh, it probably means you may want to modify the revolve operation to make sure it always outputs a manifold mesh. There is no guarantee that the merge operation can work in general. |
I did a test manifold's CSG revolve: godotengine/godot#99977, but I wanted to try using the existing godot engine CSG code first. |
@elalish Should I close this pull request? Any revisions I can make? |
Add test.