add_polygon
Create custom closed polygon shapes in a FreeCAD sketch from a list of [x, y] points. Connects points in order and auto-closes the loop, ideal for L, T, hexagon outlines.
Instructions
Add a fully-constrained closed polygon to a sketch from [x, y] points.
This is the only way to express an L, T, hexagon, or other custom
outline. Points are connected in order and the loop closes automatically
(do not repeat the first point at the end).
Args:
doc_name: The name of the document.
sketch_name: The name of the sketch to add geometry to.
points: List of [x, y] points in sketch-local space, at least 3.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| points | Yes | ||
| doc_name | Yes | ||
| sketch_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |