I have a bellow list consisting of a points which are filtered based on bounding box. the issue is the points which are on the edge of bounding box corner is omitted from the list which resulting in arc not upto that point (see bellow image) i want to create a list in such a way that first point and last point in the list should be the same. Means the same point should be there as last point of first list and first point of next list.
Do they still need to be separate arcs? You could just flatten the list and create one continuous arc.
If you do need to keep them separate you’ll probably need to use LastItem and AddItemToEnd to move your points around. You’ll also likely need to do a little cleanup as you’re not looping the last arc back to the first.
Just an FYI, as it seems like you might be building a workflow that won’t resolve itself in the end, which could mean you’re going down the wrong path here…
Curves created with Arc.ByBestFitThoughPoints do not necessarily touch the points which generate them.
@Nick_Boyts thanks for the reply and suggestion, Yes the arc needs to be separate. I have taken part from suggestion and part improvised as bellow and it worked fine. Still i am not able to get the last arc any suggestion for that ?
I have devided the lines in to say 20 parts and each part is filtered with bounding box to collect the existing points inside the box. and tried to fit an arc for that portion through points.
Issue was that one point at the edge of bounding box was only considered once and thus resulting in gaps in the arc so need to add points again to the previous list just to get a continues arc.
This is what i was doing manually at the time of creating that alignment and trying to replicate the same in code now.
I know there are still hurdles in the approach but lets take one step at a time by dividing the problem. Once best fit arcs are done then the big issue will be the connection at end and tangency between the arcs, also what if points are more or less in straight line …hope to find a solution for that too.