Grape can be in several modes.


Rule manager

The rule manager displays a grammar a nested lists of rules. In application mode rules can be applied by selecting them. In edit mode rules can be selected for editing, and additionally new grammars, new rules and new groups can be added.

There are two buttons at the bottom of the manager. The Grammar button can be used to display and load the available grammars (This button will move to the top oft he manager shortly).

The Edit button is displayed only if the user is logged in. It can be used to switch between Application mode and Edit mode.

CAD area

The CAD area works like a fairly limited CAD application. In application mode shapes can be drawn to which rules are to be applied. The result of a rule application will also be shown in the CAD area.

In Edit mode the LHS (left hand side) and RHS (right hand side) of the rule are drawn here.

CAD menu
Snap menu

These three buttons can be used to toggle Grid snap, Object snap and Angle snap respectively.

Coordinate box

Displays the coordinates of the cursor.

Message box

Displays messages returned from the system.

Properties area

This area is used to display miscellaneous properties. If an object is selected in the CAD area, its properties are displayed here. If a rule is being edited, its properties are displayed here.

Rule application

To start rule application either a initial rule should be selected in the rule manager (Most grammars offer such rules), or an initial shape can be drawn manually in the CAD area.

Once a rule is applied Grape switches to Grammar mode and the CAD area cannot be edited anymore. If one or several matches were found for the rule, the rule application floater is displayed.

Rules are displayed as follows. The match is displayed in red, the resulting shape is diplayed in black. Once a rule is commited, the highlighted match is erased.

Rule application floater

The rule application floater displays the number of matches found, and which one of these is currently being shown in the CAD area. The floater can be used to cycle through the available matches. It can also be used to apply a rule to the current match, although this isn’t strictly necessary. If another rule is applied, an uncommitted rule is automatically applied. The floater can also be used to cancel rule application.

Exit grammar mode

Once finished with applying rules, Grammar mode can be exited by clicking the Exit Grammar Mode button.

Rule editor

Unlike normal shape grammar conventions the left-hand-side (LHS) and right-hand-side (RHS) are drawn on-top of each other, but on different layers. The layer can be chosen via the Layer menu.

Grammars, rules and groups can be created via the rule manager. New grammars are created via the Grammar listing.

Rule properties

Register | Log in