# Envelope of cable duct

Hello,

I got a large data set of cable ducts. To manage volumes, clash detection, etc there is a request to genererate the envelope from each of the cable duct branches. The branches are available as blocks, containing solids, lines and arcs of each cable alignment. My idea was to intersect the solid geometrie with planes to get a kind of crossection profiles, find a convex hull in each profile, representing a solid and generate the 3D enevolpe over all profil-planes. I’m not sure if this will work so far. I would be glad to hear some of your opinions and thoughts here.

The first bigger prolem i ran into is, how to get the intersected solids sorted to each plane for further use, i.e. getting points for a convex hull of each plane.

Hi @INGDLS,

I think your approach makes sense. Another idea would be to create the solid envelope for each cable and then union the solids together to create the larger “bounding” solid.

However, I think there will be some edge cases to either approach that are going to be tough to handle unless you have some way to group cables together by cable run. Take this for example:

The cables begin together and then separate from each other to enter the vault. It looks like you could separate the pink and red cables into separate runs because they are on separate layers within the block (so you could filter and group the solids by layer).

However, that wouldn’t work in this example because all of the cables appear to be on the same layer:

Do you have any other way to group the cables by run?

Assuming you can get the polycurve that the cables run along, you could try this:

1. Take the first PC out of the group - this will be our test curve.

2. Next find the adjacent polycurves to it at the start of the bundle (2 for corner conditions, max 4 for in interior curve on the inside of a 3x3 grid), pull them out of the list to use as our comparison curves.

3. Then get the distance from the current polycurve’s start point to each of the two comparison curve’s start points. This will be the comparison distance.

4. Now for each point on the test curve get the distance to each of the comparison curves. When that distance is ever greater than the comparison distance plus a tolerance it indicates a need for a split for the test curve at the prior point as the curves deviate.

5. Split the curves as needed at each deviation point.

6. Repeat steps 1-5 for each polycurve.

7. When complete, build a polycurve set for each set of split polycurves.

8. For each curve in the grouping of curves build a bounding rectangle at the start of the curve, sweep that along the curve, and union them to a single solid to get one shape for the bundle.

Because this would require removing the test curve to prevent repeatedly trating things we already know, some imperative Design Script, Python, or C# would be advisable if not a requirement.

This may fail for some edge cases (not a problem Knhabe run into before so I may not be seeing something), but it may set you on the right path. Seems like this could be quite useful in many aspects of AEC, so I may ponder a simpler solution (ie: one packaged node to divide linear objects by do the job). Is this a commonly needed task?

Hi

@mzjensen Thank’s for your reply and your helpful comments. The sample data are just a small extract from the original dataset. The data (drawing) are available as they are, means that there is no other way to get a better quality and yes, the consistency is also another problem beside the desired output. Because of this, the idea was to focus on manual selection of objects instead of doing this automatically for the whole data set. To check and filter the color of block objects seems to be a good tip here. Otherwise such parts should be modified and blocks recreated manually in case the automatic way fails.

@JacobSmall I also thank you for your thought’s! I always fail with creating a polycurve along the cable run or found no proper way / function of doing this. Seems to me that it is a challenge to join multiple curves into one polycurve in case of such data examples. That’s why I came to the idea described in my initial post, to adapt planes according to the cable run and hopefully find a proper alignment as polycurve based on specific points of the planes. Don’t know how often such scenarios are request but can imagine according to BIM oriented design, escpecially infrastructure designs, that there are similar tasks to manage.

1 Like

Hi @INGDLS ,

Can we know how these solids/blocks are generated? I assume they are created with some sort of extrusion tool or command, right?

Would it be possible to generate the outer box from that initial moment, instead of doing it after?

unfortunately this information is not available, just the drawing is provided. I used the XDATA command from express tools and got the follwoing data

So seems that the data are generated by an application. ( pit – cup GmbH)

One another thought. Does somebody know for a package, which has Qhull ( Qhull code for Convex Hull, Delaunay Triangulation, Voronoi Diagram, and Halfspace Intersection about a Point) integrated?

This library is available in MeshLab and seems to generate useful meshes (Alpha/Complex Shapes) based on points. So I export points from the cables geometry with dynamo via XYZ file to meshlab and generate meshes, export them to obj files and can get them back into dynamo, using the MeshToolkit. With this I would like to try to follow the primer package case study.

1 Like

That simplifies things a bit. Here’s one example that might work. This is set up assuming that it’s feasible to explode the container block references down so you can select the cables that should be include in each envelope.

DuctEnvelope.dyn (38.2 KB)

1 Like

Hi @mzjensen ,

good idea, you are very expierenced! With this you found a possible solution for me to manage that task in a semi-automatic way. Thank you very much for your efforts! My fault, that I was probably thinking to complex here.

1 Like