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".

Related

Auto-Tags

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.

Extrude

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

See extrude operation.

Auto-tag extrude

Envelope

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("envelope.top")        : Green }

See envelope operation.

Auto-tag envelope

Taper

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

See taper operation.

Auto-tag taper

Roofs

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

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

Init --> 
    roofGable(byHeight, 4)
    RoofAutoTags

See roofGable operation.

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

See roofHip operation.

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

See roofPryamid operation.

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

Init --> 
    roofRidge(byHeight, 4)
    RoofAutoTags

See roofRidge operation.

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

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".

Shape

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

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

Remainder

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)
    extrude(1)
    RoofAutoTags
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)
            SetbackAutoTagsOnFaces
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)
    SetbackAutoTagsOnFaces
Edge tag propagation - envelope

Example offset operation.

Init --> 
    setback(4) { front     : NIL
               | remainder : Offset }
Offset --> offset(-2)
           SetbackAutoTagsOnFaces
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)
                  SetbackAutoTagsOnFaces
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.

Unsupported

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