Friday, March 6, 2015

Inflection Point Tracker

Is it possible to find inflections points of splines in Revit?

Yes, it is. Here is my approach.

Watch what I created

The definition in the video finds inflection points as following order.

It creates an object which has two lines as above picture, and transforms it to several points on selected spline.

And checks each of the transformed objects by using DoesIntersect node as following rule.

A simple Python Script was used to make this work easy. The code returns index when both booleans are different from each other.

Another python node was necessary, because Dynamo finds multiple continuous points when the curvature around inflection point is small. The second script finds each of average points from continuous series of points as follow.

Then it collects inflection points by using above result as index numbers.

Oh, and you can adjust accuracy as follow. The bigger number the more accurate points you can get.

You can download my dyn as usual.

Enjoy. :)


  1. Hi, Great approach as always!
    I thought of using this on a 3d spline and it doesn't seem to work. I tried putting cylinders on the lines and intersect with them instead of just the two lines. And once again it doesn't seem to work. I think maybe i am missing something here. Have you tried this on a 3d spline?

    1. My dyn works for 2d spline only, and I'm not sure even it's possible to make it work on 3d.
      for example, in a helix, there are too many inflection points. cuz there is no one-way 2d curve in a helix. Directions of curve are always slightly changing in a helix. How can you define inflection point in 3d?

    2. Thanks for your reply. As I dug further into the problem I also thought of it being imposible for practical use. But maybe a similar approach could determine how bent is the spline at a given interval of points.
      My main goal (and i'm pretty stuck right now) is finding a way to approximate a 3d spline with a number of tangent arcs and straight lines. Dynamo has a node for approximation but it has no control over the number of pieces to use.
      Any ideas are greatly appreciated :)