-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Print better manifold errors and avoid crash on non manifold csg input. #99959
Conversation
3067fe0
to
f38e2b5
Compare
b8d042e
to
a6981d1
Compare
991f01b
to
23b2ac6
Compare
As I mentioned above, the corresponding setter and getter of |
23b2ac6
to
41f4cb7
Compare
Is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems about right to me.
Edit, nope. By bindings to the API I meant these
ClassDB::bind_method(D_METHOD("set_snap", "snap"), &CSGShape3D::set_snap);
ClassDB::bind_method(D_METHOD("get_snap"), &CSGShape3D::get_snap);
I tried this with the MRP i linked in the bug report and it didn't crash the editor (but it also showed an empty scene). Perhaps a message should be shown about the failures to the user because they could open some large map using CSGs here and there together with other stuff and wont notice the missing geometry. I also tested resizing a new
|
41f4cb7
to
5820860
Compare
Thank you - I can repro the crash with that |
{"faceID":[],"halfedgeTangent":[],"mergeFromVert":[],"mergeToVert":[],"numProp":7,"runIndex":[0,144],"runOriginalID":[9],"runTransform":[],"tolerance":0.0,"triVerts":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143],"vertProperties":[0.0,1.0,0.0,0.0,0.0,0.0,0.0,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.125,0.0,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.01399004459381,1.01145005226135,0.0,0.0,0.0,0.0,0.16666667163372,1.01399004459381,1.01145005226135,0.0,0.0,0.0,0.0,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,1.01399004459381,1.01145005226135,0.0,0.0,0.0,0.0,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.0,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.0,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.125,0.5,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.125,0.5,0.0,0.0,0.0,0.0,0.0,0.0,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.0,0.5,0.0,1.0,0.0,0.0,0.0,0.125,0.0,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.25,0.0,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.125,0.0,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.716999232769012,1.01145005226135,-0.71699923276901,0.0,0.0,0.125,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.25,0.5,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.25,0.5,0.0,0.0,0.0,0.0,0.0,0.125,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.125,0.5,0.0,1.0,0.0,0.0,0.0,0.25,0.0,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.375,0.0,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.25,0.0,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,0.0,1.01145005226135,-1.01398992538452,0.0,0.0,0.25,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.375,0.5,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.375,0.5,0.0,0.0,0.0,0.0,0.0,0.25,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.25,0.5,0.0,1.0,0.0,0.0,0.0,0.375,0.0,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.5,0.0,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.375,0.0,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,-0.71699917316437,1.01145005226135,-0.71699917316437,0.0,0.0,0.375,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.5,0.5,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.5,0.5,0.0,0.0,0.0,0.0,0.0,0.375,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.375,0.5,0.0,1.0,0.0,0.0,0.0,0.5,0.0,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.625,0.0,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.5,0.0,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,-1.01398992538452,1.01145005226135,0.0,0.0,0.0,0.5,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.625,0.5,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.625,0.5,0.0,0.0,0.0,0.0,0.0,0.5,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.5,0.5,0.0,1.0,0.0,0.0,0.0,0.625,0.0,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.75,0.0,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.625,0.0,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,-0.71699917316437,1.01145005226135,0.716999173164368,0.0,0.0,0.625,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.75,0.5,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.75,0.5,0.0,0.0,0.0,0.0,0.0,0.625,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.625,0.5,0.0,1.0,0.0,0.0,0.0,0.75,0.0,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.875,0.0,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.75,0.0,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.0,1.01145005226135,1.01398992538452,0.0,0.0,0.75,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.875,0.5,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.875,0.5,0.0,0.0,0.0,0.0,0.0,0.75,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.75,0.5,0.0,1.0,0.0,0.0,0.0,0.875,0.0,1.01398992538452,1.01145005226135,0.0,0.0,0.0,1.0,0.16666667163372,0.0,1.0,0.0,0.0,0.0,1.0,0.0,1.01398992538452,1.01145005226135,0.0,0.0,0.0,1.0,0.16666667163372,0.0,1.0,0.0,0.0,0.0,0.875,0.0,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.0,0.0,0.0,0.0,0.0,1.0,0.333333343267441,1.01398992538452,1.01145005226135,0.0,0.0,0.0,1.0,0.16666667163372,0.0,0.0,0.0,0.0,0.0,1.0,0.333333343267441,0.716999173164368,1.01145005226135,0.716999173164368,0.0,0.0,0.875,0.16666667163372,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.0,1.0,0.0,0.0,0.0,1.0,0.5,0.0,0.0,0.0,0.0,0.0,1.0,0.333333343267441,0.0,1.0,0.0,0.0,0.0,1.0,0.5,0.0,0.0,0.0,0.0,0.0,0.875,0.333333343267441,0.0,1.0,0.0,0.0,0.0,0.875,0.5]} Child CSGShape3D manifold creation from mesh failed at CSGPolygon3D: Not Manifold. It's OK if it's non-manifoldable, but here's the "revolve" case. |
355f333
to
76f4ac4
Compare
Couldn't we use the "warning" icon in the scene tree? That should stand out more. @KoBeWi Do you know how to do this? |
Okay, fixed. Now that you've got your |
76f4ac4
to
c7a1bd7
Compare
81b0961
to
12494c3
Compare
* Manifold does not have a snap property. * Tolerance means simplification amount. * CSG snap has been removed * Add better error messages. * Verbose print manifold meshgl64 properties as json. * Update manifold for error fixes
12494c3
to
6cf1d3c
Compare
Ready for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected. Code looks good to me.
An easy way to reproduce this error situation is to create a PlaneMesh, QuadMesh, RibbonTrailMesh or TextMesh with Depth set to 0.0
in a CSGMesh3D.
Is anyone interested in adding a "warning" icon in the scene tree? It would be a good feature enhancement after this pull request is merged. |
|
Thanks! |
Revert "Merge pull request godotengine#99959 from fire/vsk-csg-error-and-ctd" This reverts commit 4b91e98, reversing changes made to 7bff6c8. Revert "Add csg boolean operators using elalish/manifold." This reverts commit fda444b. Add manifold. Restore.
Revert "Merge pull request godotengine#99959 from fire/vsk-csg-error-and-ctd" This reverts commit 4b91e98, reversing changes made to 7bff6c8. Revert "Add csg boolean operators using elalish/manifold." This reverts commit fda444b. Add manifold. Restore.
Attempt to avoid crashing on #99888.
Needs also #99951 (has been integrated)It does not resolve CSG (mesh boolean) spinning a non-manifold polygon, causing invalid input to
elvish/manifold.
, it only turns an editor crash into an error.Outdated photo