Angles of line PIs

474
2
10-12-2012 06:32 AM
jamesborris
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)
0 Kudos
2 Replies
KimOllivier
Occasional Contributor III
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.
0 Kudos
jamesborris
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.
0 Kudos