Component split

A typical operation is to decompose an architectural design into geometric components. In the CGA shape grammar, the component split permits breaking down shapes into shapes of lesser dimensions.

The operation below splits a predecessor shape, based on its geometry, into its components and executes a set of operations on each component.

comp(component){selector : operations | selector : operations ...}

The parameter component identifies the type of the component to split; for example, it can be set to f for faces, e for edges, or v for vertices. The selector parameters define the selection of components.

As a basic example, the rule below creates a new shape B for all faces of shape A's geometry:

A --> comp(f) { all : B }

Similarly we use

comp(e) { all : B }

comp(v) { all : B }

to split into edges and vertices respectively.


To access only selected components, we use operation calls such as:

comp(f) { 3 : B }
to create a shape consisting of the original shape's third face. Such calls are not very generic and require the user to be aware of the topology of the predecessor shape's geometry. Therefore, as an alternative, we use selectors:

Building --> comp(f) { side : Facade }

This CGA grammar selects only the vertical side faces of Building geometry and creates the new facade shapes accordingly. To do this, the rule interpreter analyzes the orientation of the geometry components (the direction of the face normal relative the the orientation of the scope).


Building --> extrude(10)

A building footprint is extruded to a 3D mass model. The resulting scope is illustrated in yellow. The x-, y- and z-dimensions of the scope are illustrated in red, green and blue respectively. The pivot axes are shows in the same colors.

Extruded building footprint
Building --> extrude(10)
 comp(f) { front : color("#FFFF00") Main. |
           side  : color("#00FFFF") Side. }

The mass model is split into one Main facade (front) and a number of Side facades (side). Each face is now the geometry of a new shape (Main and Side shapes). The new shapes' scopes and pivots depend on the faces' orientation. The x-axis points along the first edge and the z-axis points along the face normal. The scope's z-dimension is zero.

Mass model split into many facades

Typically, the facades are then sudivided further into floors. Each of the new Main and Side shapes has its pivot and scope positioned and oriented such that the facade rules can be written conveniently.

See the CGA component split operation for more information.

In this topic
  1. Selectors
  2. Example