- float minimumDistance(target, label)
- intra—Checks against labeled shapes in the same shape tree (i.e. from the same initial shape).
- inter—Checks against labeled shapes in other shape trees (i.e. generated by other initial shapes in the neighborhood).
- all—Checks both intra and inter.
The minimum distance of the current scope to all scopes of shapes that match the given label. If no shape is found matching the specified label, infinity is returned.
The minimumDistance function is a context query that returns the distance of the current scope to the scopes of other shapes.
Learn more about important characteristics for context queries in conditions and inter context.
This example applies the Lot rule to a single shape (intra context). The shape is split in x- and z-direction into small lots. At the center of the initial shape a shape with label "label" is created. Each lot in the grid is extruded with respect to the minimum distance to the labeled center shape.
This example applies the Lot rule to a single shape (intra context). Scattered cylinders are labeled with "label" and colored red in 1% of all cases. In all other cases cylinders are placed if they are more than a distance of 1 away from a red cylinder