Sketch and edit in a 2D view (EditMesh)
The following example illustrates how to use the EditMesh module to edit a drawing that has been built using the ClickSketch module on top of a slice from a volume.
Instance EditMesh into the empty NE workspace.
This example is found in Libraries.Examples.Graphics_Display. Upon being instanced, the example renders a slice from hydrogen.fld in the viewer's window.
We are now ready to construct a drawing in the view.
Select Editors->Modules to make the modules user interface panel visible. Select ClickSketch from the Modules option menu. This causes the user interface for the ClickSketch module to appear.
By default, the ClickSketch module is set up to draw a polyline. Other primitives that are available are point, line, box, and polygon.
Choose the type of primitive that you want to generate from the radio box options at the top of the ClickSketch user interface.
Begin building a drawing, using the add point operation.
The mouse operations that control the drawing in the ClickSketch module are:
|
|
Hold down the Control key and press the right button. This completes the primitive that is in progress. This operation applies only to the polyline and polygon primitives. |
The point primitive, each add point operation causes a small rectangle in the build color to be drawn.
The line primitive, for every two add point operations, a line is drawn.
The box primitive, for every two add point operations, a box is drawn.
The polyline primitive, each add point operation adds another point to the polyline. The polyline is terminated with the close operation.
The polygon primitive, each add point operation adds another point to the polygon. The polygon is terminated and automatically closed with the close operation.
Conversion of screen space primitives into an AVS/Express field.
This example has the ClickSketch module configured so that upon completion of a primitive it is immediately converted into an AVS/Express field. When this happens, the color of the primitives you have drawn on the slice changes from the build color to either the map color, if the Use Map Color toggle is set, or the primary color as specified by the Graphics Display Kit object's properties.
This touches on only a small portion of the capabilities in the ClickSketch module.
We are now ready to edit the drawing in the view.
Select EditMesh from the Modules option menu. This causes the user interface for the EditMesh module to appear.
By default, the EditMesh is set up to edit a primitive. Points or cells can also be edited.
Select to edit either a point, primitive or cell from the radio box options at the top of the EditMesh user interface.
Edit the drawing by performing a select/move primitive operation.
The mouse operations that control editing in the EditMesh module are:
|
|
Press Control left button while the mouse is over a point or line in the drawing. | |
Hold down the Control key and drag the primitive while depressing the middle button. |
When the select operation takes place, the point, primitive or cell selected is drawn in the highlight color. The highlight of the point is done with a small rectangle.
When the move primitive operation is in progress, the current position of the updated primitive is echoed in the highlight color. By default, the EditMesh module is configured so when the move primitive operation is completed, the field is updated. This causes the drawing to be rerendered to reflect its new contents.
Points, primitives, and cells may also deleted by clicking on the Delete button after a select operation is done.
Delete the EditMesh application.