Getting an Edge angle?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
Getting an Edge angle?

Is there any simple way to do this in mel?
 
  10 October 2012
an edge does not really have an "angle", so your question is slightly ambiguous. do you mean the angle between it's two faces? what if it is an open edge and has only one face?, or do you mean the angle between it and another edge? or from the world axis?

Whatever it is you want will undoubtably be gettable with MEL but you'll need to be a bit clearer about what you mean here so you can get a relevant answer.

Last edited by NaughtyNathan : 10 October 2012 at 11:46 AM.
 
  10 October 2012
Sorry Nathan for not being clearer. So here's the deal, I'd actually wanted to query an edge's smoothing angle (0 for hard, 180 for soft), then proceed with polySoftEdge (hard/soft) accordingly. Querying the "angle" flag from polySoftEdge don't seem like working.

But then, I'd got a working method from somewhere else, but is rather slow imo, the polySelectConstraint command requires selection.

ConvertSelectionToEdges;
string $selection[] = `ls -selection`;
string $softEdges[] = {};
string $hardEdges[] = {};

$x = 0;
$z = 0;

for ($each in $selection)
{
	select -replace $each;
	polySelectConstraint -mode 2 -type 0x8000 -smoothness 1;
	if ( size( `ls -selection` ) > 0 )
	{
	    $softEdges[$x] = $each;
	    $x += 1;
	}
	else
	{
	    $hardEdges[$z] = $each;
	    $z += 1;
	}
}

if ( size( $softEdges ) > 0 ) 
{
	select -replace $softEdges;
	polySoftEdge -angle 180;
}
if ( size( $hardEdges ) > 0 ) 
{
	select -replace $hardEdges;
	polySoftEdge -angle 0;
}

polySelectConstraint -disable;
select -replace $selection;
 
  10 October 2012
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:55 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.