Skip to content

docs: Change KCL docs examples to use startProfile() with explicit argument #7885

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

jtran
Copy link
Contributor

@jtran jtran commented Jul 22, 2025

Instead of:

thing = startSketchOn(XY)
  |> startProfile(at = [0, 0])

change to:

thingSketch = startSketchOn(XY)
thing = startProfile(thingSketch, at = [0, 0])

This is more like how the app generates code, and it will hopefully give more examples to Text-to-CAD that the first parameter is required. Text-to-CAD seems to get this wrong a lot.

This doesn't update everything. We can follow-up with more if needed.

@jtran jtran requested review from a team as code owners July 22, 2025 23:17
Copy link

vercel bot commented Jul 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 6:24pm

@jtran jtran force-pushed the jtran/docs-start-profile-no-pipe branch from 504c1db to b0cb94d Compare July 22, 2025 23:52
Copy link
Contributor

@jacebrowning jacebrowning left a comment

Choose a reason for hiding this comment

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

I'm not sure why some of the output images changed, but this is worth trying!

@jtran
Copy link
Contributor Author

jtran commented Jul 23, 2025

Output images changed because the lines that extruded were commented with regular comments // instead of doc comments ///.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why these changed? I thought the rectangles were already extruded on main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I already commented on this. #7885 (comment)

/// |> rectangle(center = [0, 0], width = 10, height = 5)
// |> extrude(length = 2)
/// rectSolid = rectangle(exampleSketch, center = [0, 0], width = 10, height = 5)
/// |> extrude(length = 2)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adamchalmers, see the missing slash that I fixed here?

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.

4 participants