CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 10-08-2012, 03:16 AM   #1
Kok Gin Yih
Cheras, Malaysia
Join Date: Nov 2009
Posts: 77
Getting an Edge angle?

Is there any simple way to do this in mel?
Old 10-08-2012, 11:43 AM   #2
HighEnd3D deserter
NaughtyNathan's Avatar
Naughty Nathan
Technical Artist
Sony SCEE Liverpool
Manchester, United Kingdom
Join Date: May 2008
Posts: 2,608
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-08-2012 at 11:46 AM.
Old 10-08-2012, 12:57 PM   #3
Kok Gin Yih
Cheras, Malaysia
Join Date: Nov 2009
Posts: 77
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;
Old 10-08-2012, 12:57 PM   #4
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

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

All times are GMT. The time now is 12:29 AM.

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