Skip to content
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

KCL: Chamfer and fillet now use keyword arguments #5389

Merged
merged 19 commits into from
Feb 21, 2025

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Feb 14, 2025

Previously:
|> fillet({ radius = 5, tags = [seg01] }, %)
Now:
|> fillet(radius = 5, tags = [seg01])

Copy link

qa-wolf bot commented Feb 14, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Feb 14, 2025

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

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Feb 21, 2025 8:23pm

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

@adamchalmers adamchalmers force-pushed the achalmers/kw-args-chamfer branch from a860394 to e23a166 Compare February 14, 2025 20:56
Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

@adamchalmers adamchalmers force-pushed the achalmers/kw-args-chamfer branch from e23a166 to 53805fe Compare February 14, 2025 20:56
Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

@adamchalmers adamchalmers force-pushed the achalmers/kw-args-chamfer branch from 64b5324 to adf6ef4 Compare February 14, 2025 22:42
Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

@adamchalmers adamchalmers force-pushed the achalmers/kw-args-chamfer branch from 60874d4 to cf601c2 Compare February 20, 2025 02:21
Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link
Collaborator

@Irev-Dev Irev-Dev left a comment

Choose a reason for hiding this comment

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

👏

I had a quick look over the JS stuff, looks good to me.

I would definitely like @max-mrgrsk to have a chance to take a look too though.

But I think he wrote a lot of tests, so I doubt bugs have been introduced with tests passing.

@@ -85,7 +85,7 @@
"fmt": "prettier --write ./src *.ts *.json *.js ./e2e ./packages",
"fmt-check": "prettier --check ./src *.ts *.json *.js ./e2e ./packages",
"fetch:wasm": "./get-latest-wasm-bundle.sh",
"fetch:samples": "echo \"Fetching latest KCL samples...\" && curl -o public/kcl-samples-manifest-fallback.json https://raw.githubusercontent.com/KittyCAD/kcl-samples/next/manifest.json",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not super familiar with this, will need to be changed back to next after this breaking change goes live?

Copy link
Collaborator

@max-mrgrsk max-mrgrsk left a comment

Choose a reason for hiding this comment

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

checked branch locally, point and filleted/chamfered in 3D: all works as expected. Thank you!

@@ -415,13 +399,13 @@ profile001 = startProfileAt([205.96, 254.59], sketch002)
cameraPos: { x: 16020, y: -2000, z: 10500 },
cameraTarget: { x: -150, y: -4500, z: -80 },
beforeChamferSnippet: `angledLine([segAng(rectangleSegmentA001)-90,217.26],%,$seg01)
chamfer({length=30,tags=[
chamfer(extrude001,length=30,tags=[
Copy link
Collaborator

Choose a reason for hiding this comment

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

it has been probably answered elsewhere.. We use x=y logic for almost all arguments. Why the reference argument does not follow the same logic? I mean ref=extrude001 instead of just extrude001 ? + It is a little bit confusing that reference has to be the first argument, while the rest can be mixed up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The first argument is kinda like a "self" param in Python or other OOP languages. It allows you to make one unlabeled arg which can be omitted if it's % (that way in big |> pipelines you don't need to always use % for the most common cases).

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

It was fixed by Kevin in #5446
Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.14%. Comparing base (96b93f8) to head (69a43f2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5389      +/-   ##
==========================================
+ Coverage   86.07%   86.14%   +0.07%     
==========================================
  Files          95       95              
  Lines       35523    35716     +193     
==========================================
+ Hits        30576    30768     +192     
- Misses       4947     4948       +1     
Flag Coverage Δ
wasm-lib 86.14% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

src/lib/exampleKcl.ts has been updated in this PR, please review and update the src/routes/onboarding, if needed.

@adamchalmers adamchalmers merged commit a094995 into main Feb 21, 2025
36 checks passed
@adamchalmers adamchalmers deleted the achalmers/kw-args-chamfer branch February 21, 2025 20:41
exp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you delete this file? Also, got.

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.

5 participants