# Possible solutions for Selection v3

The selection problem is plagued by edge explosion and increasingly complex and dubious grammar results. New selection strategies are to be considered. Furthermore a layer of abstraction is to be placed between the physical and logical geometry elements:

• Corners or logical vertices – corresponding to selected vertices on the actual geometry that have a special importance
• Logical edges – should be enclosed between two corners and may contain a number of physical edges within – a polyline, or a curve. It should be used as a unit of selection (an integer range).

### Selection Modes v3

Abandoning the physical based selection the new methods keep numeric indexing, but pointing to logical edges instead of the physical ones, as we see later.

#### Selection Propagation

Each rule should be capable of propagation of default input selection  to derived shapes the best way possible, for instance as seen below for the Peel rule.

For partitioning rules such selection will be based on closeness to the boundary:

• Whether or not it is located on the boundary
• Edge set touches the boundary

Optional: specify level within the hierarchy to as closely as possible to match to the current geometry of the shape. For instance one before last Peel rule or first Grid rule (could use negative indices to count from the ‘front’ of history).

Grid rule auto-reindexing is straightforward except for question of what to do with 45 degree edge – it can belong to the lower or higher index or split between both, as seen below – in this case it is crucial that edge assignment is symmetrically consistent.

For Voronoi regions there is a little more ambiguity so one selection method has to be chosen.

#### Custom Shape Selection

In addition of edge set index based selection, rule can perform a custom selection on any part of the input shape boundary.

##### Edge Angle Selection

Select edges which orientation is within a given angle range, e.g. [85, 95] degrees are roughly perpendicular edges.

##### Angle Range Selection

Select edges that lay within or partially within the radial region surrounded by two rays cast from the centre.

##### Direction Grow Selection

A number of directions are given. May result in inconsistent selection for non-convex shapes!

• Cast rays from the shape centre along these directions until an edge is hit.
• Grow selection for each edge. Attach successive neighbours to the existing selection.
• Stop when threshold of subsequent edge is too high
• Question: What to do with unattached regions?
• Keep growing until all edges are attached
• That containing more divergent (from threshold) value continues
• Optimisation problem…
##### Cardinal Directions Selection

Based on W, N, E, S directions. Every polygon with |e| >= 4 should be capable of accepting a cardinal selection.

• Edge Angle selection should with appropriate angles (for instance [-45, 45] for East) will work only for convex shapes.
• Angle Range selection will also work on concave shapes but will not work so well when lengths of the sides (or edge sets) differ a lot (high variance of edge set lengths).
• Direction Grow along the axes.
• Dominant-direction symmetrical selection.
• In the picture above (Reindexing for Grid rule) the dominance (say set by the user or selected to one value by default) is symmetrically consistent for the mirrored regions.

#### Rule History Selection

Such selection has already been discussed for Peel rule. However is it possible to create generic selection that all rules could adhere to?