# Edge to Edge Angle Determination

**URL:** https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688
**Category:** Maya
**Tags:** mel
**Created:** [November 29, 2001, 4:45pm UTC](https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688 "2001-11-29T16:45:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nightshadevfx](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@nightshadevfx](https://forum.highend3d.com/u/nightshadevfx)
#### Post date: [November 29, 2001, 4:45pm UTC](https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688/1 "2001-11-29T16:45:58Z")

</div>

Hey,  
 Well i want to makea script that will go through the select polygon object and soften all the edge normals except for border edges and edges whos neighbors angle is over a 60 degree angle.

Now i know i need to go through every edge and checkfor this. But im not sure how in mel i would determine that angle or if its a border edge. I do know C++ very well so i know how to code just not sure on maya's syntax or currently available functions for what im doing. Thanks.

---

<div class="post-metadata">

### Author: ![nightshadevfx](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@nightshadevfx](https://forum.highend3d.com/u/nightshadevfx)
#### Post date: [November 29, 2001, 5:52pm UTC](https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688/2 "2001-11-29T17:52:28Z")

</div>

So far what ive come up with is,

Select all edges and store them in an array,  
cycle through selecting the edges that get returned by a function function that determines weather the angle between them is within the range using the angle command and use rad\_to\_deg().

Then apply the soften edge stuff.

That soun about right?

How would i select all edges on the select object.

Also how wouldi determine if an edge is a border edge

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [November 30, 2001, 11:20am UTC](https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688/3 "2001-11-30T11:20:37Z")

</div>

Doesnt maya have this function allready? Why not look how itdoes the trick and then adapt it to your specific needs.

I do thiskind of tuff all the time, and youll be suprised to see how much of the functionality is just a few codes of mel.

---

<div class="post-metadata">

### Author: ![nightshadevfx](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@nightshadevfx](https://forum.highend3d.com/u/nightshadevfx)
#### Post date: [November 30, 2001, 5:40pm UTC](https://forum.highend3d.com/t/edge-to-edge-angle-determination/6688/4 "2001-11-30T17:40:13Z")

</div>

polySelectConstraint

Im thinking with the right settings this function might do what im asking? Anyone agree?
