Geometry Basics in Parametric Design


Basic Geometric Concepts in GenerativeComponents.

GenerativeComponents relies heavily on geometry to capture and express design. Since it is an associative, parametric modeler, geometric primitives are often defined as the result of operations on other pre-existing geometric primitives. Therefore it is essential that these geometric primitives and their associative operations are well understood, as this is the key to successful use of a parametric and associative modeler.

The geometry primer establishes fundamental geometric principles and how GenerativeComponents interprets these principles. There are some GenerativeComponents specific naming and programming conventions that are essential to using the system effectively.

Both in data structures and in geometry the concept of dimensionality plays a major role. The smallest geometric entity, a point is a zero dimensional entity, meaning there are no degrees of freedom geometrically in referring to a point as it specifies only one location in space. A Line element for instance is a one-dimensional geometric element as there are an infinite number of positions that lie on a Line. Any specific position can be referred to with a parametric expression, which in case of the Line is usually denoted by the parameter t (GC - Parametric Space) which has a range of 0 to 1. Many CAD applications rely on these principles, but few expose these parametric definitions to the designer as a way of controlling geometric relations. GenerativeComponents does so in the following way.

Data Types and Dimensionality

When discussing geometry it is also necessary to introduce the concept of data types, that is, the type of numeric data used in geometric expression in GenerativeComponents. There is the int type, which stands for integer and means whole numbers like 1, 3 or 7. An integer cannot have a decimal component. If a decimal number is assigned to an integer variable either it creates an error or the decimal part is truncated. A second main numeric type is a double. A doubleis a number with decimals as for instance 1.243 or 5.4. The number of decimals that can be stored depends on the system and determines the maximum precision with which a program can calculate numeric expressions.

Just as in geometry, there is the concept of dimensions in numeric data as well. Dimensions, or also referred to as rank denote the structure of the data. A list or an array of data such as {1, 5, 4, 8} is a one-dimensional collection of integers. Nesting lists inside lists creates a data collection of rank two, or a two-dimensional data structure such as {{1,4,2} , {9,4,2}}. Adding another nesting level increases the data structure dimension to three and so on. The difference between an array and a list is that an array has a predefined size, while lists can expand or shrink. GenerativeComponents uses lists, and its multidimensional structures are lists of lists. In this context, the nested lists do not have to be of the same size. In the following introduction to the geometric elements the dimensionality refers to the dimension of the parametric space of the geometry.

Dimensions of Features

Geometric Dimensionality

In geometry the dimensionality of the elements determines the type of operation that can be performed.

The geometric primitives with different dimensions of parametric space are:

Zero Dimensional Parameter Space

Geometric element:           Point
Feature name:                    Point
Implements Interface:       IPoint (and others)

In the case of a point, there is only one location to refer to which is its position in space. The point is a zero dimensional element as there are no degrees of freedom to specify another location that is part of the point element. We can establish such a zero dimensional parametric link by creating another point that uses the first point as its origin. With zero offset in X, Y, Z the two Points coincide.

One-Dimensional Parameter Space

Geometric element:           Line
Feature name:                    Line
Implements Interface:       ICurve and IDirection and (others)

A Line element for instance is a one-dimensional geometric element as there are an infinite number of positions that lie on a Line. Any specific position can be referred to with a parametric expression, which in case of the Line is usually denoted by the parameter t which has a range of 0 to 1. This concept of geometric dimensionality (and parameter) applies to all other Types of curve (below), while each Type of Curve also has unique defining properties and behavior.

Geometric element:           B-Spline Curve
Feature name:                    BSplineCurve
Implements Interface:       ICurve (others)

Geometric element:           Circle
Feature name:                    Circle
Implements Interface:       ICurve (others)

Geometric element:           Arc
Feature name:                    Arc
Implements Interface:       ICurve (others)

Two-Dimensional Parameter Space

Geometric element:               B-SplineSurface
Feature name:                        BSplineSurface
Implements Interface:           ISurface (others)

A Surface element is a two-dimensional geometric element as there are an infinite number of positions that lie on a Surface. Any specific position can be referred to with a combination of two parametric expressions, which in case of the Surface is usually denoted by the parameters U and V, each of which has a range of 0 to 1.

Three-Dimensional Parameter Space

Geometric element:                       Solid
Feature name:                                Solid
Implements Interface:                   ISolid (others)

Composite objects in GenerativeComponents

In addition to the geometric primitives, GenerativeComponents relies on composite geometric object which may combine a number of different Features. For instance, a CoordinateSystem makes use of Point, Direction and Plane Features to represent a set of three working planes, an origin and the three directions X, Y, Z.  The theoretical definition of a CoordinateSystem as a Transform may be a too abstract concept for practical use in modeling operations. Therefore, this approach of representing a CoordinateSystem as a composite of Points, Planes and Directions makes this powerful concept more accessible.

This does not exactly correspond with the pure geometric definition of a CoordinateSystem but is very useful in a modeling environment as the three planes and directions are often needed to be referred to when placing elements in space.

Geometric element:           Point, Planes, Directions                                                    
Feature name:                    CoordinateSystem
Implements Interface:       IPoint, ITransform

Another example of a composite object is the Plane Feature in GenerativeComponents. Geometrically a plane is a normal vector with an origin specifying the start point of the vector. The plane can be thought of as all vectors perpendicular to the normal vector. In GenerativeComponents this concept is expanded. A GenerativeComponents Plane includes an X and Y direction in the plane and is an extension of the Point Feature. A plane implements both the IPlane and the IDirection interface meaning it can be used both for specifying a Direction and a Plane. The Direction of a plane is the direction of its normal vector.

Geometric element:           Plane, Point          
Feature name:                    Plane
Implements Interface:       IPlane, IDirection

In general the names used for Features in GenerativeComponents are derived from the underlying geometric concept. But Features (GC - Features and Interfaces) can be created by users extending the original set of Features and the names can be chosen arbitrarily by the user and therefore it is up to the user to construct appropriate names for these Feature Types that capture the underlying concepts being encapsulated.