Boolean create UI (#5906)

* first steps, add to cmd bar etc

* cmdbar working well enough

* mvp

* lint

* fix after rebase

* intersect and union mvps

* add test

* some clean up

* further fix up

* Update src/lang/modifyAst/boolean.ts

Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>

* Update src/lang/modifyAst/boolean.ts

Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>

* pierre's comments

* tsc

* add comment

---------

Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
This commit is contained in:
Kurt Hutten
2025-03-28 14:56:48 +11:00
committed by GitHub
parent 7ca3afff9f
commit d1f811f91d
11 changed files with 793 additions and 16 deletions

View File

@ -209,9 +209,13 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
[
{
id: 'boolean-union',
onClick: () => console.error('Boolean union not yet implemented'),
onClick: () =>
commandBarActor.send({
type: 'Find and select command',
data: { name: 'Boolean Union', groupId: 'modeling' },
}),
icon: 'booleanUnion',
status: 'unavailable',
status: DEV || IS_NIGHTLY_OR_DEBUG ? 'available' : 'unavailable',
title: 'Union',
hotkey: 'Shift + B U',
description: 'Combine two or more solids into a single solid.',
@ -224,9 +228,13 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
},
{
id: 'boolean-subtract',
onClick: () => console.error('Boolean subtract not yet implemented'),
onClick: () =>
commandBarActor.send({
type: 'Find and select command',
data: { name: 'Boolean Subtract', groupId: 'modeling' },
}),
icon: 'booleanSubtract',
status: 'unavailable',
status: DEV || IS_NIGHTLY_OR_DEBUG ? 'available' : 'unavailable',
title: 'Subtract',
hotkey: 'Shift + B S',
description: 'Subtract one solid from another.',
@ -239,9 +247,13 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
},
{
id: 'boolean-intersect',
onClick: () => console.error('Boolean intersect not yet implemented'),
onClick: () =>
commandBarActor.send({
type: 'Find and select command',
data: { name: 'Boolean Intersect', groupId: 'modeling' },
}),
icon: 'booleanIntersect',
status: 'unavailable',
status: DEV || IS_NIGHTLY_OR_DEBUG ? 'available' : 'unavailable',
title: 'Intersect',
hotkey: 'Shift + B I',
description: 'Create a solid from the intersection of two solids.',