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

@ -1018,7 +1018,7 @@ mod tests {
let snippet = pattern_fn.to_autocomplete_snippet().unwrap();
assert_eq!(
snippet,
r#"patternCircular3d(${0:%}, instances = ${1:10}, axis = [${2:3.14}, ${3:3.14}, ${4:3.14}], center = [${5:3.14}, ${6:3.14}, ${7:3.14}])"#
r#"patternCircular3d(${0:%}, instances = ${1:10}, axis = [${2:3.14}, ${3:3.14}, ${4:3.14}], center = [${5:0}, ${6:0}, ${7:0}])"#
);
}