Readjusting an already split up pipe

Hello everybody,

I have put together a script from various resources on this forum. Basically it splits selected pipes up by a certain distance and creates many different smaller pipes while deleting the original pipe. And it works perfectly! (Thanks to the many people who have done this previously)

My question is this… If the user decided to split the pipe up at 3m intervals for example, and 2 days later realized that they were supposed to be 4m intervals… Obviously its too late to just go back and rerun the script.
Is there a way to select those already split up pipes and resize them according to a new value? What would be the best way to go about this?
What I have tried is feeding the pipe selection into a location node and trying to extend the curve length, but I cannot seem to figure out how to do that. Also, I would have to again delete the pipes that are there and regenerate them at longer or shorter lengths.
The main problem I am having is that the original 1 length of pipe has obviously been deleted right at the start, so I have no pipe to feed off of for splitting. Would it be best to delete all these pipes and find a way to rebuild them, or use the existing ones and modify their length (Which is a read only parameter).
Just a little stuck with this one…

Maybe get the start point of the first section and the end point of the last section, whilst checking if the are in a straight line?

  • Obviously doesn’t work when the are not straight.

Hi Marcel,

Thanks for the suggestion, I will give that a go. After finding those two points, just create a line between them and turn that into a pipe?

Yes, that was the thought.