Dividing polycurve by distance

Hello

I am working on a model for a segmental tunnel- it is based on an alignment string in CAD i.e. a 3D polyline that defines the path.
The process I have used so far (and it works) is:

  1. Divide the alignment string in Rhino or Civil3D at specific intervals and export to CSV. (Rhino is the quickest & has best results)
  2. Read the CSV file using Dynamo and insert adaptive family between points.

Rather than using Rhino/CAD to genetrate the points, I am trying to do it all in Dynamo- my process is:

  1. Select CAD import in Revit
  2. Extract the geometry (a polycurve consisting of multiple curves)
  3. Create a new NurbsCurve through the points of the curves
  4. Divide the NurbsCurve by distance (necessary because Curve.DivideCurveByDistance will not work on a polycurve)

The problem is that the divisions start off correctly (should be 1700mm)- but then increases before going back to the defined distance
You can see this in the vector lengths and also the model.

So the question is essentially how to divide a polycurve by a specific distance
thank you

Andrew



1 Like

@Andrew_Hannell See if this works for you.

4 Likes

@Vikram_Subbaiah

Wonderful, thank you very much Vikram.

This means 22km of twin tunnels can be modelled in about 5 minutes, complete with sequentially numbered rings.
(It took someone about 6 months to manually model a similar project…)

Andrew

2 Likes

Hopefully you don’t get paid by the hour, Andrew…:wink:

3 Likes

should get paid by the anti-hour…!
(i.e how much time saved)

1 Like

And redistribute to all this excellent people that worked for free ? :relaxed:

Don’t forget me :smile: :smile:

3 Likes

All,

I’m currently working on a script with the intention of segmenting curves. The goal is to divide curves into line segments of a set distance. I found the script above to be quite interesting, but I cannot seem to find the Curve.DividePolyCurve node in my lunchbox package, and I have the latest version available. Can anyone tell me where I may find that command? or have any useful tips for a script like this?

Thanks!

Hi Emily

DivideCurveByDistance is still in Lunchbox
(but note the current version is a non-package manager install)
Depending what kind of geometry it is, some of the above techniques might still be relevant/necessary

Holy shit this approach also worked for me with a similar problem!!

1 Like

Edit: Thank you for the help thus far!

I’m looking to do something similar here. I simply want to array parking stalls along a path. I’m currently trying to bind a few different methods together to get the stalls placed every 9’-0" while also getting them to rotate tangentially with the points they are placed on. What I currently have seems fine, but I’m wondering how to place the stalls every 9’-0" rather than dividing the total length of the polyline by 9. Not sure which way is better.

In addition to this i’d like to have the ability to flip the stalls 180 degrees along the polyline if the parking lot is on the other side of it. I’d like to do this with a toggle in the Dynamo Player if possible.