GetPolygon Object Command

GETPOLYGON Object Queries

Gets coordinates and information for a polygon.

getpolygon [POSITION stem] [SHAPE stem] [ROTATION stem] [ABOUT stem] [CONSTRAIN string] [PRINT string] [DOCUMENT name | WINDOW name | OBJECTID number]

POSITION/a Gets the coordinates.

SHAPE/a Gets the polygon shape, sides and angles.

ROTATION/a Gets the rotation.

ABOUT/a Gets the rotation point.

CONSTRAIN/s Gets the proportional scale flag state.

PRINT/s Gets the print flag state.

DOCUMENT/s The document name. Default=current.

WINDOW/s The window name. Default=current.

OBJECTID/i The object number. Default=current.

Results:

The object ID is returned to RESULT.

POSITION stem

centerx/d The horizontal center coordinate.

centery/d The vertical center coordinate.

radiusx/d The horizontal radius.

radiusy/d The vertical radius.

SHAPE stem

type/k The shape: NORMAL | STAR | PUFFY | SCALLOP | WAVY.

sides/i The number of sides.

offsetangle/d The pre-rotation angle.

deflection/d The alternate point radius.

deflectionangle/d The alternate point angle.

ROTATION stem

mode/k The rotation point: POINT | CENTER.

slant/d The slant angle.

twist/d The twist angle.

ABOUT stem

x/d The point's horizontal coordinate.

y/d The point's vertical coordinate.

CONSTRAIN string/k The constrain flag: ON | OFF.

PRINT string/k The print flag: ON | OFF.

Examples:

getpolygon position coord
say 'Horizontal Center: '||coord.centerx
say 'Vertical Center: '||coord.centery

 

GetPolygon  Command Definition  url:PGScmd/getpolygon
  created:2006-03-30 22:20:08   last updated:2006-03-30 22:20:08
  Copyright © 1985-2024 GrasshopperLLC. All Rights Reserved.

User Contributed Comments For GetPolygon
Dan Kilroy wrote...2006-05-03 20:25:44

Script command submitted from PageStream internal documentation. Needs to be checked and merged with the command documentation above.

Gets the {...} .

objectid = GetPolygon ([POSITION &coord/.CENTERX.CENTERY.RADIUSX.RADIUSY] [SHAPE &stem/.TYPE<NORMAL|STAR|PUFFY|SCALLOP|WAVY>.SIDES.OFFSETANGLE.DEFLECTION.ANGLEDEFLECTION] [ROTATION &rotation/.SLANT.TWIST] [ABOUT &mode/.MODE<POINT|CENTER>.X.Y] [CONSTRAIN &flag<ON|OFF>] [PRINT &flag<ON|OFF>] [DOCUMENT document | WINDOW document-window | OBJECTID objectid])


Parameters:


Results:


Notes:


See Also:


Examples:
Python:


ARexx:

Applescript:

User Contributed Comments For GetPolygon