Background : I am offsetting just few sides of a polygon. To join them again, I am intersecting adjacent sides, and creating a new polygon. However the points does not have same order to after intersection.
My solution: In grasshopper, I would have easily projected the correct indices onto the new intersectedPoints list ( as long as the number of items are same ). Here, the curve EndPoint list has the desired Indices, and Curve.IntersectAll has the wrong indices.
I tried almost all avaialbe nodes that has word ‘index’ in them. Wondering if there is another way in dynamo to remap indices.
Okay, i found this node called Geometry.IndexByDistance. It is doing the job so far.
I still want to know if its possible to remap a list indicies just my writing a list , e.g; [ 0,4,5,2,3,1 ]. This is working due to proximity. I am asking because proximity method would fail if there are sharp angles and the closest point would not lie in the same line.
You can absolutely remap the indices. However it’s usually a little more involved with geometry. Try some of the suggestions in the above post and see if anything works for you.