Skip to documentation
DocumentationAll documentsEnglish

ISIZE(nged)

NAME

isize - return the inverse of the current view size

On this page

SYNOPSIS

isize

DESCRIPTION

The isize command returns the reciprocal of the current view size in the current working units. This is a read-only getter — no arguments are accepted.

The inverse view size is related to the current zoom level. It equals 1 / view_size, where view_size is the value returned by the size command. A larger isize value corresponds to a more zoomed-in view (smaller view size); a smaller isize value corresponds to a more zoomed-out view.

This value is primarily useful in scripts that compute view-space to model-space scaling factors.

EXAMPLES

Example 1. Get the inverse view size

mged> isize

Returns the reciprocal of the current view size in working units, for example: 0.001 when the view size is 1000 mm.

Example 2. Use isize in a calculation

mged> set inv [isize] mged> set sz [size] mged> expr {$inv * $sz}

Retrieves both isize and size and verifies their product equals 1.0.

SEE ALSO

size(nged), zoom(nged)

AUTHOR

BRL-CAD Team

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org