Angles of line PIs

263
2
10-12-2012 06:32 AM
New Contributor III
Hi, If i have a polyline with 5 PIs (bends) ex: 2 45deg bends 2 90deg bends and a 5deg bend, what can I do to automatically calculate the degree of the bends in my polyline? Thanks so much.
Tags (2)
Reply
0 Kudos
2 Replies
Regular Contributor II
Your description appears to be a bit loose. Do you mean you want to calculate the bearing of the segments between bends, or the final heading of the end of the pipeline, or the included angle? Maybe you want to add a bend in the line given the offset implied by the joint name?

The math module has a function atan2() that returns a 360 degree bearing given the delta_x and delta_y.
There are also functions to convert radians to degrees and all the trig functions.
Reply
0 Kudos
New Contributor III
thanks kimo, Yes I am looking to determine the angle of the bends in a pipeline to determine the bending method. induction vs cold(rope).  Thank you for your input. I believe the arctan2 function will work. I will let you know what i find out.
Reply
0 Kudos