There is something strange with SplitAlongPlane. It crash randomly or it break the mesh.
Behavior is different between several wz4 executions (memory space allocating). Sometime it works fine, sometimes it crash or sometime it break the mesh. In addition it seems to be different depending on the machine where it was compiled...
For example :
- with the original wz4 exe (fr_public\altona_wz4\wz4\bin) - The mesh is always correct but sometimes wz crash (splitalongplane don't deform the mesh)
- with my compiled version - Mesh is always broken and sometimes it crash. (I used the original lastest gihub version)
- with the erbsen compiled version (on this forum) - Mesh is correct but it crash sometimes. (same code source version of mine)
For example, I 've made a simple example with only a cube and splitalongplane, here the screenshot of the result with my compiled version : (we can see an incorrect vertex position which deform the cube).
there seems to be a problem with SplitEdgeAlongPlane function at line 6427.
I would like to have the result of your debug test and your config, to help me please.
- Code: Select all
6427 Wz4MeshVertex *v = Vertices.AddMany(1); <= set a breakpoint on this line
6428 v->Pos.Fade(t,a.Pos,b.Pos);
at breakpoint if you examine a.Pos and b.Pos values you will see correct data like (0.5, 0.5, 0.5), press F10 to run the line and examine again a and b. (normally values should not change)
For me values become incorrect => a.Pos {x=-1.5883997e+038 y=-1.5883997e+038 z=-1.5883997e+038 }
My config is :
- windows xp sp3
- visual studio 2010
Thanks.