Create a Mass from 3D Points

This post unfortunately does not provide a complete solution to an interesting task, just a couple of ideas.

In his comment on the Revit 2013 API Ammar asks:

Question: Is there a way to generate a mass from a list of X, Y, Z points?

Answer: Unfortunately I do not see any way to achieve this through the Revit API directly.

I can imagine using some external tool such as ACIS or AutoCAD, feed it the points, generate a SAT file, create a family definition from that, and insert an instance of it into your model.

Here are a couple of ideas that colleagues of mine came up with, though:

1. You cannot make a surface directly from the points – you will need to first make curves that pass through the points and then can use NewLoftForm with the curves.

2. I think it would be a pretty difficult task to do this directly in Revit, based on the limitations of the form element.

Conceptually, I think you could do it, but it would be some heavy lifting. In order to insure not having self intersecting forms, you would need to do something like Nathan Miller's crazy redundant lines in his Vasari RevitPythonShell 3D supershape.

In order to make the splines themselves, you would need to make groupings of points that were sequential layers and also reasonably well ordered sequences of points, as the spline by points and loft operations both just derive a shortest path in order to create surfaces and splines.

3. Given an arbitrary number of 3D points that describe a convex hull, you could pass them through a Delaunay triangulation algorithm and then create 2D FormElement surfaces to patch between each set of 3 points. I don't see the reason why you would want to start with points though. Starting with curves or some higher-order structure would probably be better.

Looking at it the other way around, perhaps you are not looking to just make a surface or a form. You could easily place mass family instances on the points, or use an adaptive component to thread between multiple points like a truss, for example.

By the way, we have created a new set of SDK samples that show more things you can do with Massing and the Revit API on the Revit .NET Development blog.

Take a look at this highly interesting blog and its collection of exciting Revit and Vasari .NET samples.

4. The point with Don Rudder's new samples is that there is much more you can do with the conceptual design environment and it's API than simply creating surfaces and solids.

Often users wish to place family instances in certain spots defined by XYZ coords. Don's examples do that, as do Ian Keogh's Dynamo Visual Programming for Vasari ones.

5. If you are interesting in making raw form from points, I also suggest taking a look at this really slick new Mobius surface parametric form sample by Nathan Miller, just posted.

I am quite surprised and very impressed by the amount of exciting samples available in this realm. I was previously not aware of that at all.