Distance Units Across Platforms

Navigation:  Appendix > Advanced Topics >

Distance Units Across Platforms

Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

Lengths in Sketchpad can be defined or inspected in a number of different units.

When you create objects freehand using construction tools, their component lengths are often specified by screen pixels.

With the Calculator or when you make a new parameter, you can create create symbolic lengths in pixels, inches, or cm.

When you measure length, distance, or area, the measurements come out in pixels, inches, or cm (as determined in Preferences).

When you measure a coordinate distance, the measurement has no units.

Unfortunately, while the ratio of cm to inches is always constant (2.54 cm to an inch), the ratio of pixels to a cm or inch depends on your local machine, and can change between machines. (Mac and Windows historically use a different number of pixels per inch in their most common configuration: 72 pixels per inch for Mac, and 96 pixels per inch for Windows.) If an element is defined in one unit (for instance, inches) and measured in another (for instance, pixels), the value of this measurement may change when the sketch is opened on a computer with a different pixels-per-inch ratio.

The same issue can affect neighboring geometric elements, if one is defined in terms of cm or inches and another in terms of pixels — their relative lengths may change when the sketch is opened on a machine with a different pixels-per-inch-ratio.

To avoid any changes in either numeric measurements or relative geometric lengths when moving a sketch from platform to platform, make sure all of your work in that sketch is in a consistent unit — inches, cm, or pixels — so your sketch doesn't rely on the pixel-to-inch or pixel-to-cm conversion. Because positions and lengths of objects constructed freehand using tools are generally defined in pixels, the most straightforward way to ensure cross-platform consistency is usually to use pixels for all transformations and for constructions such as Circle by Center+Radius. (A sketch that you want to present to others using cm or inches can be built using pixels, and the Units Preferences can be changed to cm or inches after the sketch is constructed.)

Note

It is possible to use System Preferences to change Sketchpad's ratio of pixels to a cm or inch. A change to this setting affects only the computer on which you make the change. This can be helpful on a Mac to view a sketch that relies Windows-based distance units, or vice versa. But when you create a sketch of your own, it is recommended that avoid making the sketch dependent on either platform's default pixels-per-inch ratio. Accordingly, it is usually best to leave this setting at the platform default.