User Tools

Site Tools


Diagramming

In this section, the concept of producing diagrams in EASAPs will be discussed in detail. Each TABBED PANE of an EASAP can contain a Diagram Region. A DIAGRAM in the EASAP Builder specifies the content to be displayed in the Diagram Region.

Basic Components

Diagrams can consist of lines, shapes, colors, text and even imported images. These various components are created using DIAGRAM's Child objects on the EASAP Tree.

These objects will make use of FILL STYLE and LINE STYLE to determine various display properties such as line thickness, fill color, line color, surface color, etc.

The diagram example below shows line drawings for the side and end view of a cyclone separator. In addition, a dimension line is present to highlight the currently selected dimension input.

Use in TABBED PANE's

A DIAGRAM is displayed in the Diagram Region of a TABBED PANE. Multiple DIAGRAM's (or none at all) are allowed, and the same DIAGRAM can be displayed on multiple TABBED PANE's.

Dynamic Diagrams

The main purpose of an EASAP DIAGRAM is to provide useful feedback to users. A DIAGRAM may be coupled to user inputs through use of expressions. When implemented, a DIAGRAM will dynamically change its display in response to user inputs.

DIAGRAM Child Objects

ObjectDescription
ARROWCreates an arrow with dynamic coordinates.
CURVECreates a curve through a series of plot points.
DATA PROCESSINGA Parent under which all the available data processing tools reside.
DIMENSIONProduces a special set of lines for illustrating a dimension.
IMAGEDisplays image files in the Input Region of a TABBED PANE.
LINECreates a series of connected line segments.
OVALCreates an ellipse or circle.
POLYGONProduces a polygon on a diagram.
RECTANGLEDefines a rectangle.
SECTORCreates a sector, i.e. ‘pie slices’, of a circle.
TEXTAnnotates a diagram with text.

STYLE's

DIAGRAM's make use of settings in STYLE's for properties such as line thickness, line color, fill color, orientation, etc. All new EASAPs contain several pre-defined STYLE's to immediately create a DIAGRAM. If the existing STYLE's don't meet the Author's requirements, more STYLE's can be added to the Tree under:

  • USER INTERFACE→DIAGRAM LIST→STYLE LIST

Tip: Make use of the Copy and Paste functions to quickly create new STYLE's from those predefined under STYLE LIST.


ObjectDescription
FILL STYLEDefines a coloring scheme for filling of enclosed objects.
LINE STYLEDefines a particular style of line for use in a DIAGRAM.
TRANSFORMPerforms a repeated or complicated transformation of a DIAGRAM’s orientation.

2D GRAPH

Another type of DIAGRAM that can be created for use in an EASAP is a 2D GRAPH. There are two types of 2D graph:

  • Line graph (LINE DATA)
  • Contour plot (CONTOUR DATA)
ObjectDescription
2D GRAPHCreates plots from data stored within LIST's.
CONTOUR DATASpecifies contour data to be plotted on the 2D GRAPH.
LEGENDActivates a legend on a graph.
LINE DATASpecifies line data to be plotted on the 2D GRAPH.
TITLEUsed to specify the main and sub titles of the 2D Graph object.
X AXISUsed to specify the properties of the horizontal axis of a 2D Graph object.
Y AXISUsed to specify the properties of the vertical axis of a 2D Graph object.

Storing Coordinate Values

Expressions are often required in setting the parameters of a DIAGRAM. For the various Origin:, Size: and Points: parameters, these expressions can get quite long and complex. Two straightforward remedies will shorten or even eliminate these expressions:

  1. Store commonly used coordinate values in a COMPUTE.
  2. Store many, if not all, the point coordinate values used in a DIAGRAM's Points: parameter in an INTERLEAVE.

Usage of Stored Coordinate Values

For the first method, create a COMPUTE within a DATA PROCESSING somewhere on the USER INTERFACE branch containing an expression defining the commonly used coordinate. Reference this COMPUTES’s name in expressions found in the Origin:, Size: and Points: parameters within DIAGRAM's.


Note: The stored value in the COMPUTE does not have to represent a complete expression of a coordinate found in a DIAGRAM's parameter, but instead might represent a partial result shared in common within other expressions.


For the second method, create multiple separate LIST's. One for the X coordinates, another for the Y coordinates, and possibly a third for the Z coordinates. These LIST's might be created by reading them from a file using EXTRACT, REPEAT and FIND. Next combine the three LIST's into a single INTERLEAVE. Finally, enter this INTERLEAVE in the Points: parameter of one or more DIAGRAM's.

Diagram Display Control

Now that all the DIAGRAM Child objects have been introduced, there are a number of useful details to assist one in creating DIAGRAM's.

Rendering Order

DIAGRAM Child objects are rendered in the order they appear on the EASAP Tree. In other words, DIAGRAM Child objects at the top of the Tree get rendered before objects located near the bottom. This point is important since opaque objects (Transparency: equal to 1.0 in FILL STYLE) may ‘cover over’ objects preceding them on the EASAP Tree. Thus, top-to-bottom positioning the Tree equates to background-to-foreground rendering in the EASAP.


Tip: Shapes such as Rectangles, Ovals or Polygons can be used to highlight other objects by using a semi-transparent Fill Style and placing the highlight object ‘over top’ the other objects. Again, the highlight object must be located lower on the tree than those objects being highlighted.


Conditional Display

A powerful way to provide context sensitive feedback to users of an EASAP is to use conditional display of diagram objects using the Show if: parameter. The Show if: parameter must be set using a logical expression. If the expression evaluates to a value of ‘True’ then the object is displayed. Conversely, if the expression evaluates to ‘False’, then the object is NOT displayed.

CHOICE LIST Selection

A common usage of the Show if: parameter is to determine display based on a selection from a CHOICE LIST. For example, you can set up different highlight shapes only to appear if a certain selection is made by the user. Let's assume a rectangular highlight over one of the three possible tube patterns. In this example, the logical expression used for the Show if: parameter could be:

tube==”Rotated Square”

where tube is the name for a CHOICE LIST.

Auto-Fit Issues

The Diagram Region of a TABBED PANE has its layout defined by an ‘Auto-Fit’ algorithm. This algorithm centers the visible DIAGRAM Child objects and scales them to fit within the rectangular area of the Diagram Region.

Dynamic Objects

A DIAGRAM object is dynamic if its size or location is linked to a User input. Once an object is dynamic, the ‘Auto-fit’ feature is applied upon each new input value. However any DIAGRAM objects that have constant size or location will be moved and scaled. As a consequence most DIAGRAM objects will need to be dynamic if any single one is.

Therefore, to make a DIAGRAM completely dynamic, the parameter values will need to use expressions involving data entry object names. Otherwise, if a mix of relative and absolute sizes or locations, may create undesired effects, such as objects with absolute settings ‘flying around’ the screen as other dynamic objects with relative settings are modified in response to inputs from a User.

Background Rectangle

Since the Auto-Fit algorithm fits and scales only visible objects, diagrams will tend to ‘jump around’ on the screen when objects such as dimension lines have a conditional display based on the current mouse focus. In this case, to stabilize the display of the diagram, use a RECTANGLE as a background in which all other DIAGRAM Child objects will always fit. To create a background, do the following:

  1. Add the RECTANGLE, as the first object on the Tree below the DIAGRAM. Note: It should always stay the first object.
  2. Set the Origin: and Size: parameters, most likely with expressions, to values that give it the greatest extents on the diagram and all other diagram objects fit within its bounds.
  3. Set its Fill Style: parameter to the same color as the background color of the TABBED PANE, ‘white’ by default.

Miscellaneous Tips

In this section, are a couple of miscellaneous tips to help with making a diagram in an EASAP.

  • Make use of the existing EASAP examples for ideas on use of DIAGRAM's under:
    • EASA→Author→Applications→All EASAPs
  • One may export objects from these EASAPs and import them into your EASAP.
  • Start out with simple DIAGRAM's and only increase in complexity based on feedback from users. For the most part DIAGRAM's are just for show, so if a simple DIAGRAM works for the User, there is no need to spend additional time on it.