GetBox

Pauses for user input of a box.

Syntax

rhinoscriptsyntax.GetBox (mode=0, base_point=None, prompt1=None, prompt2=None, prompt3=None)

rhinoscript.userinterface.GetBox (mode=0, base_point=None, prompt1=None, prompt2=None, prompt3=None)

Parameters

mode

Optional.  Number.  The box selection mode.  If not specified, all modes (0) are available.  The box selection modes are as follows:

Value

Description

0

All modes.

1

Corner.  The base rectangle is created by picking two corner points.

2

3-Point.  The base rectangle is created by picking three points

3

Vertical.  The base vertical rectangle is created by picking three points.

4

Center.  The base rectangle is created by picking a center point and a corner point.

base_point

Optional.  List of 3 numbers or Point3d.  A 3-D base point.

prompt1

Optional.  String.  The first prompt or message.

prompt2

Optional.  String.  The second prompt or message.

prompt3

Optional.  String.  The third prompt or message.  The third prompt used only with 3Point and Vertical modes.

Returns

List

A list of eight 3-D points that define the corners of the box if successful.  Points are returned in counter-clockwise order starting with the bottom rectangle of the box.  See the image below for details.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

box = rs.GetBox()

if box:

    for i, pt in enumerate(box): rs.AddTextDot( i, pt )

Also See

GetRectangle