ErikJohEve
10-04-2010, 01:15 PM
Hi
I wonder how to define a hole in a polygon when creating a mesh with
MFnMesh::create()
If creating a face with MEL (polyCreateFacet or polyAppend) you can use the -hl option to specify which points that makes up the hole but i can not find any way to do this with the C++ API.
//Regards
Erik
From the help file there is:
"The faces of a polygonal mesh are stored in an integer array. Each face is described by a number of sequences of integers—each integer representing an edge id. The first sequence of edges represents the boundary of the face. Any subsequent sequences represent holes in the face. Internal flags mark the start and end of each sequence as well as the end of the face description are marked by internal flags. "
But no info on how to specify those flags.
If using python together with polyCreateFacet the flag is specified as an empty point():
cmds.polyCreateFacet( p=[(0, 0, 0), (10, 0, 0), (10, 10, 0), (0, 10, 0), (), (4, 2, 0), (5, 4, 0), (6, 2, 0), (), (5, 6, 0), (4, 8, 0), (6, 8, 0)] )
but i have no idea how to setup the vertexarray, polycount and polyconnect arrays for the MFnMesh in a similiar fashion. If it even works....'
I tried
polygonCounts.append(4);
polygonCounts.append(0);
polygonCounts.append(3);
which would make kinda sense but it only created two seperate polygons.
I wonder how to define a hole in a polygon when creating a mesh with
MFnMesh::create()
If creating a face with MEL (polyCreateFacet or polyAppend) you can use the -hl option to specify which points that makes up the hole but i can not find any way to do this with the C++ API.
//Regards
Erik
From the help file there is:
"The faces of a polygonal mesh are stored in an integer array. Each face is described by a number of sequences of integers—each integer representing an edge id. The first sequence of edges represents the boundary of the face. Any subsequent sequences represent holes in the face. Internal flags mark the start and end of each sequence as well as the end of the face description are marked by internal flags. "
But no info on how to specify those flags.
If using python together with polyCreateFacet the flag is specified as an empty point():
cmds.polyCreateFacet( p=[(0, 0, 0), (10, 0, 0), (10, 10, 0), (0, 10, 0), (), (4, 2, 0), (5, 4, 0), (6, 2, 0), (), (5, 6, 0), (4, 8, 0), (6, 8, 0)] )
but i have no idea how to setup the vertexarray, polycount and polyconnect arrays for the MFnMesh in a similiar fashion. If it even works....'
I tried
polygonCounts.append(4);
polygonCounts.append(0);
polygonCounts.append(3);
which would make kinda sense but it only created two seperate polygons.
