- float contextCount(target, label)
- intra—Checks against labeled shapes in the same shape tree (i.e. from the same inital shape).
- inter—Checks against labled shapes in other shape trees (i.e. generated by other initial shapes in the neighborhood).
- all—Checks both intra and inter.
- label—stringThe context query is performed only on shapes that match the requested label. Must not be empty. If the label is empty, 0 is returned.
The number of shapes with the given label. If no shape is found matching the specified label, 0 is returned.
The contextCount function is a context query that returns the number of shapes with the specified label in the environment.
In this example the Lot rule is applied to a single initial shape (intra context). Depending on the size of the shape a different number of tiles is generated by the split operations. The contextCount query is used to color the tiles according to the total number of shapes with label "Tile".