How 1-D and 2-D Shapes Differ

When the size or length of a line shape is less important than the connection it represents, create a 1-D shape. Because 1-D shapes are often used to connect other shapes, they are often called connectors. For example, in a flowchart, circuit diagram, or mechanical illustration, 1-D shapes can be used to connect other components. However, not all 1-D shapes are connectors. Some behave as lines, such as callouts or dimension lines, or are simply easier to work with as 1-D shapes, such as the wedge of a pie chart.

Most shapes when you first draw them are 2-D. Their width-height boxes have eight handles for resizing. When you draw a single arc or line, however, the result is a 1-D shape that has handles for begin and end points and for height adjustment. Not only do 1-D and 2-D shapes look different, they behave differently on the drawing page.

Selection handles on 1-D and 2-D shapes

Selection handles on 1-D and 2-D shapes

  1. 1-D shape
  1. Begin point
  1. End point
  1. 2-D shape converted to 1-D
  1. 2-D shape

When a user drags a 2-D shape onto the drawing page, the outline of its alignment box appears rectangular. When a user drags a 1-D shape onto the drawing page, its alignment box appears as a straight line. This can make the 1-D shape easier for users to align, as with a 1-D wall shape in a space plan.

Two of the 1-D shape's handles have a special purpose. The starting vertex of a 1-D shape is its begin point, and the handle that represents the end of the line formed by the shape is the end point.

You can glue the begin or end point of a 1-D shape to a guide, guide point, connection point, shape vertex, or selection handle. If you glue one end, the other end stays anchored on the page, and the 1-D shape stretches as the glued end moves with the shape to which it is glued.

In this section...

Converting 1-D and 2-D Shapes

Examples of 1-D Shapes

Converting 1-D and 2-D Shapes

A shape that looks like a box can behave like a line, because you can convert a 2-D shape to 1-D and vice versa. Converting a shape in this way dramatically changes the sections it displays in the ShapeSheet® window.

A key difference between a 1-D and 2-D shape is that a 1-D shape includes the 1-D Endpoints section in its ShapeSheet window; a 2-D shape does not have this section. Converting a 2-D shape to 1-D adds this section and its default formulas. Converting a 1-D shape to 2-D removes this section, regardless of any protection (including GUARD functions) you might have set.

When you convert a 2-D shape to a 1-D shape, the Alignment section is deleted, and the formulas in the Shape Transform section's Width, Angle, PinX, and PinY cells are replaced with default 1-D formulas. Converting a shape does not remove its connection points, but its connections to other shapes or guides are broken.

To convert a shape between 1-D and 2-D

  1. Select the shape.
  1. On the Format menu, click Behavior.
  1. Under Interaction style, select Line (1-dimensional) to specify a 1-D shape. Select Box (2-dimensional) to specify a 2-D shape.
  1. Click OK.

Note One way to create a 1-D shape is to draw the shape as a 2-D shape, convert it to 1-D, and then adjust the vertices and define custom formulas. You can save time and effort when you initially draw the shape by orienting it horizontally—that is, by dragging left to right or right to left in the direction you want the line to go. Visio places 1-D endpoints on the left and right sides of the shape you draw, so a horizontally drawn shape will be closer to what you want after it is converted to 1-D.

TOP

Examples of 1-D Shapes

1-D shapes can vary greatly in their appearance and functionality. A 1-D shape might look like a line, or might appear to be a 2-D shape. However, as a 1-D shape, you can take advantage of its endpoints. By adding custom formulas, you can make the shape behave intelligently when the user drops it on the page, such as a window snapping into place on a wall in an office layout.

However, not all 1-D shapes require special formulas to be useful. Because a 1-D shape looks like a line as it is being dragged, it can be faster to position in a drawing. Consider using 1-D shapes whenever you want to create masters that your users will align precisely in a drawing. For example, a text callout or annotation shape is easier to position accurately if users can see exactly where the line will point.

The 1-D shapes shown in the following figure have custom formulas that create smart behavior.

Examples of 1-D shapes

Examples of 1-D shapes

  1. Vertical dimension line
  1. S-connector
  1. Arrow
  1. Drip line
  1. Diaphragm valve
  1. Wall
  1. Pie wedge
  1. Bus

The formulas for the S-connector keep the connector right-side up. As its endpoints are moved, the shape resizes in a way that keeps it upright by stretching its horizontal or vertical segments.

The formulas for the diaphragm valve shape give it height-based resizing behavior. As a user moves an endpoint the line stretches, but the middle details remain the same size. If a user increases the shape's height, the middle details resize proportionately, but the line does not change.

The arrow shape shown in the figure could also be a 2-D shape. Whether such a shape should act like a line or a box depends on how it will be used: If you intend the arrow to be used in an up-down, left-right manner only, then making it a 2-D shape can make horizontal and vertical positioning easier. In addition, 2-D shapes must be rotated using the Rotation tool, whereas it is very easy to accidentally change the angle of a 1-D shape by nudging one of its endpoints. However, to allow the arrow shape to connect other shapes through the Visio user interface (rather than programmatically), it must either be a 1-D shape or have an outward connection point. For details about outward connection points, see Understanding Connection Points in Controlling How Shapes Connect later in this chapter. For details about connecting shapes programmatically, see Chapter 19, Automating Connections in a Visio Solution.