Home > Community > Forums > PCB SKILL > Find the angle between two segments

## Email

Recipients email * (separate multiple addresses with commas)

Message *

 Send yourself a copy

## Subscribe

Intro copy of the newsletter section here, some intro copy of the newsletter. Instruction of how to subscribe to this newsletter.

First Name *

Last Name *

Email *

Company / Institution *

 Send Yourself A Copy

# Find the angle between two segments

Last post Mon, May 6 2013 7:33 PM by eDaNoy. 5 replies.
 Started by eDaNoy 06 May 2013 06:38 PM. Topic has 5 replies and 980 views
• #### Mon, May 6 2013 6:38 PM

• eDaNoy
• Joined on Fri, Sep 9 2011
• SBMA, Philippines
• Posts 41
• Points 940
Find the angle between two segments
 I would like to get the angle between two segments, this must be applied to any angled situation.I have already a function that gets the slope of two segments then the rest is a problem, i cant get the correct resultim using this formula.angle=(m2-m1)/[1+(m2*m1)]atan(angle)*180/math.pithe result must be the added angle of two segments. sample 1st segment = 90 degreesecond segment = 45 degree result = 135 degree
Filed under: ,
• Post Points: 20
• #### Mon, May 6 2013 6:56 PM

• eDave
• Joined on Sun, Jul 13 2008
• Christchurch, 00-NZ
• Posts 719
• Points 15,590
Re: Find the angle between two segments
 There are some complex ways to do this but there is an undocumented command that you might be able to use:_axlAngleBetweenLines(list(pt1, pt2), list(pt3, pt4))  Dave Elder, Tait Communications
• Post Points: 35
• #### Mon, May 6 2013 7:18 PM

• eDaNoy
• Joined on Fri, Sep 9 2011
• SBMA, Philippines
• Posts 41
• Points 940
Re: Find the angle between two segments
 thanks Dave, i added some method to get the value that i want. _axlAngleBetweenLines result was in radian 180-_axlAngleBetweenLines()*180/math.pi gives me accumulated angles thank you so much. one more thing where could i find undocumented axl? maybe or somehow Im already in this kind of situation trying to figure out something which is already done.
• Post Points: 20
• #### Mon, May 6 2013 7:25 PM

• eDaNoy
• Joined on Fri, Sep 9 2011
• SBMA, Philippines
• Posts 41
• Points 940
Re: Find the angle between two segments
 Dave, Is it safe to use undocumented axl?
• Post Points: 5
• #### Mon, May 6 2013 7:26 PM

• eDave
• Joined on Sun, Jul 13 2008
• Christchurch, 00-NZ
• Posts 719
• Points 15,590
Re: Find the angle between two segments
 There's no easy way of finding undocumented commands and there is no guarantee that they will always exist. USE WITH CARE.However, when you do find one that is useful, put in an enhancement request to Cadence to get it made public.  Dave Elder, Tait Communications
• Post Points: 20
• #### Mon, May 6 2013 7:33 PM

• eDaNoy
• Joined on Fri, Sep 9 2011
• SBMA, Philippines
• Posts 41
• Points 940
Re: Find the angle between two segments
 thanks dave
• Post Points: 5