-
Notifications
You must be signed in to change notification settings - Fork 85
Allow point-and-click Offset Plane to work from sweep faces #7882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Allow point-and-click Offset Plane to work from sweep faces #7882
Conversation
Edit flows not working yet Will eventually close #7555
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -381,26 +381,23 @@ test.describe('Feature Tree pane', () => { | |||
await cmdBar.expectState({ | |||
commandName: 'Offset plane', | |||
stage: 'arguments', | |||
currentArgKey: 'distance', | |||
currentArgKey: 'offset', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed this to be more in line with KCL
const xz = await toolbar.getFeatureTreeOperation('Front plane', 0) | ||
await xz.click() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And would like to keep these two tests as they aren't px dependent anymore
/** | ||
* Append an offset plane to the AST | ||
*/ | ||
export function addOffsetPlane({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to faces.ts
with the addShell codemod since they will share a few utils
ast: modifiedAst, | ||
call, | ||
pathToEdit: nodeToEdit, | ||
pathIfNewPipe: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No pipe expr for offset planes for now
src/lang/modifyAst/faces.ts
Outdated
const result = buildSolidsAndFacesExprs( | ||
faces, | ||
artifactGraph, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making it a lil nicer for shell as well
src/lib/operations.ts
Outdated
|
||
console.log('Offset plane operation:', operation) | ||
|
||
// TODO: replace with util function when available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function from #7819
…ane-offset-from-a-face-in-point-and-click
…ane-offset-from-a-face-in-point-and-click
// 2. Prepare unlabeled and labeled arguments | ||
let planeExpr: Expr | undefined | ||
const hasFaceToOffset = plane.graphSelections.some( | ||
(sel) => sel.artifact?.type === 'cap' || sel.artifact?.type === 'wall' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if we can or should generalize to other face types as well
@@ -686,12 +686,13 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig< | |||
}, | |||
plane: { | |||
inputType: 'selection', | |||
selectionTypes: ['plane'], | |||
selectionTypes: ['plane', 'cap', 'wall'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as https://github.com/KittyCAD/modeling-app/pull/7882/files#r2226406406
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here there's a bit of a gotcha where you need to pre-select the face, probably due to planes being made available for selection but haven't been able to investigate yet.
CodSpeed Instrumentation Performance ReportMerging #7882 will improve performances by 14.24%Comparing Summary
Benchmarks breakdown
|
…ane-offset-from-a-face-in-point-and-click
…ane-offset-from-a-face-in-point-and-click
…ane-offset-from-a-face-in-point-and-click
Closes #7555 and https://github.com/KittyCAD/modeling-app/milestone/14
Refactors the codemod the same way we did sweeps, transforms, helix, shell as part of https://github.com/KittyCAD/modeling-app/milestone/4, with non-playwright test cases for default planes, offset plane on offset plane, and offset plane on cap.
Two things to resolve before merging:
Demo:
Screen.Recording.2025-07-23.at.2.53.37.PM.mov