Working with geometry in Dynamo introduces a brand new set of data types in addition to the numbers, strings, and booleans that we covered previously. This video introduces the Point, which is the most basic of these data types, which will be used in subsequent videos to construct the more complex geometry data types such as curves, surfaces, and solids.
- [Voiceover] When we work with geometry in Dynamo, we're faced with a brand new set of data types in addition to the numbers, strings, and booleans that we're already used to working with. Some of these new geometry data types will include points, curves, vectors, planes, surfaces, and solids. Let's start with the point, which is the most basic of these data types, which we'll then use to construct curves, which in turn will be used to create surfaces and solids. The nodes we'll be working with related to geometry have their own geometry section in the node library. Here we see plenty of subsections each one named after a different geometry data type.
Let's begin by creating a point, so let's open up the point category of the geometry library. We can see that there are a few methods to create point geometry here. Let's choose the most common way to create a point object, which is using the Point ByCoordinates node. There are two nodes in the library called Point ByCoordinates. When we hover over each to read the preview, we can see that the difference between the two is that one only takes two inputs for the x and the y coordinate. Let's selec the second of these two, which let's you specify an x, y, and a z coordinate. We'll drop that node into our workspace.
You might have noticed that the moment we placed this node on our workspace a point object appeared in the background 3D preview. If we hover over the inputs, we can see that this node has a default value set of zero, which means that if no input is attached, it's the same as if we plugged in the number zero. That's why this point object in the background appeared at the origin. Let's also drop in an integer slider which we'll plug into the x input. I'll go ahead and search for an integer slider. Let's click on the drop-down to change the slider settings. Maybe instead of a maximum value of 100, we'll change it to 20.
As we can see, as I click and drag the slider to change the output number, the point changes location along the x-axis. I'm going to copy paste two more instances of this integer slider now and plug them into the x and the y inputs. I'm going to copy using control+c on my keyboard and paste using control+v. In the same way, as I change the value of the y and the z values, the location of the point changes according to the axis who's coordinate value I'm changing. Now let's see what happens when we supply a list of numbers to one of these inputs rather than just a single number.
As we've seen in another video, one method for generating a list of numbers is the number sequence node. Let's drop in a number sequence node into the workspace. We can find that under the Core list section of the node library. Just a quick review from a previous video, the sequence node creates a list of numbers that starts at the number we choose and each item increments, or steps, by a number that we set. We also decide how many numbers total are in the list. Let's copy paste our three integer sliders from above and plug them into the inputs of our new sequence node.
For our start number, let's keep the value at zero. Let's change the amount to, say, five. And our step will start at one. Taking a look now at the number list coming out of our sequence node you can see that we now have a list of numbers that starts at the number one. There are five numbers total, and each number increases by one. Now let's use the number list coming out of our sequence node to replace the z input of the point by coordinates node. Watch what happens in the 3D preview.
It appears that we've produced several points. Each point has the same x and y value but each one has a different z value according to our number sequence node. Let's try adjusting the three sliders that determine the number sequence plugged into z. Changing the value of the amount input creates new numbers in the sequence which in turn creates new point geometry in the background. Changing the step value changes the spacing between the points because it's also changing the spacing between the numbers in our sequence. And adjusting the slider plugged into start just moves the entire points list up or down.
The number of points and their spacing stay the same. Now that we've learned how to construct points, let's move on to creating curves which we are about to see are usually created using a list of points as their input.
- 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