Path of Travel certain extent

Hello. I want my path of travel to be max 35 m. I am creating this Path of Travel approximately in revit. With Dynamo I want to lengthen the last line if it is short. If it is long I want to shorten it. I need your help on how to do this.

I tried something. First I created the geometry of this path. I determined the end point to complete the last line 35 m. I entered the starting point. And I created a new path with the PathOfTravel.ByFloorPlanPoints. But it is never exactly 35 m. There are very small differences like 35.099 oder 34.099.

Thank you in advance

Can you show us what you have? You’re probably pretty close.

You should be able to just calculate the current curve length, find the difference from 35m, and then add or subtract that difference to an extended curve.

Unfortunately those images are illegible. Make sure you’re zoomed in enough so that we can read node titles and always have your node preview bubbles pinned so we can see the actual data you’re working with. Also include any warnings you’re getting.


Thank yout @Nick_Boyts

Is the 5th index curve the last curve? You’re using two different start points here.


If you add up all of the curve lengths does it equal the total curve length from the parameter? There may be a difference in how Revit calculates the travel distance from the actual curve lengths.

could the problem be that the path I just created passes through other points? Because I only enter the start and end points, I wonder if this is why I can’t get the full 35 m path.

It’s possible. Again, we can’t really see what’s going on unless you pin the node preview bubbles. I assumed you were taking the last leg of a multi-leg path and trimming/extending only that leg. That would make sense and should work if the total length is calculated from the individual leg lengths. But it may not be.

Sharing the graph is great in some cases, but usually not necessary. It also means that anyone helping you has to download a file, run it, and make a bunch of assumptions on whether they’re providing the same inputs as you, have the same package versions, and are even getting the same results - and that’s assuming you’re running the graph on the same file. There are typically too many assumptions there to make it worth while unless it can be proven that the graph is functioning properly.

If you’re going to be posting a request, it’s necessary to provide all the necessary info for someone to help you.

Yes, I understand this… You’re right. I can’t solve the problem, but I thank you @Nick_Boyts .

If you share your image with the node previews we’ll have more context to give you a better suggestion.
image

Here’s an example that forces the PathOfTravel to 100’.

1 Like

Thank @Nick_Boyts . Your example works very well. I noticed my graph that if I give the first and last point and create a new path, Revit connects this path by passing through different points. For this reason, I can never bring it to exactly one dimension.

That suggests you’re skipping segments. Can you show a screenshot of your scenario using my graph (or your implementation of it)?

Oh now I see that you’re creating a brand new calculated path rather than drawing your own. You’re just providing a new start and end point that’s calculating the best new path. That means that Revit may not follow the exact same path to just end short of the original location. The new end point may allow the pathing algorithm to cut an extra corner and end up with a different length.

Instead, you want to modify the existing path using one of the WayPoint nodes.