To keep beating the proverbial dead horse, I’ve hit a wall working with NURBS in Dynamo. I need help finding a way to convert a closed tube like NURBS curve to model curves. The approximate with lines and arcs node does not function in my case nor any other nodes I’ve tried (such as polycurve.curve - yields errors when output is input to ModelCurves: knots must be of degree 2). I’m also not seeing any spline creation methods in Dynamo, which is further exacerbated by Revit’s inability to create native splines with control points that are parametric. So, is the horse dead? No NURBS or Splines allowed?
Provide enough source files so we can recreate your spline please. As you can see from this graph, the method certainly works, but you have to work within the limits of Revit’s modeling system.
This means in the project environment your nurbs curves (a type of spline - Nurbs stands for Non-Uniform Rational B-Spline) need to be planar in one direction. In the massing environment you’d need to create the reference points first, and then build the spline from those points - I’m unsure if Dynamo can do this directly at this moment as I haven’t had a need to step into the massing environment at that level. However, once done you can deform the spline as needed by moving the initial control points, so totally parametric.
Jacob, thank you for your reply. There are three things that make my case different than the example you provided: One, I am bringing in a small set of (co-planar) points from Rhino via Nathan Miller’s package (Rhynamo). Second, these points were part of closed NURBS curve. I accounted for the duplicate point geometry at the beginning and end was able to reconstruct the profile that was in Rhino directly in Dynamo (though it required a 9-degree curve when the original was degree-3). Finally, I am in the massing environment, which I hadn’t thought would treat curves differently than the project environment. All of that said, I have noticed that Revit and Dynamo do not provide sufficient methodology for creating a control-point based spline. The second image of my original post shows the control points that can be placed via the Revit line tool, but these points cannot be constrained. This may be why they are unavailable in Dynamo. Unfortunately, if I could create these objects I would have the geometry that I want precisely, so I need to overcome the limitation imposed by Revit. Given my overall process, it may be somewhat cumbersome to send all of the relevant files, so here are some images that I hope can explain the issue further. Let me know if this makes sense. Thanks so much again for replying.
Can you send me a csv with your point locations (I don’t have Rhino installed so a Rhynamo workflow would be too difficult for me to confirm a consistent starting point)? I’ll take a stab at using this as a means of creating a control point based nurbs curve which constrains and becomes parametric, and will post the result.
Spoiler alert: You have to make the points as reference points in Revit before you make the curve.
I think I found some bad logic in my graph - duplicated points resulting from Curve.PointAtParameter. This was definitely jacking up the model curve creation.
Have a look at these files. There are two nurbs curves based on your csv file in the rvt massing family.
The first uses reference points to drive the shape. This gives the designers the ability to tweak the geometry a bit easier IMO than the method which you showed. It also names each point and then makes use of parameters to drive the location of point number 4 for a higher degree of precision at that location. This is achieved by using Dynamo to create the reference points from the nurbs curve which was generated by your csv, and manually tracing. Yes tracing sucks but associating curves with points isn’t available via the api from what I can see, so to achieve this degree of ‘in revit control’ you’ll need to do this bit manually. Note that I ‘upped’ the number of points to give finer control. Nurbs are by their vary nature in-predictable so having more points will result in a greater degree of precision. For a higher degree of control the adaptive component family could be utilized, but that felt overkill here. You can make the call to go that route if you’d prefer.
The second option splits the closed nurbs curve into two at the midpoint. This removes the ‘points are coincident’ error. This is easy to understand if you think back to editing an extrude a circle in the family environment - they often become split into two semi-circles. Revit cannot handle curves which start and end at the same point, so this error is triggered. The control is less than I prefer (I hate editing splines which don’t pass through the points), but it works and the shape is theoretically generated via the grasshopper geometry so as long as you’re accurate with what you want there, you should be able to get the shape you want here.
I’ve attached both dyns to help you sort this out.
PS: Note that I have element binding associated with the attached rvt in the point based method.
See if this tutorial helps: https://parametricmonkey.com/2017/01/16/revit-splines/
@JacobSmall, thanks for providing the files. However, both of the dyn files appear corrupted and cannot be opened (versions of Dynamo?). I can open the Revit file you sent and I’m curious how you manage to create a closed loop line in Revit? I would have expected to see at least two elements but the selection filter shows one?!
In the meantime, I managed to solve my original problem using the control point spline method generated in dynamo. I had to fix some bad logic in my earlier definition, but I was able to create the proper geometry that matches that created originally in Rhino. Autodesk will have some work to do to make better spline objects to bridge this interoperability gap (~sigh). While having Dynamo control the geometry works for me in this case because of the accuracy of the resulting model curves, I’m still wanting to understand your method more. so Let me know if you can re-upload those dyn files with an indication of the version.