venerdì, novembre 18, 2016

Control Splines in Revit with Dynamo help

For those of you who never tried the spline through points tool in the Revit free form environment, here is a little explanation of how it works.

Let's start simple, create two reference points

Select them and click on the tool, what you have in return is a segment attached to these two reference points

Now add a third point and, just to make things a little more interesting, make sure that it is not aligned with the previous two, you could drag it on its Z axis for example
If you select all three reference points and click on spline through points you will get a spline passing through the points, again, a spline, not an arc

You got the idea, very simple indeed, but what if you have a higher number of points? something like this

If you use the tool now this is what you get in return

Not pretty... so here comes Dynamo in rescue.
Through Dynamo it is possible to generate reference points, these objects are more than simple geometry entities, they have a dedicated shelf in Dynamo for Revit, this means that the resulting objects are dynamically associated to the script that generated them.
It is possible to use these points to create other Revit objects and maintain this dynamic relationship with the script.
Assuming that the amount of points is known we could easily generate a straight sequence of points,


and then use this to create a spline through points (yeah I know it looks like a straight line but in reality we have many control points inside)


These splines are defined through the reference points, but what if we used Dynamo to update the reference points location? The splines have to follow, and here is the result


Besides, you can even control the points manually and tweak the forms as you like, save the points coordinates back to Excel, rerun the scripts as long as you need.
Once again Dynamo saved the day.

2 commenti: