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

Transform std lib functions #5067

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Transform std lib functions #5067

wants to merge 8 commits into from

Conversation

jessfraz
Copy link
Contributor

@jessfraz jessfraz commented Jan 14, 2025

waiting on local transforms to work

  • more examples of local axis stuff
  • translate needs to be length units so the units dont get messed up
  • fix the bugs where scale and other fn names were used elsewhere and now causing errors

design decisions:

  • see known issues but you cannot currently translate or rotate on a local axis you must put global = true, which is not the default, so this will cause some friction and im unsure if we want to merge like this
  • each function has the prefix transform this helps the autocomplete find all the transform functions at once and helped with naming collisions, I considered using keyword args and just a transform function that did everything but it seemed unintuitive with all the different options for each thing.
  • josh said MEs would be more used to everything being on the local axis by default
  • josh said everything should be relative, meaning if you scale by 25% once then do it again, its scaled twice not once by 25%
  • also if you move by (2, 0, 0) and you started at (4,0,0) you are now at (6,0,0)
  • this reflects the defaults i chose

Copy link

qa-wolf bot commented Jan 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 Jan 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 Jan 16, 2025 11:12pm

@pierremtb pierremtb linked an issue Jan 15, 2025 that may be closed by this pull request
@jessfraz jessfraz marked this pull request as ready for review January 16, 2025 18:40
@jessfraz jessfraz marked this pull request as draft January 16, 2025 18:49
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 84.74576% with 36 lines in your changes missing coverage. Please review.

Project coverage is 86.05%. Comparing base (412e956) to head (67cc70d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/std/args.rs 63.26% 18 Missing ⚠️
src/wasm-lib/kcl/src/std/transform.rs 93.88% 11 Missing ⚠️
src/wasm-lib/kcl/src/execution/kcl_value.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #5067    +/-   ##
========================================
  Coverage   86.04%   86.05%            
========================================
  Files          88       89     +1     
  Lines       31450    31686   +236     
========================================
+ Hits        27062    27268   +206     
- Misses       4388     4418    +30     
Flag Coverage Δ
wasm-lib 86.05% <84.74%> (+<0.01%) ⬆️

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.

Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
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.

Support assemblies in KCL
1 participant