Hi,
When I new ConvexHull object, the exceptoion 'Point set is degenerate; convex hulls must have volume.' will throw.I don't know why?
Thank you!
Code: ConvexHull hull = new ConvexHull(verticesList, 1);
The Exception:Point set is degenerate
Re: The Exception:Point set is degenerate
That exception is thrown when the provided point set has no volume. For example, it may be a bunch of overlapping points in one spot, or perhaps a triangle. The convex hull algorithm cannot operate on such 'degenerate' point sets.
-
- Posts: 17
- Joined: Wed Nov 06, 2013 2:56 pm
Re: The Exception:Point set is degenerate
Which is the correct way to create a plain surface without volume, made out of vertices and triangleindices?
Re: The Exception:Point set is degenerate
If it's not supposed to be mobile, StaticMesh. If it is, MobileMesh.
-
- Posts: 17
- Joined: Wed Nov 06, 2013 2:56 pm
Re: The Exception:Point set is degenerate
But the MobileMesh also throws the Exception "Point set is degenerate; convex hulls must have volume." if it has no volume. Maibe I'm doing something wrong.
Re: The Exception:Point set is degenerate
Is that in the latest version? If so, could you show the setup that reproduces the issue?
You should get an error if a volumeless MobileMesh is constructed as Solid, but I wouldn't expect that particular exception. I also found and fixed a couple of bugs in the MobileMeshShape initialization for Solid mode a few minutes ago, but it seems to be unrelated.
You should get an error if a volumeless MobileMesh is constructed as Solid, but I wouldn't expect that particular exception. I also found and fixed a couple of bugs in the MobileMeshShape initialization for Solid mode a few minutes ago, but it seems to be unrelated.
-
- Posts: 17
- Joined: Wed Nov 06, 2013 2:56 pm
Re: The Exception:Point set is degenerate
I just downloaded the latest Version (commit e2ffc7834e35).
I still get the exception.
It's not that bad to me. It's more important to know, that MobileMesh is the way a volumeless freeform has to be created. It's also possible that I'm doing something wrong.
The callstack is:
new MobileMesh()
new MobileMeshShape()
UpdateSurfaceVertices()
ConvexHullHelper.GetConvexHull()
ComputeInitialTetrahedron() --> throws the exception
Many thanks Norno for your help!
I still get the exception.
It's not that bad to me. It's more important to know, that MobileMesh is the way a volumeless freeform has to be created. It's also possible that I'm doing something wrong.
The callstack is:
new MobileMesh()
new MobileMeshShape()
UpdateSurfaceVertices()
ConvexHullHelper.GetConvexHull()
ComputeInitialTetrahedron() --> throws the exception
Many thanks Norno for your help!
Re: The Exception:Point set is degenerate
I wasn't able to reproduce an uncaught exception. The particular exception implied by that stack trace should never propagate outside of the inertia tensor calculation- something weird is happening there.
However, I went ahead and made another change for the sake of cleanliness and performance which should stop it from happening anyway.
However, I went ahead and made another change for the sake of cleanliness and performance which should stop it from happening anyway.