Geometry Tagging: Essential Knowledge

This section explains concepts fundamental to geometry tagging.

Component Tags

Tags are string-based information stored directly on the topological components of a shape's geometry asset. Each face, edge, and vertex may have an arbitrary number of tags. Their purpose is to identify semantically different parts of the geometry, for example when using the comp operation.

A tag is a string that defines its name. Example: "Name"

Tag hierarchy

Tags are hierarchically grouped with the name separator "." (dot). Example: "Name1.Name2", "Name1.Name3".

The dot-separated names within a tag are referred to as subtags.

Tag queries

A tag query is a string that may include wildcards to replace subtags. There are two wildcards:

? (question mark)

Matches exactly 1 subtag. Example: "?.Name"

* (asterix)

Matches 1 or more subtags. Example: "Name1.*.Name2"

Based on the hierarchical grouping, the tag query "Name1" matches not only the exact tag "Name1", but also tags with additional subtags, such as "Name1.Name2", "Name1.Name2.Name3".



Selected geometry creation operations automatically apply predefined tags. These tags identify semantically different parts of the output geometry.

Auto-tags applied by a certain operation remain accessible until the operation is called again, replacing them with new ones.

Operations applying auto-tags on faces

Face components are categorized into three principle types: bottom, side, and top. The bottom components correspond to the original faces, while the new side faces may be further categorized as either inner or outer, depending on whether they emanate from a hole.


Init --> 
    comp(f) { isTagged("extrude.bottom")     : Blue 
            | isTagged("extrude.side.outer") : Yellow
            | isTagged("extrude.side.inner") : Red
            | isTagged("")        : Green }

See extrude operation.

Auto-tag extrude


Init --> 
    envelope(normal,4, 2.5,45, 3,45, 3.5,50, 2,50)
    comp(f) { isTagged("envelope.bottom")     : Blue 
            | isTagged("envelope.side.base")  : Yellow
            | isTagged("envelope.side.slope") : Orange
            | isTagged("envelope.side.inner") : Red
            | isTagged("")        : Green }

See envelope operation.

Auto-tag envelope


Init --> 
    comp(f) { isTagged("taper.bottom") : Blue 
            | isTagged("taper.side")   : Yellow }

See taper operation.

Auto-tag taper


All roof operations apply the same base tag "roof".

RoofAutoTags -->
    comp(f) { isTagged("roof.bottom") : Blue 
            | isTagged("roof.side")   : Yellow
            | isTagged("")    : Green } 

Init --> 
    roofGable(byHeight, 4)

See roofGable operation.

Auto-tag roofGable
Init --> 
    roofHip(byHeight, 4)

See roofHip operation.

Auto-tag roofHip
Init --> 
    roofPyramid(byHeight, 4)

See roofPryamid operation.

Auto-tag roofPyramid
RoofAutoTags -->
    comp(f) { isTagged("roof.bottom")     : Blue 
            | isTagged("roof.side.outer") : Yellow
            | isTagged("roof.side.inner") : Red
            | isTagged("")        : Green } 

Init --> 
    roofRidge(byHeight, 4)

See roofRidge operation.

Auto-tag roofRidge
Init --> 
    roofShed(byHeight, 4)

See roofShed operation.

Auto-tag roofShed

Operations applying auto-tags on edges

The setback operation and its variants — setbackToArea, setbackPerEdge, shapeLUO and splitAndSetbackPerimeter — automatically tag edge components using the same base "setback".


ShapeAutoTags -->
    comp(e) { isTagged("setback.front") : Blue 
            | isTagged("setback.side")  : Yellow
            | isTagged("setback.back")  : Green }

Init --> 
    setback(4) { front : ShapeAutoTags }
Auto-tag shape


RemainderAutoTags -->
    comp(e) { isTagged("setback.side")      : Yellow
            | isTagged("setback.back")      : Green 
            | isTagged("setback.remainder") : Purple }
Init --> 
    setback(4) { front     : NIL
               | remainder : RemainderAutoTags }
Auto-tag remainder

Tag propagation

In general, geometry-modifying operations preserve tags on existing components and propagate tags to newly constructed components when applicable.

Geometry subdivision

Subdivided edge and face components keep their tags. Newly constructed components have no initial tags.

Here the auto-tags applied by the roofGable operation are kept by the split operation.

Init --> 
    roofGable(byHeight, 4)
    split(z) { ~2 : RoofAutoTags }*
Tag propagation - geometry subdivision

Face tag propagation

New faces constructed on top of existing ones get the tags of their source face.

Here the auto-tags applied by the roofGable operation are automatically propagated to the new faces constructed by the extrude operation.

Init --> 
    roofGable(byHeight, 4)
Tag propagation - Face

Edge tag propagation

New faces emanating from existing edges get the tags of their source edge.

Here the edge auto-tags applied by the setback operation are automatically propagated to the extruded side faces.

SetbackAutoTagsOnFaces -->
    comp(f) { isTagged("setback.side")      : Yellow
            | isTagged("setback.back")      : Green 
            | isTagged("setback.remainder") : Purple
            | all                           : White }
Init --> 
    setback(4) { front     : NIL
               | remainder : Extrude }
Extrude --> extrude(4)
Edge tag propagation - setback

Example envelope operation.

Init --> 
    setback(4) { front     : NIL
               | remainder : Envelope }
Envelope --> 
    envelope(normal, 4, 2.5, 45, 3, 45, 2, 50, 2, 50)
Edge tag propagation - envelope

Example offset operation.

Init --> 
    setback(4) { front     : NIL
               | remainder : Offset }
Offset --> offset(-2)
Edge tag propagation - offset

Also see the setTagsFromEdgeAttrs operation for more examples.

Geometry cleanup

The cleanupGeometry operation maintains existing tags, preventing the removal of tagged edges and edges between faces with different tags.

The cleanupGeometry operation only merges faces with the same tags.

Init --> 
    setback(4) { front     : NIL
               | remainder : OffsetCleanup }
OffsetCleanup --> offset(-2)
                  cleanupGeometry(all, 0)
Geometry cleanup - merge faces with same tag

Operations that clear all tags

By design

These operations replace the current shape's geometry asset, thus existing component tags are cleared.


These operations do (currently) not support working with component tags and clear all tags.