Points in order along Curve

So I have a list of curves and a list of elements with a center point that are on the curves.

The elements are grouped so they are separated by which curve they are on.

Now that I have that I am needing to determine the order of the elements on the.

My idea was to use ‘Curve.SegmentLengthBetweenParameters’ to get the length of the curves and compare all the values to determine the shortest to longest.

The reason I am doing this is I have conduit runs and have place pull boxes on the run. They are not connect they are just intersecting with the run. I want to be able to take the length from end of the run to the first box, the first box to the second box, etc. So I can then see if I have any sections of a run that are over on the allowed length or degree of bends.

Any help is appreciated.

Curve.ParameterAtPoint, then List.SortByKey.

Lacing and list levels will matter for both.

3 Likes

Thank you for your response. It definitely helped me get it figured out.

I wasn’t able to get ‘List.SortByKey’ to work how I wanted, but used ‘List.SortIndexByValue’ and List.GetItemAtIndex’ to get the result that I wanted.

So now the boxes are ordered correctly along the curve and I can find the distance between them on each run.

1 Like

I did something similar with getting the total run length of a conduit run and setting the total run length to a “Run Length” parameter for each conduit and fitting element in the conduit run. I used “Elements in connected network” node from the MEPover package. I think it cut down on the graph size using that node.
Nice idea about getting total number of bends for the run too…because I usually go over 360 lol

image

I’m doing pretty much the same thing. Then I set up filters in my views to color code the conduit based on the run length and total bends if they were over 200’ and 360 degrees.

But with this I’m trying to place my pull boxes in the run and calculate the length and bends of conduit in each section of the run to determine if I need to place more boxes.