Duct/Pipe Splitting with union

I need to split duct. I got a dynamo script on this post Divide a duct .

  1. The Script separates all the ducts from the connected fittings and I need to rejoin with all the fittings
  2. In manual modeI I cannot rerun the script on other element
  3. How do i set minimum and maximum split length of the duct

I’ve made a Screencast of my Problem
Screencast Of Problem

I do not know how do I take screenshot of such long script so I uploaded file instead
Erfajo_Ductsplit.dyn (74.2 KB)

I have extended my previous graph with the code in this topic…

@T_Pover is the man to go to if you want to know something about MEP elements… please @T_Pover turn this into a node and put it into you package :slight_smile:

DuctByLengthUnionElements.dyn (80.2 KB) --> Dynamo 2.1.0
DuctJoinElements.py (1.5 KB)

There is a bug in the forum… I have tried endless times to re-uploade the python code, but it keeps renaming the file to DuctJoinElbow.py when it is being downloaded. It MUST be named DuctJoinElements.py
I simply dont know why the forum is so crappy.

1 Like

Thank you for replying Erfajo. My current level knowledge of dynamo doesn’t let me to manipulate curves/Geometry/Python/Designscript. But I believe this process could be way simplified by simply placing union at specific distance for eg.( minimum -300/maximum-1500) . Or maybe split at point command at specific distance.

  1. Select the Duct Element
  2. Get Points at specific Distance ( Minimum / Maximum)
  3. Place Union Fittings / Split at Point command at the point

Is this possible in dynamo?

Please have a look at this screencast.

I tried with Mepfitting.byPointsAndCurve .

  1. Not getting Union Fittings on the 10% divided distance
  2. I need to define distance at 1400. But minimum should be 300
    Hope I’ll get some help here @erfajo , @T_Pover

Mepover_Duct_Union.dyn (6.3 KB)

1 Like

It sounds like you did not try the solution I made… If you don’t have experience in how to use help given, then there is not much to do about it. You will only learn how to work with dynamo if you are able to tweak whatever help you get to some extent by your self. So I will recommend you to give it a second try.

Since you did refer to a previous solution I have made, have I made a solution for what you are asking for. This graph split the ducts in a length driven by the user. It unions the ducts with a fitting of a length driven by the user. For this graph, I added joining the entire network together at the elbows, since that was the problem you showed in your screencast.

You should be able to add more intelligence to the graph, so you can have minimum lengths as well as the default cutting length if you think this is better. However, I would believe that the duct lengths you can buy should be the default length, and then there should be as few cuts as possible since every cut will cost extra to do.

Thank you for replying.

  1. I tried the solution . Maybe it was because of orchid package it is still problematic. Orchid package didn’t showed up in my dynamo ( only preliminary one showed up) . I tried to install the package and even manually copy pasted in support folder.

  2. Instead of creating new elements and joining with fitting elements isn’t there a way to simply place union fittings / split command in the ducts? I got problem in all the fittings not only Elbows.

  3. When I say minimum for example if the total duct length is 4100 mm then it would look something like this
    for( min 300 ,max 1400) ,(1400-1400-1000-300) . As Duct fabricator do not prefer to fabricate minimum than 300 in our case

You really don’t need my package (Orchid) for this, I used the “ScriptFileReader” because it is a “re-reader”, this is handy when you tweak python code. You can replace that with a normal “ReadText” node.

To your question 2, no not that I know off. To your question 3, then add this intelligence.

1 Like

Thank you for you help so far.

  1. Ducts are still not connecting with elements. I’ve made a screencast of another situation.
    Duct Union Splitting

Erfajo_Duct.Split.dyn (81.1 KB)

  1. Why is MEPFitting.ByPointsAndCurve not working for me?

After split duct, duct and fitting duct contact to each other but they are not connect.


Same problem to me. Hoping someone give any solution :frowning:

I gave the solution i post two… you just dont want to use it…

Ducts are still not joining. Even after using the latest script

I haved copied DuctJoinElements.py into C:\Program Files (x86)\IronPython 2.7\Lib. when i run dynamo, the error appears as shown below.

I’m not sure if its the best way but here are two other options.


It worked. but there are still some unconnected segments as shown below


Thank you so much for your help so far.

  1. If I connect there other fittings there are still lot of Disconnections. But I can live with that I think.
  2. Can you please so me the direction on adding Min /Max intelligence
  3. And Item Length to be
    Item Length = if ( or ( Duct Height >450 , Duct Width >450) , 1420 , 1500)

@Sujan, @Hieudang96as
It will be of most importance that you learn how to tweak help given, otherwise, will you run into troubles over and over again… with small efforts did I update the graph including revising the part with @T_Pover python script so I could use his node for elbows.

DuctByLengthUnionElements2.dyn (81.4 KB)

1 Like

Thank you very much for your help so far.
elbow.bymepcurve of me don’t work, it is empty after run, can you help me.

@Sujan As I can see @erfajo has already given you a possible solution. Try to put some efforts in working with the help you are given by yourself to become familiar with dynamo.

@Hieudang96as Your missing margins input. Please read carefully how nodes you are using work, try to see the help provided in the node you are using.

@Sujan, @Hieudang96as
Instead of firing away questions towards people that may help you, try put some efforts in solving problems first by your self. This is not a “do my job” community. The community is driven by people who offer their knowledge voluntary in their spare time. Please respect that.