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

Add units to geometry structs #5075

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Add units to geometry structs #5075

merged 2 commits into from
Jan 21, 2025

Conversation

nrc
Copy link
Contributor

@nrc nrc commented Jan 15, 2025

The first commit is a refactoring which I didn't end up needing, but I think is worth keeping and was a fair amount of work. The second commit actually adds units to geometry (part of the units of measure work).

Copy link

qa-wolf bot commented Jan 15, 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 15, 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 21, 2025 8:25pm

@nrc nrc marked this pull request as draft January 15, 2025 23:34
@nrc
Copy link
Contributor Author

nrc commented Jan 15, 2025

Needs rebasing on top of #5064 before landing

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 75.90361% with 20 lines in your changes missing coverage. Please review.

Project coverage is 86.15%. Comparing base (9a537da) to head (7442a52).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/wasm-lib/kcl/src/execution/kcl_value.rs 23.80% 16 Missing ⚠️
src/wasm-lib/kcl/src/std/args.rs 69.23% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5075      +/-   ##
==========================================
+ Coverage   86.09%   86.15%   +0.06%     
==========================================
  Files          89       89              
  Lines       32389    32450      +61     
==========================================
+ Hits        27884    27958      +74     
+ Misses       4505     4492      -13     
Flag Coverage Δ
wasm-lib 86.15% <75.90%> (+0.06%) ⬆️

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.

@@ -854,6 +862,7 @@ impl Plane {
y_axis: *y_axis,
z_axis: *z_axis,
value: PlaneType::Custom,
units: exec_state.length_unit(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, you can't specify the units on the coordinates themselves, huh? Is the next step in the units plan to allow this? Unclear to me how this will all work together, but I trust you that you'll figure it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, one of the next steps is to add units to floats and coords etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a really huge, messy PR so I'm picking off any bits that are relatively self-contained like this

Signed-off-by: Nick Cameron <[email protected]>
@nrc nrc enabled auto-merge (squash) January 21, 2025 20:13
@nrc nrc merged commit 2692f2b into main Jan 21, 2025
31 checks passed
@nrc nrc deleted the nrc-uom-geom branch January 21, 2025 20:42
TomPridham pushed a commit to TomPridham/modeling-app that referenced this pull request Feb 13, 2025
* Make all geometry KclValue variants into struct variants

Signed-off-by: Nick Cameron <[email protected]>

* Add units to geometry types

Signed-off-by: Nick Cameron <[email protected]>

---------

Signed-off-by: Nick Cameron <[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.

2 participants