Hi,
I am finding circle passing from two given points with given radius. Next I don’t want full circle so I am using GetLineOnLine to get circular line between two points. Result I got is attached in image.
I want output like below image.
I think GetLineOnLine function searching in forward direction.
Is there any way to find difference of two shapes? It will be easy way to get what I want . Please suggest way to achieve this.
Thanks,
Goral
GetLineOnLine Function
Hi Goral,
That’s because the start point(end point) in inside the gap of your first shape.
Each line have a start point and end point, when you call GetLineOnALine, no matter how you set the startPoint and endPoint parameters, the result should be the same.
Because it’s a line, but not a circle.
For a workaround, when you get the line from a circle, you can try to write a function, loop all vertexes and build the arc you want.
As below is how I get the line from circle:
EllipseShape ellipse = new EllipseShape(new Feature(0, 0), 20);
RingShape ring = ellipse.GetConvexHull();
ring.Vertices.RemoveAt(ring.Vertices.Count - 1);
LineShape line = new LineShape(ring.Vertices);
Regards,
Don