Get XY coordinates of PLINE with arcs etc...

Get XY coordinates of PLINE with arcs etc...

jholdawayUKBGN
Contributor Contributor
744 Views
3 Replies
Message 1 of 4

Get XY coordinates of PLINE with arcs etc...

jholdawayUKBGN
Contributor
Contributor

How can I calculate the xy coordinates along a PLINE that has lines, arcs, etc...

In the attached screenshot, I would like to get an array of x,y coordinates along this PLINE that can contain any sort of line like arcs.

 

pline.jpg

Any advice?

 

0 Likes
745 Views
3 Replies
Replies (3)
Message 2 of 4

Jeff_M
Consultant
Consultant

That is what the GetPointAtParameter() method does. Each vertex is typically a whole number parameterso to get the point at the middle of the first arc (assuming the pline was created left to right):

 

var pt = oPline.GetPointAtParameter(3.5);

 

This returns a Point3d. Convert it to a Point2d if really needed.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 3 of 4

jholdawayUKBGN
Contributor
Contributor

What is 3.5?

 

So if I wanted points along that arc how do I get that?

0 Likes
Message 4 of 4

Jeff_M
Consultant
Consultant

The 3.5 is the midpoint between Parameter 3 and Parameter 4. The first vertex is Parameter 0. For any point along the first arc it will be 3.xxx where xxx is the percent along the arc to get the point.

Jeff_M, also a frequent Swamper
EESignature
0 Likes