Next Previous Contents

## 3. Interactive Actions (Modelling)

Before invoking any modelling action you should select one or more objects using the object hierarchy in the main window or using the pick action!

Every action can be started with a key press (a shortcut) when the keyboard focus is in a view window or by clicking on the associated button in the toolbox window. Using a keyboard shortcut starts that action in the current view only, the other views are not affected. Starting an action from the toolbox window will cause the action to be started in all view windows that are currently open simultaneously.

It is perfectly ok to start and work with many different actions at the same time in different views: you can have e.g. a view, where you move objects, a second where you rotate objects and a third, where you pick objects. The layout, drawing style, and grids may also differ between the different views. Together with the feature, that you may change the selection while actions are active and even pan and zoom views (using the rightmost and middle mouse buttons respectively) while actions are active and without breaking them, this is the key to unsurpassed flexibility in modelling using Ayam.

To break an action, the `<Esc>` key may be used.

The default action for all views, which is also in effect after use of the `<Esc>` key, is `"None"` or `"Pick"` (depending on the preference setting `"Modelling/DefaultAction"`). See section Selecting Objects within a View for more information about picking objects.

Note that the modelling actions are not available in perspective views.

If an action is in effect for a view, the views title will be changed appropriately.

A modelling action is performed by clicking into the view with the leftmost mouse button to mark a point in space or to pick a vertex and then by dragging the mouse.

You may undo/redo the effects of a modelling action using `<Ctrl+z>` and `<Ctrl+y>` (see section The Undo System for more information).

Grids are available to restrict the modelling actions to certain points and help in exact modelling.

Also note that you may use the middle and rightmost mouse button to zoom and move the view while modelling actions are active.

For actions that modify the camera of a view please see section View Window Shortcuts and Actions.

## 3.1 Moving Objects or Selected Points

Using the modelling action `"Move"` (shortcut: `<m>`) you may move selected objects or the selected (tagged) points of the selected objects.

Note that the objects/points will be moved in the XY-plane for Front-views, the ZY-plane for Side-views, and the XZ-plane for Top-views only, no matter how the view is rotated.

## 3.2 Rotating Objects or Selected Points

Using the modelling action `"Rotate"` (shortcut: `<r>`) you may rotate objects or the selected (tagged) points of the selected objects.

The axis of rotation is always parallel to the Z-axis in Front-views, the Y-axis in Top-views, and the X-axis in Side-views of the local object coordinate system. The orientation of the object coordinate system may change in respect to the world coordinate system if a sequence of rotate modelling actions is applied.

Note that if multiple objects are selected, each object is rotated around the center of its own local coordinate system.

## 3.3 Rotating Objects or Selected Points around a Point

Using the modelling action `"Rotate about"` (shortcut: `<a>`) you may rotate objects or the selected (tagged) points of the selected objects around a specified point in space. The action requires a point to be specified using a single click after the action has been started. The point will then be marked by a little red cross. If you want to rotate about a different point, you need to restart the action (press `<a>` again).

After the first click, the action works the same way as the Rotate action, except that it rotates around the specified point. This also works with multiple selected objects. Note that this action does not only change the Rotate_X(_Y,_Z) properties of the selected objects, but also the Translate_X(_Y,_Z) properties.

To avoid degenerated coordinates due to roundoff errors it is highly suggested to use grids with this action.

## 3.4 Scaling Objects or Selected Points

There are several different actions available to scale objects or the selected (tagged) points of the selected objects:

The modelling action `"Scale 3D"` (shortcut: `<S>`, note the big S!) scales all three axes of the selected objects or the selected (tagged) points of the selected objects by the same factor.

The modelling action `"Scale 2D"` (shortcut: `<s>`) scales just two axes of the selected objects or the selected (tagged) points of the selected objects. Those axes are XY in a Front-view, ZY in a Side-view, and XZ in a Top-view.

The modelling actions `"Scale X"` (shortcut: `<x>`), `"Scale Y"` (shortcut: `<y>`), and `"Scale Z"` (shortcut: `<z>`) scale only one axis of the selected objects or the selected (tagged) points of the selected objects.

The modelling action `"Stretch 2D"` (shortcut: `<Alt+s>`) works much like `"Scale 2D"` but the scale factor for each axis may be different. Never start this action by a click near one of the axes to be changed, as this will cause very big scale factors for the other axis. Try it first with a centered box by starting from one of the vertices, then try it once starting on the X-axis.

## 3.5 Selecting Points

The modelling action `"Select Points"` (shortcut: `<t>`; for tag points) may be applied to a NURBS curve, NURBS patch or objects that support single point editing only. Objects usually draw their selectable points using small white rectangular handles. Selected points will be drawn in dark red.

The selected points may be modified subsequently using the modelling actions Move, Rotate, and Scale as discussed above. Selected points always take precedence for those modelling actions.

After the pick (the selection of a point), the picked point will be added to the list of selected points for the selected object. If the selected point is already in that list it will be removed from the list instead. Note that the list of selected points will not be deleted from the object until an explicit deselection is performed using the shortcut `<D>`.

Note however that the list of selected points is not copied, if the object is copied using the clipboard. Undo and redo unfortunately will also destroy the list of selected points!

However, it is perfectly legal to select some points, move them using the move action, then switch to single point editing, edit some other or even one of the selected points, switch back to the selection action, add other points to the selection or delete some points from the selection, switch to rotate, rotate the selected points and so on.

You may also add a bigger number of points to the selection using a click and drag operation. All points that are inside the rectangular region defined by the click and drag will be added to the selection. In fact, this approach is the only way to safely add points to the selection that occlude each other.

## 3.6 Editing Points

To edit the points of an object three actions (`"Edit"`, `"Edit Weights"`, and `"Direct Point Edit"`) are available. All those actions may be applied to objects that support single point editing only. Objects mark themselves editable by drawing the editable points using small white rectangular handles if one of the single point editing actions is activated and the object is selected.

- The modelling action `"Edit"` (shortcut: `<e>`) works much like the move action, but it moves single points instead of objects. In contrast to the move action, you need to pick on the handle of the point you want to move. Furthermore, it is not possible to move points of multiple selected objects, only the first selected object is considered.

  If a NURBS curve has multiple points, this action modifies all points that make up the multiple point.

- The modelling action `"Edit Weights"` (shortcut: `<w>`) changes the w coordinate of a single point by dragging the mouse left or right. The weights may be reset for all points using the shortcut: `<W>`. Furthermore, it is not possible to edit the weights of multiple selected objects, only the first selected object is considered.

  If a NURBS curve has multiple points, this action modifies all points that make up the multiple point.

- The modelling action `"Direct Point Edit"` (shortcut: `<p>`) opens a small window where you may change the coordinates of the selected point directly by entering numbers. Note that the w coordinate setting will be ignored if the picked point does not have weight information (is not homogenous). Using the small menu on top of the coordinate window you may determine whether editing takes place in local object or global world space.

  If a NURBS curve has multiple points, this action modifies all points that make up the multiple point.

  Notice that since Ayam 1.4 the direct point editing dialog may stay open all the time. Furthermore, it is not necessary that the original object stays selected, you may select other objects to e.g. infer new point coordinates from their properties and apply them to the original object. However, certain actions like deleting objects, will also delete the reference to the selected points. In this case you will have to select the object and then a point to edit again. Furthermore notice that the coordinate values displayed in the direct point editing window will not update when the point is modified by another modelling action. Simply click on the point again in a view where the direct point editing action is active, to update the coordinate values in the direct point editing dialog. This modelling action also only affects the points of the first of multiple selected objects.

## 3.7 Snapping Points to the Grid

Since Ayam 1.11 there are two actions available that let you snap points to the current grid of a view. The actions are initiated using the shortcuts `<g>` and `<G>`. If an object has selected (tagged) points, only those points will be snapped to the grid, otherwise all points of the object will be snapped to the grid. If `<g>` is used, the snapping only occurs in the modelling plane associated with the view (i.e. in 2D). To snap all three coordinate values to the grid use `<G>`. Note that the snapping also occurs, if the view has the preference option `"Use Grid"` turned off.

## 3.8 Inserting or Deleting Points

The modelling action `"Insert Point"` (shortcut: `<i>`) may be applied to NURBS, interpolating, and approximating curves (objects of type NCurve, ICurve, and ACurve) only. A new control point will be inserted in the curve right after the picked point. The new point will be inserted in the middle between the selected point and the next point, changing the shape of the curve. (It is also possible to insert control points into certain types of NURBS curves without changing their shape using knot insertion; see also the insert knot tool section The Insert Knot Tool.)

The modelling action `"Delete Point"` (shortcut: `<d>`) may be applied to NURBS, interpolating, and approximating curves (objects of type NCurve, ICurve, and ACurve) only. The selected control point will be deleted from the curve. Deleting points from a curve with knot type `"Custom"` may currently lead to an incorrect knot sequence, please check and correct the new sequence manually.

## 3.9 Miscellaneous Actions

This section documents some special modelling actions.

- The modelling action `"FindU"` (shortcut: `<u>`) may be applied to NURBS curves (objects of type NCurve) only. This action may be used to get the corresponding parametric value u from a point on a curve. Pick a point on the curve (not a control point!). If this is done, the appropriate value for u is calculated, stored in the global variable u, and additionally written to the console. A small cross is drawn at the position of the picked point. Remember to exactly pick a point on the curve or nearby, otherwise the calculation may fail and no value will be written to the console.
- The modelling action `"Split Curve"` (shortcut `<c>`) may be applied to NURBS curves (objects of type NCurve) only. Using this action you may split a NURBS curve into two new curves at a point on the curve that may be specified by picking a point on the curve. Remember to exactly pick a point on the curve or nearby otherwise the calculation of the parametric value for the split will fail. The selected curve will be changed by this action, and a new curve will be created. It is currently not possible to undo the changes of a split!

## 3.10 Editing in Local Space

Normally, all editing takes place in world space and the input plane of all modelling actions is constrained to the world XY-, ZY-, or XZ-plane (depending on the type of view used).

However, if a view is aligned and switched to local, you can also edit in local object space. This means you can e.g. edit a two-dimensional parameter curve of a skin object where both objects (curve and skin) are rotated and scaled arbitrarily and make sure that the curve remains two-dimensional all the time.

All you need to do is to first select the curve and then press `<Ctrl+a>` to align the view and then `<Ctrl+l>` to make it local. In practice, this means that the input plane of an aligned local view will match the XY-, ZY-, or XZ-plane of the local object space, depending on the type of the view (`"Front"`, `"Side"`, or `"Top"`).

Furthermore, grids will also act as if defined in local object space. Note that in contrast to their normal behaviour, grids can also be scaled differently in X-window and Y-window coordinates in aligned local views (if the local object space is deformed this way).

Next Previous Contents