Kwargs: startProfileAt (#6424)
Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
This commit is contained in:
@ -4693,7 +4693,7 @@ export function isEditingExistingSketch({
|
||||
sketchDetails: SketchDetails | null
|
||||
}): boolean {
|
||||
// should check that the variable declaration is a pipeExpression
|
||||
// and that the pipeExpression contains a "startProfileAt" callExpression
|
||||
// and that the pipeExpression contains a "startProfile" callExpression
|
||||
if (!sketchDetails?.sketchEntryNodePath) return false
|
||||
const variableDeclaration = getNodeFromPath<VariableDeclarator>(
|
||||
kclManager.ast,
|
||||
@ -4709,7 +4709,7 @@ export function isEditingExistingSketch({
|
||||
if (
|
||||
(maybePipeExpression.type === 'CallExpression' ||
|
||||
maybePipeExpression.type === 'CallExpressionKw') &&
|
||||
(maybePipeExpression.callee.name.name === 'startProfileAt' ||
|
||||
(maybePipeExpression.callee.name.name === 'startProfile' ||
|
||||
maybePipeExpression.callee.name.name === 'circle' ||
|
||||
maybePipeExpression.callee.name.name === 'circleThreePoint')
|
||||
)
|
||||
@ -4717,8 +4717,8 @@ export function isEditingExistingSketch({
|
||||
if (maybePipeExpression.type !== 'PipeExpression') return false
|
||||
const hasStartProfileAt = maybePipeExpression.body.some(
|
||||
(item) =>
|
||||
item.type === 'CallExpression' &&
|
||||
item.callee.name.name === 'startProfileAt'
|
||||
item.type === 'CallExpressionKw' &&
|
||||
item.callee.name.name === 'startProfile'
|
||||
)
|
||||
const hasCircle =
|
||||
maybePipeExpression.body.some(
|
||||
|
Reference in New Issue
Block a user