Add edit flow for Helix (#5394)

* WIP: Add edit flow for Helix
Fixes #5392

* Clean upp

* Add e2e test step
This commit is contained in:
Pierre Jacquier
2025-02-24 18:44:13 -05:00
committed by GitHub
parent 484da28374
commit d3e0625e8a
5 changed files with 212 additions and 10 deletions

View File

@ -83,6 +83,9 @@ export type ModelingCommandSchema = {
distance: KclCommandValue
}
Helix: {
// Enables editing workflow
nodeToEdit?: PathToNode
// KCL stdlib arguments
revolutions: KclCommandValue
angleStart: KclCommandValue
counterClockWise: boolean
@ -472,6 +475,13 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
status: 'development',
needsReview: true,
args: {
nodeToEdit: {
description:
'Path to the node in the AST to edit. Never shown to the user.',
skip: true,
inputType: 'text',
required: false,
},
revolutions: {
inputType: 'kcl',
defaultValue: '1',
@ -487,9 +497,10 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
counterClockWise: {
inputType: 'options',
required: true,
defaultValue: false,
options: [
{ name: 'True', isCurrent: false, value: true },
{ name: 'False', isCurrent: true, value: false },
{ name: 'False', value: false },
{ name: 'True', value: true },
],
},
radius: {
@ -500,10 +511,11 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
axis: {
inputType: 'options',
required: true,
defaultValue: 'X',
options: [
{ name: 'X Axis', isCurrent: true, value: 'X' },
{ name: 'Y Axis', isCurrent: false, value: 'Y' },
{ name: 'Z Axis', isCurrent: false, value: 'Z' },
{ name: 'X Axis', value: 'X' },
{ name: 'Y Axis', value: 'Y' },
{ name: 'Z Axis', value: 'Z' },
],
},
length: {