-
Notifications
You must be signed in to change notification settings - Fork 87
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
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 GitHub.
|
@@ -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
…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
amazing work mate!
|
…ane-offset-from-a-face-in-point-and-click
…ane-offset-from-a-face-in-point-and-click
@max-mrgrsk Thank you! I fixed the first bullet, and for the second one I created #8068 to track it |
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.
Works great for me, aside from chamfer faces, which you've already captured an issue for. Great job, the code looks clean and well-thought through. I had a slight urge to suggest more generic approaches to the utility functions in faces.test.ts
but I think it's good to hold off on that until it's actually used.
Big unlock for users, way to go!
// 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.
Here I thought I had you noticing that chamfer faces weren't working! Nice
Closes #7555 and #7883
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:
the rust side could be cleaned up now that we have the plane IDsthe pre-selection gotcha for planes listed in the commentsDemo:
Screen.Recording.2025-07-23.at.2.53.37.PM.mov