Skip to content

Update the twist codemod to use the new position tools - #9331

Merged
pierremtb merged 3 commits into
mainfrom
max/extrude-twist-point2d
Dec 12, 2025
Merged

Update the twist codemod to use the new position tools#9331
pierremtb merged 3 commits into
mainfrom
max/extrude-twist-point2d

Conversation

@max-mrgrsk

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

Copy link
Copy Markdown
Contributor

Polish along: ZDS support for Extrude Surface
Follow up of #9301

  • Updated the parsing logic in operations.ts to use the extractKclArgument() helper
  • Modified sweeps.ts to use createPoint2dExpression() for robust Point2D handling, matching the pattern used by other vector2d parameters like gdt framePosition.
  • Added unit tests to verify the twist functionality

Replaces manual extraction and error handling of the twistCenter argument with a call to extractKclArgument for improved readability and maintainability.
Replaces valueOrVariable with createPoint2dExpression when constructing the twistCenter argument in addExtrude. This ensures twistCenter is always represented as a 2D point expression, improving type safety and correctness.
Introduces a new test case to verify that the addExtrude function correctly handles extrude calls with all twist-related parameters (twistAngle, twistAngleStep, twistCenter). Ensures the generated code includes these parameters as expected.
@vercel

vercel Bot commented Dec 12, 2025

Copy link
Copy Markdown

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 12, 2025 2:48pm

@max-mrgrsk max-mrgrsk mentioned this pull request Dec 12, 2025
12 tasks
@max-mrgrsk max-mrgrsk changed the title Add vector2d input type for extrude twistCenter parameter Update the twist codemod to use the new position tools Dec 12, 2025
@max-mrgrsk
max-mrgrsk requested a review from pierremtb December 12, 2025 15:17
@max-mrgrsk
max-mrgrsk marked this pull request as ready for review December 12, 2025 15:17
@max-mrgrsk
max-mrgrsk requested a review from a team as a code owner December 12, 2025 15:17

@pierremtb pierremtb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! Thank you for making the changes. Will test on Vercel and approve

@pierremtb

Copy link
Copy Markdown
Contributor

Nice, working well here!
image

@pierremtb
pierremtb merged commit c1c1e5a into main Dec 12, 2025
57 checks passed
@pierremtb
pierremtb deleted the max/extrude-twist-point2d branch December 12, 2025 15:26
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.

2 participants