I need the perpendicular distance between 2 polylines. If I was doing this manually, I would draw a line perp from 1 side and extend it to the other side, check it's length, and delete it. These are pipeline r/w's that quite often have variable width, and are not always parallel.
I am asking the user to select the pline 1st (GetEntity) to get some object data. Then I prompt for a point on the pline where a block will be placed. The block contains an attribute definition for the width. I check to make sure the point is on the pline. I was hoping I could get the user to select a point on the opposite side and force that to be perp. That would give me the width but it doesn't work. I have looked at GetFirstDerivative and rotate that 90 but the examples I found use a certain length. The perp length is what I need to determine. I need some hints please!
The distance between P(x1, y1, z1) and P2(x2, y2, z2) is equal to the square root of [(x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)]
Hi,
Look at the Curve.GetClosestPointTo() method.
Select a polyline (pl1) and a point on the other one (pt on pl2), then:
pt.DistanceTo(pl1.GetclosestPointTo (pt, false));
The distance is measured perpendicular to pl2 (and pl1 if they're parralel).