Skip to content
BadBit Documentation
Sign in Download the beta

BadBit CAD · Commands

POLYGON

Polygon

English name
POLYGON
Aliases
POL
Through automation
Verified sequence The sequence of answers was checked in the program: through automation, it runs with the answers of the example.

Equivalent operation

To do the same with parameters instead of answers, use the cad.draw.polygon operation.

Prompts

  1. Enter number of sides <4>:
  2. Specify center of polygon or [Edge]:
  3. Enter an option [Inscribed in circle/Circumscribed about circle] <I>:
  4. Specify radius of circle:

Options

LetterOption
EEdge
IInscribed in circle
CCircumscribed about circle

The letter is the AutoCAD one and works in any language.

Example through automation

The answers of the example, in order, through the suite.command.run operation (an empty answer is Enter):

  1. 6
  2. 0,0
  3. I
  4. 10

MCP

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "POLYGON",
      "inputs": [
        "6",
        "0,0",
        "I",
        "10"
      ]
    },
    "name": "badbit_run_command"
  }
}

Python

Python
import badbit

result = badbit.suite.command.run(command="POLYGON", inputs=["6", "0,0", "I", "10"])

LISP

LISP
(badbit-call "suite.command.run" '(("command" . "POLYGON") ("inputs" . ("6" "0,0" "I" "10"))))

JSON-RPC

JSON
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "badbit/call",
  "params": {
    "arguments": {
      "command": "POLYGON",
      "inputs": [
        "6",
        "0,0",
        "I",
        "10"
      ]
    },
    "operation": "suite.command.run"
  }
}

In the user guide

Search the documentation