From the course: Paneling with Dynamo for Revit

Panel planarity - Dynamo Studio Tutorial

From the course: Paneling with Dynamo for Revit

Start my 1-month free trial

Panel planarity

- [Narrator] Let's see how we can use Dynamo to perform a custom geometric analysis on a paneling scheme. I'm in an exercise file with a wavy surface that's divided into quadrilateral panels. None of these panels are flat because of the nature of the way that they're oriented on the surface and because they are rectangles. We'll use one way to measure the deflection of these individual panels. That type of measurement may be important to a manufacturer especially if these are glass, for example. Sometimes you can bend glass a little bit but not too much. So, we'll also use that information to establish a pass fail criteria and display the information in color in Dynamo. First, the way you might measure something like a deflection is a little subjective and it depends on why you're measuring it. The method we'll use here will measure the distance between one corner point and a plane that would be defined by the other three corner points of the panel. If the panel were perfectly planer, that distance should be zero because all four points would lie in the same plane. So, first we need to find the plane that is defined by three of the corner points. If we look at our list structure for the way that the points are listed, we have individual lists of points; each one per panel. So, we can quickly get at the corner points of the panels by flipping the orientation of this list so we have four giant lists; one each for the corners of all the panels. I'll use lists.transpose and now we have four big lists. And I'll use a code block to break up that list. I'll name something points, pts and use square brackets to access the first item with zero and the following items. What we're after ultimately is a plane. So, let's look at how to make a plane. If you search for plane.by you can find all the different ways to make a plane and one of these is particularly convenient namely ByThreePoints. And we can connect these in no particular order. You might stop and say, "Hey, that looks really cool." I actually keep a file of happy accidents for Dynamo files like this. But this particular pattern is not exactly what we're after. So, I'll turn that preview off. Next, what we'd like is the distance between the fourth point of each panel and that plane. So, I'll look for geometry.DistanceTo. Again, it doesn't matter which order you connect these in. Here are results in units or in feet if you're operating in Revit in the imperial library. Meters if in meters, millimeters if in millimeters. Let's say your fabricator told you that any deflection is fine as long as it's less than one inch. If you're in the U.S., the best way to do this in Dynamo without having to do much conversion math is to use the node called number from feet and inches. We can enter in 1" and it becomes one inch. You can see it does the conversion for us into feet. So we can ask, now that we have a measure of the deflection, is that greater than our tolerable value? Well, a lot of these are true. So, we'll probably have a problem with this paneling scheme. But let's see what that means. We can translate the true false into a color using the If node because our test, the true or false, is already taken care of. And the true and false can be colors themselves. So, let's color it red using 255 to the R input for one if it's true and white meaning all R, G, and B are at their full value, 255. This will translate into a series of colors. And then from there we can display the results with Display.ByGeometryColor. And it looks a little splotchy so we're going to turn off the preview of the surface that happens beforehand. So, find that, right click, and turn off preview. So, right now, we certainly have a problem. So, what if your fabricator says, "Okay, fine, we'll use a different method "and we'll allow you two inches." We can try that, a couple of panels are okay. So, you say, "Okay, let's redesign the surface." Go all the way back to the slider at the beginning, and say, "Let's make the surface less wavy." You can see the pattern that emerges. The surfaces in the middle and on the edges are the most twisted so they're failing our test. As we make the surface less wavy, for example, we could increase our ability to fabricate the panels more cheaply. In this video, we looked at one way to measure deflection and to establish a pass fail criteria and then, finally, to visualize that information to give us better information about our design process.

Contents