Vous êtes sur la page 1sur 1

Vectors are very important when it comes to creating free-form geometry in Dynamo.

Vectors define
a direction that can then be used when creating geometry that needs to be oriented in a specific
direction. To create any type of vector, in the node Library, under Geometry, expand Vector. There
are multiple options to create a vector. You can create vectors by coordinates or by two points. You
can also create a standard vector in the direction of the x-, y-, or z-axis. These vectors have a unit
length of one. The other vector nodes allow you to create vectors in any direction you wish. Vectors
are not actual geometry, so it is hard to visualize vectors. The best way to see how they work is to
use them in an example. Click XAxis in the node Library to place the Vector.XAxis node in the
workspace. Next, click YAxis and then ZAxis to place those nodes. You can view the output of the
vector nodes, if needed. For example, the coordinates of the Vector.XAxis node is (1, 0, 0) with a
unit length of 1. Therefore, the vector is pointing in the x-direction and has a unit length of 1. Next,
click the first ByCoordinates option in the node Library to place the Vector.ByCoordinates node. With
this node, you can define the coordinates, which in turn define the direction of the vector. You can
use any value you wish, whereas the standard vector nodes are pre-defined. Delete the
ByCoordinates node for this example. Back in the node Library, expand Point and then click the
second ByCoordinates option to place the Point.ByCoordinates node. When you do, a point is
created at (0, 0, 0) which is the default for blank inputs.Now you can use that point as the start point
of a line, and you can use a vector to define the direction of the line. Back in the node Library,
expand Line and then click ByStartPointDirectionLength. The Line.ByStartPointDirectionLength node
has three inputs: startPoint, direction, and length. Use the point you just created as the
startPoint. Next, add a Code Block and enter a value of 1. Use the Code Block for the length. Now
you need to specify the direction. When you hover your cursor over the direction input, the tooltip
shows Vector. Any time a node needs a direction, you need to use a vector as the input. Connect the
Vector.ZAxis node to the direction input. When you do, a line is created. The line starts at the origin
and extends up in the z-direction one unit. At this point, you can disconnect the ZAxis node and
connect the other vector nodes to see how they affect the line. As you use the other vectors, you can
see that it simply changes the direction of the line. Once again, vectors are not actual
geometry. They are simply used to define the direction of various types of geometry. If you need a
vector in a direction other than one of the standard coordinate directions, you can use one of the
other vector nodes. For example, you could use the Vector.ByCoordinates node with the coordinates
set to (1, 1, 0) to create a vector at 45 degrees on the x-y plane.

Vous aimerez peut-être aussi