In this video, we will begin by performing functions that take Solid geometry inputs and modify them, followed by some of the geometry analysis techniques and functions that are commonly used by architects, engineers, and construction professionals. Nodes used: Solid.Fillet, Solid.Chamfer, Solid.Difference, Solid.Union, Solid.Centroid, Solid.Area, Solid.Volume, Topology.Edges, Topology.Faces, Topology.Vertices, Geometry.Intersect, Surface.Area, Surface.Perimeter

- [Voiceover] Now that we've constucted a few solids in our workspace, let's explore some of the nodes that allow us to make adjustments and perform analysis on the solid geometry elements in our Dynamo graph. We begin this example with a list of two solids that we constructed in another video. We began with two polygons which we translated vertically and then we rotated those polygons around their centers. Then we added them to a list, and we lofted them together. I'm gonna go ahead and turn off the geometry preview on the polygons.

We're not gonna need them for this example. Let's begin with two functions that are used to modify the edges of solids: fillet and chamfer. We can find these nodes in the geometry solid section of the node library. Let's drop one of each into our workspace. Both of these nodes will be used to modify the edges of whatever solid we input. Fillet will take the edges of a solid and round them according to the radius that we set. Chamfer is similar, but instead of rounding the edges, it'll cut away at the edge by an offset distance. Sometimes chamfers are also referred to as bevels.

Let's begin with the fillet. We'll start by plugging in our lofted geometry into the solid input. Next, it takes an input called edges which is a geometry data type we aren't yet familiar with. There must be a node in the library that's related to edges. Let's go searching for it. I'm gonna click on the white search bar at the top of the node library and do a search for edge. This one seems to extract the edges of a topology, which is a term that I'd never heard of before using Dynamo, but I'm not seeing any nodes that specifically take a solid input and return its edges.

Let's give this topology edges node a try with our solid. After plugging our solid into the topology input, I'm not seeing any changes in the background 3D preview, but looking at the node preview, it seems to have worked. Two lists of edges, one edge list for each of the solids that we provided as inputs. Sometimes, working with Dynamo means taking these types of guesses about which node will work for you. Even after you've got the hang of it, you likely won't be able to sit down at your computer at the start of a Dynamo graph and predict exactly which nodes you'll need to solve your problem, and that's okay. This kind of guess and check method is a big part of learning how to do programming work.

This node that worked for us seems to have come from the geometry topology section of the library. Let's head over there and see what else that section of the library has to offer. So in addition to extracting edges of solid geometry, we're also able to extract things like faces and the vertices. This might come in handy later. Let's keep that in the back of our mind. Now that we've extracted all the edges in these two solids, let's plug them into the edges input of our fillet node. The last input is a number specifying the radius of the rounded edges. Let's drop in a number and give it the value one. It appears that our fillet node worked, but in order to see the geometry preview, it looks like we also need to hide the solid by loft node, and the result in our background preview is our two solids with now nicely rounded edges.

Now, note that the fillet node doesn't necessarily flow upstream to modify the geometry coming out of our loft node. It creates a modified copy of the loft node but applies the fillet function to it. Let's hide the geometry preview on this fillet node and plug in the same inputs to our chamfer node. Now we have our same two solids but instead of a fillet, we have beveled or chamfered edge. Now remember, we can change these inputs at any point in time to have the geometry update. Maybe we wanna change the number that we used as an offset. Let's try two instead of one.

And our geometry preview updates, and we have a deeper and a wider chamfer now. We can see that our radius is also updated as well. Now before we move on, I should mention: before we applied this fillet and the chamfer functions, we applied those functions to every single edge on both of these solids. Let's say we weren't interested in filleting or chamfering every edge, but we had a few specific edges that we had in mind that we wanted to modify. In order to do that, we could easily pick and choose only a few items coming out of our edges node using some of the list management techniques that we covered in another chapter.

Perhaps you'd use the GetItemAtIndex node to pick out only the edges you wanted to change, or maybe you'd filter items out of the list using the FilterByBooleanMass node along with the list of true or false boolean values that you construct. I'm going to group this cluster of nodes together and label them fillet chamfer so I can identify them easily in case I need to come back to them later. For now, I'm going to hide their previews and turn the preview back on for the original two solids. Another common technique when we have two intersecting solids is to either use one solid as a void that cuts a volume out of the other solid, or sometimes, we'll combine them both together into a single solid.

Before we try these techniques out, we need our two solids to intersect. Let's move the triangular solid so that it intersects with the rectangular solid. We'll search the node library for a translate node. Now in another video, we used this translate node which takes a vector as an input, but for this particular case, maybe we'll use this translate node which will take an X, a Y, and a Z coordinate. Our first step is to specify the geometry that we're interested in translating. We only wanna move this triangular solid, but right now, the only place on our graph that we can find it is in this list along with the rectangular solid.

I'm gonna do a quick search for the last item node. I'm gonna drop in a last item and a first item node as a way of separating out our rectangle and our triangle solids. Now that we've isolated our triangular solid, I'm gonna plug that into the geometry translate node. We also need to specify the distance that we wanna translate it. I'm gonna need a number node as an input here. Let's try moving the triangle about 15 units towards the rectangle. I'll type in 15 into my number node and plug it into xTranslation, which should translate it 15 in the X direction.

It looks like the translate node moved the triangle 15 units in the opposite direction from what we had in mind. Let's change our 15 to a negative 15, which should reverse the direction. There we go. That's much better. I'm also gonna go ahead and hide the geometry preview that we don't need anymore. Great, now that these two solids intersect each other, we're ready to test out our new techniques. We can find the two nodes that we'll use to perform these functions in the geometry solid section of the node library. Let's drop in a difference and a union node. We'll begin with the difference node.

This takes two inputs: the solid and the tool. Even though both inputs require a solid, the tool input is the solid that we're considering to be a void for this operation, which will disappear after it takes a chunk out of the solid input. Let's go ahead and plug in our rectangle into the solid and our translated triangle into the tool. If I select the difference node to see the geometry preview, it seems to have worked. I'm gonna go ahead and hide the square and the triangle that were part of the operation so we can see exactly what happened.

We can see that what we're left with is the rectangular solid minus the volume where the triangle had intersected with the square. We also see that this node has thrown out the triangular solid. It's no longer visible. It's only role here was to remove a volume from the rectangle. Now, let's hide the preview of the difference node and plug both of our solids into the union node. The geometry that comes out on the other side looks an awful lot like what we had before, but you'll notice in our node preview that instead of a list of two solids, we have one single solid. They've been joined or unioned together.

Now, before we move on, let's group these nodes together. I'm gonna select them and hit control G on my keyboard. I'll title the group difference unions since that's what these nodes work together to do. Now, let's see what different kinds of analysis we can perform on our new solid. Let's begin by revisiting the geometry topology section of the node library that we found earlier. The topology tools are good at extracting components like edges, faces, and vertices at their inputs. Let's drop one of each node into the canvas and plug in our solid as the input. We can see in each node's preview that the calculation works but we don't see anything new in the background geometry preview.

There's one more step to turn the edges, faces, and vertices coming out of these nodes into curves, surface, and point data types that we're used to working with. In our geometry library, there's a section dedicated to each of these topology data types. Let's begin with the edge portion of the library. We'll drop in an edge CurveGeometry node. Next, we'll find the face section of the library and drop in the SurfaceGeometry node. And lastly, we'll navigate to the vertex section and drop in a PointGeometry node. Let's plug in each of them now.

You'll notice in our background 3D preview a series of curves appear, and we can see in our node preview that this is a list of curves instead of a list of edges. Plugging in the SurfaceGeometry node extracts all the surfaces that make up the solid, and our PointGeometry node extracts the points that each of the vertices. There are a few more metrics that we can easily extract from our solid, which we'll find in the geometry solid section of the node library. We'll scroll down to the query section which is indicated by a blue question mark. These nodes are several of the different functions that will extract information about a solid that we input.

Let's drop in the area, volume, and centroid nodes onto our canvas. If we plug our solid into the area node, we'll see that the node reports the total surface area of the solid. In the same way, plugging in our volume node is going to report the total volume of our solid. The centroid node finds the center of gravity of the solid, which can be really helpful for certain engineering calculations, like where to locate crane pick points. Now before I plug this node in, I'm going to hide the solids geometry preview so we can see the point appear. We're also going to need to hide the surface geometry that comes out of our face surface geometry node.

Now, I'll go ahead and plug in our centroid node. You'll notice that a new point appeared in the background preview, and if we look at the node preview, we can see the exact location of the center point of the solid. Let's group all of these nodes together because they all perform some sort of analysis on our solid. I'll give the group the title analyze solid. Now we've covered some of Dynamo's geometry tools that can be used to perform realtime analysis on your work. Maybe the solid in your Dynamo graph is a building form you're designing or a component in a system that you're engineering.

In your workflow, try to indentify ways that you can benefit from this kind of realtime feedback reporting. Maybe even have Dynamo alert you when you aren't meeting a specific type of requirement.

###### Updated

9/26/2017###### Released

3/29/2016- Placing and connecting Dynamo nodes
- Understanding Dynamo's data types
- Performing math functions
- Creating number lists and text strings
- Writing data to an Excel spreadsheet
- Creating points, curves, surfaces, and solids
- Analyzing geometry
- Linking a Dynamo-driven SAT into Revit
- Placing Revit families with Dynamo
- Creating Revit views and sheets with Dynamo

## Share this video

## Embed this video

Video: Modifying and analyzing solids