PDA

View Full Version : Detect star polygon...


Dryden
01-22-2008, 02:28 PM
Hi,

I'm here (an other time, yeah I know :s) but I try to make a lil script to speed up my cleaning time. So everything work's fine, but i'm still looking for a proc who drive me mad.

I try to check the entire mesh to detect star polygon (translation of a french word). I mean, u know, when a vertex is connected to 6-7-... edges. I know how to store, display, but no clue about how detect those.

So if anyone have idea...

Gravedigger
01-22-2008, 03:15 PM
sorry i don't have much time at the moment. i can't look it up in the documentation. but i think this could be done by iterating through all faces and check the vertices. if there are 5-6 vertices you have your star polygons

Dryden
01-22-2008, 04:00 PM
thank's. With more research I just find out an way to do that. Just have to select vertex by vertex and use the 'ConvertSelectionToEdges' command.

ConvertSelectionToEdges;
string $numEdge[] = `ls -sl -fl`;
if (size($numEdge) > 5){
print "here we go ^^";
}


Close to what u explain, but I'm looking for star vertex, not poly's ;)

Thank's anyway.

goleafsgo
01-22-2008, 05:32 PM
Here's mine. Select all of the verts you want to run through first...


global proc filterVertsWithValence(int $lowerValence, int $higherValence)
{
polySelectConstraint -m 2 -or true -orb $lowerValence $higherValence;
resetPolySelectConstraint;
}

{
filterVertsWithValence(5, 5);

string $sel[] = `ls -sl`;
print ("Results are:\n");
print $sel;
print "\n";
}

tbaypaul
01-27-2008, 03:37 AM
I got errors and had to add the type for vertex to get it to work.....

polySelectConstraint -t 0x0001 -m 2 -or true -orb $lowerValence $higherValence;

CGTalk Moderation
01-27-2008, 03:37 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.