Skip to content

Conversation

@max-mrgrsk
Copy link
Contributor

@max-mrgrsk max-mrgrsk commented Dec 2, 2025

Add a new parameter to the codemod to enable surface extrude, alongside the existing solid extrude. This updates ‎addExtrude to accept ‎bodyType and generates ‎extrude(..., bodyType = surface). Test validation is temporarily disabled until KCL stdlib supports ‎bodyType.

part of ZDS support for Extrude Surface

Introduces an optional bodyType argument to the addExtrude codemod, allowing specification of body type in the extrude operation. Updates the function signature and call expression to handle the new parameter.
Introduces a new test case to verify that an extrude call with the bodyType parameter set to 'surface' is correctly added. The runtime check is commented out pending KCL stdlib support for the bodyType parameter.
@vercel
Copy link

vercel bot commented Dec 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
modeling-app Ready Ready Preview Comment Dec 2, 2025 9:35pm

@max-mrgrsk max-mrgrsk marked this pull request as ready for review December 2, 2025 22:13
@max-mrgrsk max-mrgrsk requested a review from a team as a code owner December 2, 2025 22:13
? [createLabeledArg('method', createLocalName(method))]
: []
const bodyTypeExpr = bodyType
? [createLabeledArg('bodyType', createLocalName(bodyType))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create a constant here? Like sweep::SKETCH_PLANE for addSweep?

Will check if it exists in Rust in KCL already

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmmh looks like it doesn't. We should add something like rust/kcl-lib/std/sweep.kcl for extrude @adamchalmers I think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once that's done we should change bodyType?: string to be bodyType?: ExtrudeBodyType and have that explicitiy typed as the allowed values here I think

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry didn't realize that this isn't in KCL yet, my bad!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pierremtb Thank you, I will add it to todo list in the parent issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw @pierremtb do you think we would need the same for method?: string ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah totally! Those should be KCL constants

@max-mrgrsk max-mrgrsk merged commit dbb54fa into main Dec 3, 2025
57 checks passed
@max-mrgrsk max-mrgrsk deleted the max/extrude-surface-codemod branch December 3, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants