Closed sabotage3d closed 9 years ago
Hi Alex,
With the mesh cutting, normally the first suspect is the tolerance values used to merge vertices/find whether they're colinear etc. These values are declared at the very top of the Meshcut.cpp file, so you could try tweak them to see if you get a different result. That being said, your test scene is as sane as it gets, so it might not be that (maybe the merge epsilon is a bit too high in hindsight).
On the same file, there's also a debug toggle (set #define DEBUG 1) which will dump intermediate steps as curves in Maya and will give you a better idea of what's going on in your scene.
Hope this helps, Jose
Hi Jose, Thank you very much for your reply. If I output the curves with the debug mode. I am getting good looking curves around the edge although I am not sure why they are so many. I also enabled the debug mode in FillHoles the produced mesh is invisible in maya. This is the output from FillHoles debug:
Vertices:
[0: [-147.499, 11.0743, 0, 1],
1: [-55.4505, 11.0743, 0, 1],
2: [221.359, 11.0522, 0, 1],
3: [147.647, -11.0616, 0, 1],
4: [-221.286, -11.0616, 0, 1],
5: [-177.043, 2.21106, 0, 1]]
Triangles:
[5, 1, 0]
I played with all the constants but it is still failing with holes . If I play with divisions of the cube it changes the result sometimes without holes . Even with more divisions changing the plane to random angles produces holes. In some cases there are multiple triangles on top of each other n the internal faces. I wonder if there are some better constants for simple convex meshes ?
I made some tests with multiple planes.
This is with all the default settings in the plugin
I am calling it with
Shatter(2); setAttr ($shatterNode + ".shrinking") 0.01;
The first one is unit cube 1 division in each axis. The second one is unit cube with 3 divisions in each axis.
After doing a conversion from plane matrices with angles to normals and offset the holes disappeared it just looks like a bad case scenario.
Hello ,
I am having some holes in the resulting mesh. I started debugging but I cannot solve it myself. If we do just mesh cutting specific plane it can give holes. In my test I am making a single cut by one plane as a test. This is my testing code: http://codepad.org/vkuFLQCO The code is just a default cube in Maya. With single cut by the planes below. In Maya the shrinking is set to 0.01;
If I do
or
This is the resulting mesh:
Thanks in advance,
Alex