Geometric Primitives
CoordinateSystem
While Dynamo is capable of creating a variety of complex geometric forms, simple geometric primitives form the backbone of any computational design: either directly expressed in the final designed form, or used as scaffolding off of which more complex geometry is generated.
While not strictly a piece of geometry, the CoordinateSystem is an important tool for constructing geometry. A CoordinateSystem object keeps track of both position and geometric transformations such as rotation, sheer, and scaling.
Creating a CoordinateSystem centered at a point with x = 0, y = 0, z = 0, with no rotations, scaling, or sheering transformations, simply requires calling the Identity constructor:
CoordinateSystems with geometric transformations are beyond the scope of this chapter, though another constructor allows you to create a coordinate system at a specific point, CoordinateSystem.ByOriginVectors:
Point
The simplest geometric primitive is a Point, representing a zero-dimensional location in three-dimensional space. As mentioned earlier there are several different ways to create a point in a particular coordinate system: Point.ByCoordinates creates a point with specified x, y, and z coordinates; Point.ByCartesianCoordinates creates a point with a specified x, y, and z coordinates in a specific coordinate system; Point.ByCylindricalCoordinates creates a point lying on a cylinder with radius, rotation angle, and height; and Point.BySphericalCoordinates creates a point lying on a sphere with radius and two rotation angle.
This example shows points created at various coordinate systems:
Line
The next higher dimensional Dynamo primitive is a line segment, representing an infinite number of points between two end points. Lines can be created by explicitly stating the two boundary points with the constructor Line.ByStartPointEndPoint, or by specifying a start point, direction, and length in that direction, Line.ByStartPointDirectionLength.
3D Primitives - Cuboid, Cone, Cylinder, Sphere, etc
Dynamo has objects representing the most basic types of geometric primitives in three dimensions: Cuboids, created with Cuboid.ByLengths; Cones, created with Cone.ByPointsRadius and Cone.ByPointsRadii; Cylinders, created with Cylinder.ByRadiusHeight; and Spheres, created with Sphere.ByCenterPointRadius.
Last updated