Author Topic: Angle @ Location  (Read 1757 times)

0 Members and 1 Guest are viewing this topic.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Angle @ Location
« on: July 22, 2018, 12:15:14 AM »
is there something that will return the angle of a line at a point location?  I thought about drawing a line from the point to, say 0.0001 distance from it and getting the angle of that line, but if there was change at all (as minute as possible as it is) in the bearing of the line it would be wrong.
« Last Edit: July 22, 2018, 12:21:57 AM by quaziconscience »

Atook

  • Swamp Rat
  • Posts: 1027
  • AKA Tim
Re: Angle @ Location
« Reply #1 on: July 23, 2018, 01:53:01 AM »
A line should have the same angle no matter where the point falls on it?

For polylines, I use the .GetFirstDerivative(point) property.

Lately I cast it to a Curve, and take the derivative of that.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Angle @ Location
« Reply #2 on: July 26, 2018, 01:34:46 AM »
Thanks atook! that's what I was looking for. Appreciate the help.