setTagsFromEdgeAttrs operation

Syntax

  • setTagsFromEdgeAttrs()

Description

The setTagsFromEdgeAttrs operation converts string edge attributes stored on the initial shape to edge tags stored on the current shape's geometry. It samples one element from each string attribute array for each face edge of the current geometry and stores them as tags on that edge.

The edge attribute /edgeattr/ attributeName creates tags of the form "edgeattr.attributeName.sampledValue".

Related

Examples

String edge attribute setup

The initial shape has a string array with orientations set as edge attributes. See also Compute Edge Attributes tool.

String array with edge attributes
String edge attributes

Setting edge tags

The string edge attributes are set as tags.

Visualizer --> 
    comp(e) { isTagged("edgeattr.orientations.front") 
                 : GreenEdge
            | isTagged("edgeattr.orientations.side")  
                 : BlueEdge }

Lot --> setTagsFromEdgeAttrs()
        Visualizer
String edge attributes set as tags

If the geometry has been modified, the attribute value is sampled for each face edge. See also Sampling on face edges example.

Lot --> s(10,0,10)
        primitiveDisk(12)
        setTagsFromEdgeAttrs()
        Visualizer
Geometry modified with attribute value for each edge

Setback and edge tags

The edge tags stay on the geometry when applying further operations. In this example, the setback operation also automatically copies "edgeAttr.orientations.front" from the source edges to the new setback edges. This information can be combined with the setback auto-tags.

Lot --> setTagsFromEdgeAttrs()
        setback(8) { isTagged("edgeattr.orientations.front")
                        : Visualizer }
Edge tags stay on geometry

The edge tag "edgeAttr.orientations.front" is also copied to the appropriate edges in the remainder.

Lot --> setTagsFromEdgeAttrs()
        setback(8) { isTagged("edgeattr.orientations.front")
                        : NIL 
                   | remainder : Visualizer }
The edge tag