Pauses for user input of a rectangle.
rhinoscriptsyntax.GetRectangle (mode=0, base_point=None, prompt1=None, prompt2=None, prompt3=None)
rhinoscript.userinterface.GetRectangle (mode=0, base_point=None, prompt1=None, prompt2=None, prompt3=None)
mode |
Optional. Number. The rectangle selection mode. If not specified, all modes (0) are available. The rectangle selection modes are as follows:
|
||||||||||||
base_point |
Optional. List of 3 numbers of a 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. |
Tuple |
A tuple of four 3-D points that define the corners of the rectangle if successful. Points are returned in counter-clockwise order. See the image below for details. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
rect = rs.GetRectangle()
if rect:
for i, corner in enumerate(rect):
rs.AddTextDot( i, corner )