CAD Curves to 3D Spline

I want to convert the CAD curves to 3D Spline (through points) in a Massing environment. How can I achieve this?

My Dynamo workflow creates hundreds of tiny line segments.

For now I’ll assume it is one curve at a time you’ll be working with, but you may need to group the curves into sets and use something like @L2 or @L3 at various stages to make it work.

Take the point at parameter 0…1 on each curve. Not you may want to add more samples to hold to the curve better.
Then flatten the list of points completely for each curve.
Then prune the duplicate points where curve A would join to curve B with a Point.PruneDuplicates node.
Then draw a Nurbs curve though the set of points.

In design script it might look something like this:


1 Like

Yeah, I’m able to create 3 distinct polycurves/nurbscurve in Dynamo from the CAD file. The problem is how to get them into Revit’s Massing environment.
I want 3 continuous 3D Splines (through points) in Revit, NOT tiny line segments, so that I can do the modelling with them.

Segmented lines are created when I explode the polycurves and send them to Revit via ModelCurve.ByCurve node.

Ah! You’ll want to look into this API call: NewCurveByPoints Method

The input is a reference point array, shown here ReferencePointArray Members, which can have each reference point appended to it after you create them with this constructor NewReferencePoint Method (XYZ).

All of this is to say, you’ll likely need to step into Python or to build a zero touch node for this.

1 Like

I was able to achieve that through the simple ReferencePoint.ByCoordinates node as mentioned in this AKN tutorial.

Create Underground Tunnel in Revit | AutoCAD | Autodesk Knowledge Network