Maya API MFnMesh create - have some troubles with the generated mesh

Maya API MFnMesh create - have some troubles with the generated mesh

Anonymous
Not applicable
541 Views
1 Reply
Message 1 of 2

Maya API MFnMesh create - have some troubles with the generated mesh

Anonymous
Not applicable

What i've got: 

I got a simple mesh in the scene, let's say a cube. Then I'm trying to recreate this mesh using MFnMesh::create method with all arguments that I got from the original mesh. 

 

results:

I've got a new genereated mesh based on the original one. It has the same vertices and faces indices BUT the edges' indices are wrong. And that's a big problem as I'm trying to assign hardNormal and softNormal nodes to the edges to get the same edge smoothness as on the original mesh. And it's totally wrong because of the wrong edge indices.

 

Does anyone know what can be the reason? - probably the polygonConncetion argument, probably not... have no idea.

 

Here is an example - the left one is the original mesh and the blue edges are hard edges 

Example

0 Likes
542 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Just found the solution - there is no point to try to restore a mesh with the same edge indices. I needed these indices just for restore Hard/Soft Edges - so I just created extra arrays for vertex pairs that share a hard adge and then I applied hardness to those pairs on the new mesh.

 

0 Likes