Rejig state diagram for equipping tools (#2917)

* switch between line and rectangle tool

* disable line tool if rectangle has started

* make rectangle logic clearer from the diagram
This commit is contained in:
Kurt Hutten
2024-07-05 13:40:16 +10:00
committed by GitHub
parent fbc2e9d02c
commit 4f4167b247
6 changed files with 189 additions and 105 deletions

View File

@ -37,21 +37,22 @@ export const modelingMachineConfig: CommandSetConfig<
description: 'Enter sketch mode.',
icon: 'sketch',
},
'Equip Line tool': {
description: 'Start drawing straight lines.',
icon: 'line',
displayName: 'Line',
},
'Equip tangential arc to': {
description: 'Start drawing an arc tangent to the current segment.',
icon: 'arc',
displayName: 'Tangential Arc',
},
'Equip rectangle tool': {
description: 'Start drawing a rectangle.',
icon: 'rectangle',
displayName: 'Rectangle',
},
// TODO the event is no 'change tool' with data: 'line', 'rectangle' etc
// 'Equip Line tool': {
// description: 'Start drawing straight lines.',
// icon: 'line',
// displayName: 'Line',
// },
// 'Equip tangential arc to': {
// description: 'Start drawing an arc tangent to the current segment.',
// icon: 'arc',
// displayName: 'Tangential Arc',
// },
// 'Equip rectangle tool': {
// description: 'Start drawing a rectangle.',
// icon: 'rectangle',
// displayName: 'Rectangle',
// },
Export: {
description: 'Export the current model.',
icon: 'exportFile',