JohnP10
09-10-2010, 10:22 PM
Below is a bit of code I'm working on. The isBorderEdge procedure I found somewhere here (I believe it was Nathans)
string $edge[] = `ls -sl`;
global string $gIsBorderEdge = 0;
proc int isBorderEdge(string $edge)
{
int $n = size(ls("-fl",(polyListComponentConversion("-fe","-tf", $edge))));
return (!($n-1));
} //returns a 0 for non border edges, 1 for borders.
$count=0;
for ($i=0;$i<size($edge);$i++)
{
isBorderEdge($edge[$i]); //call isBorgerEdge procedure for current selection
$count = ( $count + isBorderEdge($edge[$i]) ); //tells how many border edges counted in total
}
print $count;
Problem I'm having is that when selecting edges on opposite sides of a deleted face, they are not being recognized as border edges. Any way around this?
Thanks
string $edge[] = `ls -sl`;
global string $gIsBorderEdge = 0;
proc int isBorderEdge(string $edge)
{
int $n = size(ls("-fl",(polyListComponentConversion("-fe","-tf", $edge))));
return (!($n-1));
} //returns a 0 for non border edges, 1 for borders.
$count=0;
for ($i=0;$i<size($edge);$i++)
{
isBorderEdge($edge[$i]); //call isBorgerEdge procedure for current selection
$count = ( $count + isBorderEdge($edge[$i]) ); //tells how many border edges counted in total
}
print $count;
Problem I'm having is that when selecting edges on opposite sides of a deleted face, they are not being recognized as border edges. Any way around this?
Thanks
