KCL: Autocomplete snippets for 'center' should suggest the origin (#7164)

Pattern functions and `polygon` both take a parameter `center` which
defaulted to [3.14, 3.14] for silly reasons. They now default to
[0, 0].
This commit is contained in:
Adam Chalmers
2025-05-21 23:08:34 -05:00
committed by GitHub
parent 9c7aee32bd
commit 0a0e6abd3f
4 changed files with 17 additions and 4 deletions

View File

@ -328,7 +328,7 @@ pub async fn polygon(exec_state: &mut ExecState, args: Args) -> Result<KclValue,
sketch_surface_or_group = { docs = "Plane or surface to sketch on" },
radius = { docs = "The radius of the polygon", include_in_snippet = true },
num_sides = { docs = "The number of sides in the polygon", include_in_snippet = true },
center = { docs = "The center point of the polygon", include_in_snippet = true },
center = { docs = "The center point of the polygon", snippet_value_array = ["0", "0"] },
inscribed = { docs = "Whether the polygon is inscribed (true, the default) or circumscribed (false) about a circle with the specified radius" },
},
tags = ["sketch"]